To enable Wake on LAN on a Asus P5E-V motherboard under Debian you can do the following. Since I have a Asus motherboard, that’s the only one I’ve tested, but except from the BIOS (which may differ a bit), the instructions should be the same for all motherboards/NIC that supports Wake on LAN.
In the BIOS, enable “Power on by PCIE device”.
In Linux, first install ethtool and then check that Wake on LAN is supported by running the following command:
root@host$ ethtool eth0 ... Supports Wake-on: g Wake-on: g ...
The output should contain a ‘g’ to indicate that the device can be woken by sending it a “magic packet”.
Enable Wake-on by running:
root@host$ ethtool -s eth0 wol g
Since this command must be run on every boot, add it to /etc/rc.local.
root@host$ cat /etc/rc.local ... ethtool -s eth0 wol g exit 0
As the last step we must make sure that halt doesn’t disable the network device. This is done by adding this line to /etc/default/halt:
We also need the MAC address to send the magic packet to.
root@host$ ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:1e:8c:cf:d0:bb ...
Then shutdown the computer. On an other computer, install e.g. wakeonlan and run:
user@other$ wakeonlan 00:1e:8c:cf:d0:bb
The computer should now start.