WakeOnLAN

From ThinkWiki
Jump to: navigation, search

Wake On Lan with Ubuntu 9.04 (Jaunty Jackalope)

Finally Wake On Lan (WoL) works on my old T21 ThinkPad. I spent a few days with Google and here are my results for Ubuntu 9.04 (maybe working with other versions).

Wake On LAN from shutdown

There are a lot of tutorials what to do:

  • Enable Wake On LAN in the BIOS
  • edit /etc/default/acpi-support
  • edit /etc/pm/config.d/00sleep_module
  • enable in /proc/acpi/wakeup the devices

Wake On LAN from suspend

This was the hardest step to get this activated. Sometimes it worked on my T21, but after changing the harddisk Wake On LAN didn't work any more. This surprised me a lot, because I didn't change any configuration files. The solution worked for me is:

lspci -nn | grep Ethernet
00:03.0 Ethernet controller [0200]: Intel Corporation 82557/8/9/0/1 Ethernet Pro 100 [8086:1229] (rev 09)

shows on which PCI bus the ethernet card is working. In my case (first two digits 00) PCI bus 0 and the identifier number is 8086:1229. Now with the command (replace the zero with your PCI bus):

sudo pci-config -B 0
Device #1 at bus 0 device/function 0/0, 71908086.
Device #2 at bus 0 device/function 1/0, 71918086.
Device #3 at bus 0 device/function 2/0, ac1b104c.
Device #4 at bus 0 device/function 2/1, ac1b104c.
Device #5 at bus 0 device/function 3/0, 12298086.
Device #6 at bus 0 device/function 3/1, 000c115d.
Device #7 at bus 0 device/function 5/0, 60031013.
Device #8 at bus 0 device/function 7/0, 71108086.
Device #9 at bus 0 device/function 7/1, 71118086.
Device #10 at bus 0 device/function 7/2, 71128086.
Device #11 at bus 0 device/function 7/3, 71138086.

I found my network card as device #5, the last number is the identifier number in different order (8086:1229 becomes 12298086) Now put the device to Sleep when changing the power state to S3.

sudo pci-config -B 0 -#5 -S

And now run

sudo pm-suspend

and try to wake up your T21 with Wake On Lan from a different machine.

If it is nor working try

sudo pci-config -B 0 -#5 -S
sudo pci-config -B 0 -#5 -W

before sending the machine to suspend. This workaround works fine for me and now I am able to wake up the T21 from suspend over LAN.

Hint:
Add your model to the category if this workaround works for you.