View Single Post
Old 07-27-08, 07:41 AM   #13
Lars G. Hanson
Registered User
Join Date: Jul 2008
Posts: 1
Default Re: [ACPI][Wake-on-LAN] System won't boot after Power down from Linux

I found spheres solution very helpful. Here is a slightly simplified version that also address a MAC address byte-ordering problem occurring on Ubuntu Hardy when resuming after suspend. My work-around is to invert the byte ordering before putting the net card to sleep. Some useful commands for the purpose:

ethtool -s eth0 wol g # enable wake-on-lan on eth0
ethtool -i eth0 | grep bus-info # Find PCI bus/device/function
Returns "bus-info: 0000:00:04.0 (bus 0, device 4, function 0)" in my case.
pci-config is used to set power state to D3, but first the ID must be identified based on the bus-info. List IDs for bus 0:
pci-config -B0 -a
Returns "Device #12 at bus 0 device/function 4/0, 006610de".
Shutdown eth0 and reverse MAC address to avoid problems after resume:
ifconfig eth0 down hw ether 08:f6:11:6e:0c:00 # hw MAC is 00:0c:6e:11:f6:08
Set power state of device #12 to D3:
pci-config -B0 -S -#12
Now suspend or hibernate.
Please note that in order to wake up the machine, you need to use the reversed MAC address:
etherwake 08:f6:11:6e:0c:00
All is well after the wake-up call, but without the MAC reversal above, eth0 would be lost after suspend (in any case eth0 needs to be shut down, otherwise the machine will hang when the NIC power state is changed).

I am happy with my work-around, so I wont pursue the issue.


Motherboard: Asus A7N8X Deluxe
Linux corolla 2.6.24-19-generic #1 SMP Fri Jul 11 23:41:49 UTC 2008 i686 GNU/Linux
00:04.0 Ethernet controller: nVidia Corporation nForce2 Ethernet Controller (rev a1)
Lars G. Hanson is offline   Reply With Quote