https://wiki.archlinux.org/index.php/Wake-on-LAN
http://wiki.xbmc.org/index.php?title=HOW-TO:Set_up_Wake-On-Lan_(Ubuntu)
https://fitzcarraldoblog.wordpress.com/2013/02/26/how-to-prevent-a-usb-mouse-auto-suspending-in-linux-when-a-laptops-power-supply-is-disconnected/
First query the driver to see if it’s defaulted to ‘on’ by using ethtool:
ethtool eth0 | grep Wake-on
To enable the wol feature in the driver, simply run the following:
ethtool -s eth0 wol g
This command does not last beyond the next reboot.
Keep WOL persistent over restarts adding command to following startup script:
/etc/rc.local
ethtool -s eth0 wol g
Test WOL from another computer:
etherwake -i eth0 6c:f0:49:7a:52:10
Sleep computer from CLI:
pm-suspend
In some cases ethtool eth0
shows “Wake-on: g“, but after second suspending of the machine, if magic packet is received, suspend is disabled “Wake-on: d” and doesn’t work anymore.
In my case, I have accidentaly installed laptop-mode-tools on my desktop, so running apt-get purge laptop-mode-tools
solved my WOL disabling problem.