Using Wakeup on LAN (WOL) Linux

WOL seems to be the poor stepsister when changes are made to Linux

Kernel or system upgrades often seem to break WOL, and it can be very difficult to find a work around.

The items which seem to have the most relevance are the kernel module for the NIC, ACPI, Network-Manager, and the various RC start and stop scripts

With later kernels it is necessary to shutdown the NIC using pci-config, and then re-enable WOL using ethtool before shutdown, as discussed in Debian user forums EG:

pci-config -B <bus-num> -# <card-num> -S
/sbin/ethtool -s eth0 wol g

Where <bus-num> and <card-num> can be found using lspci and pci-config.

Sometimes it is sufficient to put these commands in /etc/network/interfaces with the relevant interface (eth0...etc.). This does'nt always work with later kernel modules. It may also be necessary to remove the NIC's kernel module using rmmod, and reload it with modprobe or insmod (possibly with parameters). E.G

rmmod e1000e
modprobe e1000e

WOL is a very useful power saving feature for remote servers or processing nodes running intermittently. It is a pity that it is so obscure and difficult to keep this function running.