Wake on LAN doesn't

Journal Info

Jörg Reuter
My Website

Wake on LAN doesn't

Previous Entry Add to Memories Share Next Entry
One difference between openSUSE 11.0 and 11.1 really bugged me: even though I enabled Wake on LAN (WOL) on eth0, the driver would switch off the transceiver on suspend to RAM. After some investigation I found that the atl1e driver has the "wakeup" flag for power management set to "disabled", regardless what I set with ethtool. After enabling it with "echo enabled >/sys/class/net/eth0/device/power/wakeup", WOL works again. As a quick workaround I created a file /etc/udev/rules.d/78-enablewol.rules with the following udev rules:
SUBSYSTEM=="net", ENV{INTERFACE}!="eth*", GOTO="skip_wol"
SUBSYSTEM=="net", ACTION=="add", RUN+="/bin/sh -c 'echo enabled >/sys/class/net/$env{INTERFACE}/device/power/wakeup' "

Edit: Forgot that redirections aren't implemented in udev. Sigh.

NB: Of course you also need to actually turn on WOL. Either by setting "ETHTOOL_OPTIONS='wol g' " in /etc/sysconfig/network/ifcfg-eth0.cfg if you are using "traditional" network setup with ifup/ifdown, or by adding
SUBSYSTEM=="net", ACTION=="add", RUN+="/sbin/ethtool -s $env{INTERFACE} wol g"
to above udev rules.
Powered by LiveJournal.com