Elementary OS Freya Battery Draining problem after shutdown

Akhil Sudhakaran
Just Another Geeky Blog
2 min readOct 22, 2015

Recently I had switched to Elementary OS as my primary OS. Ever since that day, my HP Laptop had always had a battery draining problem. This would also happen after I switch my laptop off. If I were to power on the laptop after a few days the battery would be all out, and wouldn't switch on at all 😒.

Upon investigating I found out that removing the laptops battery after switching the laptop off and putting it back on stops this draining problem 😶. But for obvious reasons, this is not an ideal solution 😣.

After doing some research, I found out that the reason behind this draining is due to a feature called Wake-On-Lan ‘WoL’ (A feature where the WiFi is kept on even after shutdown so that this computer can be switched on remotely). In order to solve this battery issue one must disable WoL.

Firstly check if WoL is enabled by running the following command in the terminal:

cat /sys/class/net/eth0/device/power/wakeup

If the output is “disabled” then WoL is disabled and the battery draining issue is because of something else. In case the output is “enabled” then follow the steps given below.

Some laptops have an option in the BIOS to disable WoL, but like mine some don’t. I’ll be showing you how to disable WoL using a tool called “ethtool”. To install ethtool execute the following commands in a terminal :

$ sudo apt-get update

$ sudo apt-get install ethtool

After installation you can disable WoL by running the following command:

sudo ethtool -s eth0 wol d

This disables the WoL feature and the Battery draining problem is solved “Temporarily”. Its temporary because once you switch the laptop back on, it gets enabled again!! To avoid this from happening, update the rc.local file in /etc/rc.local and ‘insert’ the following line to that file before the “exit 0” line :

<PATH>/ethtool -s eth0 wol d

Replace ‘<PATH>’ with the path where ethtool is installed

This makes sure that on every startup WoL is disabled and the problem is SOLVED!!! Cheers 🙌

--

--