Battery drain when HP laptop is shut down from Ubuntu, but not from Windows
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?
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: wlp60s0
The 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:
$ sudo ethtool enp59s0
Settings for enp59s0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Current message level: 0x000060e4 (24804)
link ifup rx_err tx_err hw wol
Link detected: yes
In my case "Wake on LAN" is not turned on but if yours shows:
Wake-on: g
That 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 fordisable
.
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