Archive for November 15th, 2009

Realtek r8169 Wake on LAN (WoL) problems

Problem:

I can’t get my on-board Gigabit Ethernet controller to work with Wake on LAN functionality on Debian lenny. The card goes dead on shutdown, no LED activity whatsoever.

Things I have tried:

Standard ethtool setting:

ehttool eth0 wol

gives

[...]
Supports Wake-on: umbg
Wake-on: g


But just to be sure, I put this into /etc/init.d/ethtool

#!/bin/sh
/usr/sbin/ethtool -s eth0 wol g

and made it into the shutdown procedure:

ln -s /etc/init.d/ethtool /etc/rc0.d/S34ethtool

Normally this should suffice, but not in this case. The Realtek NIC gets powered down when going to S5, so no chance of generating any PME from its side.


BIOS settings seem to be OK, I even flashed a new version – to no avail.


To be sure I edited /etc/init.d/halt and changed

NETDOWN=yes

to

NETDOWN=no

No change.


From what I see in /proc/acpi/wakeup:

PCE2      S4     disabled
PCE3      S4     disabled
PCE4      S4     disabled
PCE5      S4     disabled
PCE6      S4     disabled
RLAN      S4     disabled
PCE7      S4     disabled
PCE9      S4     disabled
PCEA      S4     disabled
PCEB      S4     disabled
PCEC      S4     disabled
SBAZ      S4     disabled
PSKE      S4     disabled  pnp:00:02
PSMS      S4     disabled  pnp:00:03
UAR1      S4     disabled  pnp:00:08
P0PC      S4     disabled  pci:0000:00:14.4
UHC1      S4     disabled  pci:0000:00:12.0
UHC2      S4     disabled  pci:0000:00:12.1
UHC3      S4     disabled  pci:0000:00:12.2
USB4      S4     disabled  pci:0000:00:13.0
UHC5      S4     disabled  pci:0000:00:13.1
UHC6      S4     disabled  pci:0000:00:13.2
UHC7      S4     disabled  pci:0000:00:14.5

the PME for the Realtek LAN controller are disabled.

Issuing:

echo “RLAN” > /proc/acpi/wakeup

activates the first 11 entries, but after going through power off procedure the card is still dead. After reboot all the entries return to disabled.


/sys/class/net/eth0/power/wakeup entry is empty (null) and writing to it results in:

echo: write error: Invalid argument

Solution:

I couldn’t find a fix for this. In fact I just put some old e1000 Intel PCI NIC and everything works flawlessly with simple ethool configuration (MagicPacket/unicast – whatever you wish). So I gave up. But from what you can read here, this seems to be a bug in the standard driver. This should have been fixed in newer kernels, but I didn’t really test it. I came across those tickets after having already put the Pro/1000 MT Desktop adapter into good use, so I don’t know if this really resolves the issue completely. I didn’t have that much time to check it just for the sake of satisfying my curiosity. Maybe sometime later.