Skip Navigation

Laptop battery goes flat, when powered off, only on Debian

Hi all,

I had this laptop (Lenovo Carbon X1 Gen 6), and when it had Debian, it would just go flat on sleep, and even when powered off. So strange. I checked all BIOS settings etc, but could never figure it out.

I moved it to Fedora, and it was perfect. Battery life was boosted like crazy, acted as it was meant to.

However, I have tomove away from Fedora, due to them dropping X11 (it's an accessibility issue I'm facing with my tools) and I forgot about said issue with Debian.

Back on Debian now, woke up, powered on laptop, which was fully charged last night, and it's flat again.

What is it, that Debian is doing differently, that is making it go flat, when powered off?

Please note, I am doing a proper shutdown. Not just closing lid, sleep, hybernate, etc.

Any advice greatly appreciated. Thanks so much!

UPDATE: I booted into a fedora live disk, and shutdown. This time the battery did not go flat at all when shutdown, indicating that it is absolutely debian related, not BIOS or anything else.

16 comments
  • It's a bit hard to debug without the laptop in the front, but i think the issue is that your laptop supports some sort of "connected standby" and it enters that instead of fully powering off, or debian fails to properly remove power to some of the hardware.

    If you want to search on the internet more on this, the terms you are looking for is for "system power state" or "s5". As a sanity check, first to see if running systemctl poweroff in a terminal actually powers off the system fully.

    If that works, it's a problem of your desktop environment not telling the linux kernel to shutdown properly, but instead go into standby/connected hybernation.

    If that doesn't work: Debian usually ships only older packages (including the kernel) and probably the kernel debian ships lacks the compatibility with some of your hardware. You can look up how to upgrade it, but it's not a procedure for the faint of heart. The easiest option is probably to understand why you want to use debian, and find a similar distribution with more up-to-date packages. There's also ways to customize your kernel and building your own, but I would keep it only as a last resort (in the case you really really want to use debian)

    • OK, a little bit of an update. I booted into the fedora live USB disk. I then shut down from there. A day later, and the battery is still on 98%. This shows that it is actually debian causing the issue, not a system issue like the BIOS or similar. Now, just to try and figure out what it is with Debian and shutdown.

    • Just an update, for interests sake, for those that helped me. Get this, it's if I have the laptop plugged into power as I turn it off. I then unplug it, and it drains like crazy when OFF. But, if I unplug power, then power down, it keeps its battery beautifully. How strange.

    • Thank you for your thorough reply. I'm working my way through each of people's replies here, hopefully I can find a fix.

      I have done systemctl poweroff, and it does switch the system off.

      What I do find interesting, is when my laptop goes to sleep by just leaving it, I can't wake it up by pressing any key, or wiggling the mouse, or anything like that. I have to actually press the power button for it to come back to life. This is unexpected behaviour, and not normal. That might give me a clue to research further.

      I will report back as I find something. Hopefully I will be able to help someone in the future. I'll definitely leave kernel stuff until the bitter end.

  • holup - you shut down the laptop and in such a state it drains the battery?! I mean, that's so outside of the OS' functionality, it don't matter which one you got. the only sensible conclusion is that shutting down the laptop in debian doesn't turn it off, there are no other explanations.

    fedora is more modern by way of kernels and DEs and whatnot, but I've looked up your hardware, that's an 8th gen i5/i7, that's plently supported even in old bookworm.

    one thing to lookup is in BIOS, my T480s (same generation) had a power management setting in BIOS that was either Windows or Linux, so make sure yours is set correctly.

    edit: to add, the other issue, standby, blows on any hardware I've tried so what you need to do is implement suspend-then-hibernate by setting up a swap file that's RAM + 4 GB (or RAM * 1.5, if you run zram) and then enabling first hibernation and then configuring suspend-then-hibernate. so in that setup, your laptop sleeps normally, and if you don't touch it in say an hour, it dumps the RAM to the SSD and powers off. when you power it on, it restores from swap and that's faster than cold boot and your shit is how you left it.

    naturally, alla that's pointless until you fix issue #1, the drain when it's supposedly off.

    • OK, a little bit of an update. I booted into the fedora live USB disk. I then shut down from there. A day later, and the battery is still on 98%. This shows that it is actually debian causing the issue, not a system issue like the BIOS or similar. Now, just to try and figure out what it is with Debian and shutdown.

    • Just an update, for interests sake, for those that helped me. Get this, it's if I have the laptop plugged into power as I turn it off. I then unplug it, and it drains like crazy when OFF. But, if I unplug power, then power down, it keeps its battery beautifully. How strange.

    • the only sensible conclusion is that shutting down the laptop in debian doesn't turn it off, there are no other explanations.

      I mean, there are other explanations, like having Wake on Lan activated. But yeah it is very suspicious. It shouldn't drain that fast, even with WoL.

      • OK, a little bit of an update. I booted into the fedora live USB disk. I then shut down from there. A day later, and the battery is still on 98%. This shows that it is actually debian causing the issue, not a system issue like the BIOS or similar. Now, just to try and figure out what it is with Debian and shutdown.

      • Yes, I have checked all those settings in the BIOS, and they are fine. I have no idea where to go now.

      • Just an update, for interests sake, for those that helped me. Get this, it's if I have the laptop plugged into power as I turn it off. I then unplug it, and it drains like crazy when OFF. But, if I unplug power, then power down, it keeps its battery beautifully. How strange.

    • Thank you for your response. I very much appreciate it.

      I will definitely try whatever I can first before creating a bit of a workaround of suspend then hibernate. What I really want is just for the laptop to shut down properly, so that when it boots it still has the same, or very similar amount of battery.

      My BIOS settings are definitely correct, I've gone over and triple checked them. Wake on land and all of those kind of things are turned off as well. I am fully stumped.

16 comments