Ubuntu Battery drain when HP laptop is shut down from Ubuntu, but not from Windows
16.04batterypower-managementshutdown
I have a dual-boot setup with Ubuntu 16.04 LTS and Windows 10 on an HP Pavilion 15-CC508NF. When I shutdown from Windows 10, my battery remains as it is, no discharge. But when I shutdown from Ubuntu, the battery loses 5% by day.
I have installed the TLP package and disabled WOL [Wake-On-Lan] on the Ethernet card. But the battery continues to discharge when the computer is off 2% by day.
I think that some hardware continues to drain power while the computer is off.
Any idea to identify the problem/the hardware causing the problem?
Best Answer
Another user with an HP Pavilion was loosing 10% battery overnight. Apparently there was no BIOS configuration for Wake-on-LAN and they had to use this method:
$ sudo lshw -class network | grep logical logical name: enp59s0 logical name: wlp60s0The logical name starting with e is for Ethernet which means "LAN". The logical name starting with w is for WiFi which is of no concern.
Then take the Ethernet/LAN logical name and pass it to the ethtool command:
In my case "Wake on LAN" is not turned on but if yours shows:
Wake-on: gThat means "Wake-on-LAN" is turned on and like the OP is loosing `0% battery per night you are loosing the 5% per day.
To turn off "Wake-on-LAN" the OP used:
sudo ethtool -s enp59s0 wol d- Remember to substitute enp59s0 with your logical name from step 1. above.
- wol stands for "Wake-on-LAN".
- The d stands for disable.
ArchLinux has an extensive write-up about Wake-on-LAN.
Why would you use "Wake-on-LAN"?
Some servers will want to wake up client PCs overnight and install new programs on them overnight or update files.
USB turned off in Windows, left on in Ubuntu
A user on Tom's Hardware reports that when Windows shuts down all USB powered devices power off. However when Ubuntu 16.04 shuts down USB powered devices stay powered on.
To confirm if this is happening in your case, attach a USB powered device such as a Cell phone or mouse to all USB ports and see if they are powered when Ubuntu shuts down the computer.
Less likely scenerios
- Wake on USB
- Wake on Wireless LAN
Review shutdown log
I've experience during suspend the system doesn't finish the process. When the system resumes it completes the process. You should check your /var/log/syslog or /var/log/syslog.1 to ensure everything shutdown properly and was powered off. You can also check journalctl -b-1 to look at end of previous boot. Use journalctl -b to look at start of current boot.
Background: systemd suspends system but upon resume kernel then enters sleep and wake-up
- Ubuntu Wake-on-LAN works with Windows 8 but not with Ubuntu