9

After upgrading to kernel 4.13, the battery of my laptop started to drain while powered off (about 30% in one day). This didn't happen if I booted the laptop from kernel 4.12 or Windows 8.1, so the problem is clearly related to the new kernel version.

I used to have a similar issue due to the wake-on-lan (WoL). However, that was solved long ago by permanently disabling the WoL. I can easily verify with ethtool that the WoL is still disabled.

Could it be that the WoL is re-enabled when I shutdown the laptop from poweroff menu? Indeed, if I enforce a hard shutdown (i.e., by keeping the power button pressed) then I observe no battery drain. However, I don't have enough skills to verify this hypothesis.

It would be awesome if someone could help me debug this problem.

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Henri
  • 91
  • 1
  • 2
    You don't happen to run Linux on a HP laptop do you? Cause I seem to have the same problem there (though with an older kernel) - see https://unix.stackexchange.com/questions/409774/manjaro-on-hp-laptop-battery-drain-while-shut-down – Raven Dec 08 '17 at 16:48
  • 1
    You can permanently disable WoL in the BIOS/UEFI setup. – Marco d'Itri Feb 18 '18 at 13:20
  • here are my 2 cents , From your description. hard shutdown no drain. There is something in power down sequence causing this. like init scripts (i.e. stop part of them). try this command `ethtool -s net0 wol d` found on [Arch Wiki](https://wiki.archlinux.org/index.php/Wake-on-LAN#Battery_draining_problem) – Devidas Feb 28 '18 at 07:31
  • Take your laptop apart to see which chip is hot, then make a bug report on the related driver. – user1133275 Mar 08 '18 at 12:13
  • I’m voting to close this question because it is likely to confuse contemporary linux kernel users facing similar problem since A/ this very problem has been clearly identified, solved from 4.16 and associated patch backported to 4.14 LTS (cf my answer) B/ It is IMHO very unlikely anyone is still running a 4.13 todate. – MC68020 Sep 11 '22 at 09:13

2 Answers2

1

This problem causing battery drain during system suspend, hibernation or shutdown for some PCI devices that are not allowed by user space to wake up the system from sleep or power off is a regression that was introduced in 4.13

It has been actually fixed in 4.16 by this patch.

Patch was backported in 4.14 LTS from .41

MC68020
  • 6,281
  • 2
  • 13
  • 44
0

There are many possible causes of a regression like this, but some likely contenders would be either the device firmware or a kernel driver failing to power down a device at shutdown. If a newer kernel hasn't fixed your problem, then the best way to find the culprit is to do a git bisect between the two closest known working and non-working kernel versions to find out exactly which change caused the regression.

For some guides on this try putting git bisect linux kernel into your favourite search engine.

To quickly verify the power draw, you could use a plug-in power meter and check the power draw of the device with the battery removed (if your laptop permits this) or alternatively with the battery fully charged.

Tim Small
  • 121
  • 4