After preparing my P5K Motherboard to recieve WOL Magic Packets, following this tutorial, I shutdown and booted several times to Windows.
The problem happens when I shutdown from Ubuntu.
It simply won't boot.
The output of ethtool eth0 and part of lspci is on pastebin but here are the important parts:
sudo ethtool eth0
Supports Wake-on: g Wake-on: g Current message level: 0x0000003f (63) drv probe link timer ifdown ifuplspci
2:00.0 Ethernet controller: Atheros Communications Inc. Attansic L1 Gigabit Ethernet (rev b0)I must say that if i boot to windows and shutdown without making any changes the WOL works correctly again.
32 Answers
If the interface is managed by the system
If your network interface (eth0 in most cases) is managed via /etc/network/interfaces you could avoid running ethtool before every shutdown by following this guide.
If the interface is managed by NetworkManager
If eth0 is managed by Network Manager, the simplest way is to add the ethtool -s eth0 wol g command in an if-up.d script.
Here is a quick example that you could put in /etc/network/if-up.d/eth0-wol and make the script executable: sudo chmod +x /etc/network/if-up.d/eth0-wol :
#!/bin/sh
ETHTOOL=/sbin/ethtool
[ -x "$ETHTOOL" ] || exit 0
[ "$IFACE" != "lo" ] || exit 0
WOL="g"
"$ETHTOOL" -s "$IFACE" wol "$WOL"
exit 0 2 In some cases on Ubuntu 12.10 the output of sudo ethtool eth0 gives the following output
Cannot get wake-on-lan settings: Operation not permitted Current message level: 0x000000ff (255) drv probe link timer ifdown ifup rx_err tx_err
Cannot get link status: Operation not permittedWhat I did to solve this I activated the root account on my computer via sudo passwd root and then afterwards logged as root user executed ethtool -s eth0 wol g which solved the WOL issue in my case.