Ubuntu – Battery drains to 0% when power off for 2 days

batterylaptoppower-management

I am on Ubuntu 16.10. Two days before I powered off my system correctly. Now, when I tried to power on, it was fully drained. I needed my charger to power on.

So, here is the case. When I switch off it via Ubuntu battery drains (in huge amounts ) while via Windows 10 there is only little bit change.

How can I save my battery ?

Best Answer

This is not entirely mine, more like a mashup of several answers I've read all over the Internet.

Main source: https://wiki.archlinux.org/index.php/Wake-on-LAN#Battery_draining_problem

Aparently the "Wake On Lan" is the culprit of this drain issue.

Several ways of fixing this, my favorite would be creating a systemd service:

/lib/systemd/system/wolfix.service

[Unit]
Description=wolfix

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
ExecStop=/sbin/ethtool -s eth0 wol d  #change eth0 according to your laptop nic
[Install]
WantedBy=multi-user.target

Then enable the service and good to go: systemctl enable wolfix

PD: This is assuming you are running 16.04 or newer, if not just add the ethtool line to /etc/rc.local, but keep in mind if some other program enable the wol feature before shutdown this fix will be useless.

Related Question