PDA

View Full Version : Anyone know anything about Wake on LAN ?


tinners
29-05-2008, 4:07 PM
Am trying to get WOL working on my new server (see sig for link) but am struggling. Have read a gazillion posts on the Ubuntu forums but no further on.

Here's where I am:
- Sleep via button / desktop command working OK as is resume from sleep
- Wake on PCI and Wake on Ring enabled in the BIOS
- Ran this (http://ubuntuforums.org/showthread.php?t=234588)and checked the connection settings are OK using ethtool

But it doesnt wake up on magic packet from either Sleep or Hibernate or Shutdown

When I do cat proc/acpi/wakeup it only has S4 settings and they are all disabled. Also there doesnt seem to be any network / PCI devices in there (although I have no idea what the four letter devices are)

Looking at this (http://xerxess77.blogspot.com/2008_02_01_archive.html)I need to enable a new device (the NIC) in wakeup but when I do it the command works OK but no new entry is generated.
# Enable Wake-On-LAN from S3 and S4 (sleep states).
if grep PCI0 /proc/acpi/wakeup | grep disabled >/dev/null; then
echo PCI0 >/proc/acpi/wakeup
Anyone got any ideas ?

home-server@home-server:~$ cat /proc/acpi/wakeup
Device S-state Status Sysfs node
PS2K S4 disabled pnp:00:07
NSMB S4 disabled pci:0000:00:01.1
USB0 S4 disabled pci:0000:00:02.0
USB2 S4 disabled pci:0000:00:02.1
NMAC S5 disabled pci:0000:00:07.0
P0P1 S4 disabled pci:0000:00:04.0
HDAC S4 disabled pci:0000:00:05.0
BR10 S4 disabled pci:0000:00:09.0
BR11 S4 disabled pci:0000:00:0b.0
BR12 S4 disabled pci:0000:00:0c.0

home-server@home-server:~$ cat /proc/acpi/sleep
S0 S1 S3 S4 S5

scottmillar28
29-05-2008, 6:34 PM
Apparently, wol is a bit sketchy, read an article about it in micro mart not too long ago, hate to recommend another forum but perhaps try their forums?

tinners
30-05-2008, 8:05 AM
Well managed to get it working in the end.
I firstly did this to get the command to enable the WOL each startup:
http://ubuntuforums.org/showthread.php?t=234588

I then worked out the entry in proc/acpi/wakeup for the network card was
NMAC S5 disabled pci:0000:00:07.0
so I needed to enable this to make the WOL work. I nicked a script I found on the interweb and I run this from rc.local:
http://www.maddes.net/software/debian.htm


#!/bin/sh
# Enable ACPI Power Management Events (PME) for Wake-on-LAN if they are disabled
# for info see
# http://www.intel.com/support/network/sb/CS-000084.htm
# http://www.vdr-wiki.de/wiki/index.php/WAKE_ON_LAN
# http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
if (grep NMAC /proc/acpi/wakeup | grep disabled 2>&1 >> /dev/null)
then
echo -n NMAC > /proc/acpi/wakeup
fi

It now wakes up OK, but each restart from hibernate or sleep it disables the WOL function and it needs resetting.
i.e. when it is working (g= Wake on MagicPacket)
Supports Wake-on: g
Wake-on: g

when it resumes (d = disabled)
Supports Wake-on: g
Wake-on: d

Where can I put the command to change the d to a g so it is run each resume from hibernate / sleep or power off ? rc.local doesnt run it and for some reason I cant get a cron job to work.