View Single Post
Old 30-05-2008, 5:30 PM   #11
tinners tinners is offline
Prominent Member
 
tinners's Avatar
Join Date: May 2006
Location: Bucks
Experience Points:
9,287, Level: 23
Points: 9,287, Level: 23 Points: 9,287, Level: 23 Points: 9,287, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Thanks: Gave 98, Got 258
Posts: 3,173
Re: tinners' Home Server Build

So WOL is now working, and I can now resume from sleep using wolcmd as outlined by Linus here and here. (thanks!)

Reading around it seems it is a pain to get working but here's what I did:

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
Code:
home-server@home-server:~$ sudo 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	 enabled   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
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

Code:
#!/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
To check it is working: (g= Wake on MagicPacket)
Code:
home-server@home-server:~$ sudo ethtool eth0
Settings for eth0:
	Supported ports: [ MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	Advertised auto-negotiation: Yes
	Speed: 100Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 1
	Transceiver: external
	Auto-negotiation: on
	Supports Wake-on: g
	Wake-on: g
	Link detected: yes
If Wake-on is set to d then it is disabled. If you have no Wake-On settings output here then I guess you're card doesnt support it or it's disabled in the BIOS.

Last edited by tinners; 30-05-2008 at 5:33 PM.
  Quote