16.09.2005 20:07

Wake On Lan with Linux

I have constantly troubles to make Wake On Lan working on Linux, beause it often requires individual adapter approach. I'll describe several things how to get WOL working - at least in some cases.

In passed time I had 4 ethernet cards I used.

each behaves differentlly and requires different steps to have WOL working.

My assumption: The behaviour of card depends on what the driver does with it. It seems there is no given rule how the driver sets cards' wol at load/unload (modprobe/rmmod). Therefore you need to do different things with different card.

Edimax - realtek 8139

Most clear status is with realtek 8139. First you can enable WOL and PME events in config.exe utility (provided on attached floppy). This works for DOS. However 8139too driver disables wol on module load and you have to enabled it. To enable it use e.g.
ethtool -s eth0 wol g

You have to do this every boot.

SafeWay - Myson

Myson fealnx driver has WOL enabled by default. FIXME??? check ethtool!

nForce4 - Marvell

For nForce4 Marvell with forcedeth driver I did not find any reliable behaviour. Definitely the WOL state is pretty unpredictable. I found advices for nForce2 that you have to enable power management for the NIC on shutdown with
pci-config -S -B 2 -#10
You have to fill in correct numbers
$ lspci 
02:0a.0 Ethernet controller
So it is bus 2 and device #10.
According to my experience this does nothing. Another option is to use ethtool - same as for realtek. This leads to that card sometime wakes... but sometimes.

Update 24.09.2006: As of today it seems kernel 2.6.18 supports new drivers for Cicada alias Vitesse PHY controlers and WOL seems to work on Yukon. However it is switched of by default, you have to enable it before poweroff with
ethtool -s ethX wol g


Ref.:
http://www.scyld.com/wakeonlan.html
http://sourceforge.net/projects/gkernel/
http://wiki.debian.net/?WakeOnLan
http://ahh.sourceforge.net/wol/faq.html

Email comment