I have always been conservative when it comes to saving electricity in my household not because I want to but because 1 kWh costs me R1.87, hence I had to think of a better solution rather than running my server 24 hours per day with an average load wattage of 532W, if one does the maths it costs me roughly R23.87 per day when always on.
So not cool, hence why I had to think of a better way to conserve energy:- WakeOnLan
In Ubuntu 16.04, make changes:
# Install ethtgool (Dependency)
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get install -y ethtool
# To avoid getting WOL disabled by TLP power management make changes to:-
sudo nano /etc/default/tlp
# To prevent powering off the network card during shutdown make changes to:-
sudo nano /etc/default/halt
# Enable Wake on LAN when static network configuration is used.
sudo nano /etc/network/interfaces</code>
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
iface lo inet loopback
# The primary network interface
iface eth0 inet static
up ethtool -s eth0 wol g
Enable wake on lan in BIOS, enter the BIOS setup and look for something called “Wake up on PCI event”, “Wake up on LAN” or similar. Change it so that it is enabled. Save your settings and reboot.
From there you should be good to go.