[TRACKING] High Battery Drain During Suspend

I recently purchased a Framework laptop for Linux, running Ubuntu 22.10, and have been experiencing the battery drain when closing the lid and the laptop is not plugged in overnight. I do like the laptop but this is a dealbreaker for me as I can’t afford to pick up the laptop to head out the door for some work and find that the battery is drained.

I saw on another forum that there is a BIOS update (3.10) for the 11th Gen Intel that fixes this issue, but that there is no BIOS update for the 12th Gen. Is that the case? Is there any other fix for the 12th Gen running Linux?

(Update: I don’t have a USB-A expansion card, but I do have an HDMI expansion card which others report being the/a culprit. I’ll try without it, though having to remember to unplug in/plug in back in every time is not optimal. I also have an Ethernet expansion card and 2x USB-C cards)

For the record I forked a new thread about the specific problem I reported here: s2idle sleep usually drawing a normal ~1w but SOMETIMES drawing up to 7w and getting the laptop very hot. Here it is: Linux s2idle sleep "random" power usage increase

This way we can gather data and solutions about this problem more specifically and avoid mixing it with the issue of baseline sleep power draw in this thread.
@Nils @Cecile I believe you were among those who experienced this too so feel free to join the discussion with any additional data you have. And if there are other people impacted too of course.

2 Likes

Hi! Just wanted to say that I’m still suffering with this issue. Does anyone at Framework have an estimate when we can see some relief?

Ubuntu 22.04
12th gen Intel
BIOS 03.05

1 Like

For Ubuntu, we recommend:

  • Removing unused expansion cards before suspend.
  • Make sure you’re Framework is going into a deep sleep.
  • Consider hibernate, which is what I prefer on Ubuntu 22.04.

I DM you a pdf of what I use for hibernation on Ubuntu 22.04. This is still very much in-testing, but has worked really well for me if you follow the guide to the letter.

Hibernation once ready to go, will “power down” your laptop, putting its state into a frozen state onto your hard drive. Then pressing power, your laptop powers on, and you’re back to exactly where you left off.

@Matt_Hartley

Please communicate to the dev team that those workarounds are just that, workarounds. Unfortunately, they don’t actually solve the problem and have their own trade-offs.

People in this thread are usually asking for help because they’ve tried everything and are now waiting for the firmware fixes they’ve been told to expect in the “near” future. Constantly being told to try a few well-known workarounds without any actual updates gets frustrating, to say the least. I understand you’re doing your job and trying to be helpful, but it starts to feel like gas lighting after a while.

Removing unused expansion cards before suspend.

This just isn’t a reasonable suggestion. Sure it’ll help, but do you actually expect someone to pry out their expansion cards as they put their laptop away? They might as well just shut it off or ditch the concept of expansion cards entirely.

Make sure you’re Framework is going into a deep sleep.

Deep sleep will still lose 30% battery life overnight.

Furthermore, it takes 10-20s to completely resume from deep sleep (and staggard hardware initialization causes issues with the fingerprint reader, in my case). It doesn’t sound like much, but I’m a bit tired of pulling out my laptop to show someone something only to sit there and wait while they snakily ask me why I don’t just by a macbook.

Consider hibernate, which is what I prefer on Ubuntu 22.04.

This is really slow, especially with 32-64GiB of ram.

Additionally, from a security standpoint, hibernation is a real issue. It’s possible to encrypt swap with the TPM, but I haven’t yet found a way to ensure that the key is ephemeral. Security policies usually just flat-out forbid hibernation.

3 Likes

Thanks for the feedback. My recommendations are just that, recommendations of what we recommend at this time. Not full stop solutions.

Yes, there are definitely trade offs here. However, there are those who use hibernation quite happily despite the trade offs. Whether or not a user opts to use hibernation will depend on any concerns or company policies that have security concerns with it. While it is difficult to do in TPM, there have been customers here who have managed it.

For me, it’s only done on unencrypted scenarios. My encrypted machines are not using hibernation - I simply plug them into power when I put them into suspend of an evening. Not ideal, but it’s what I do personally.

Regarding long term battery life improvement, I can tell you that we are actively, very actively working on this. We appreciate your continued patience.

3 Likes

Out of curiosity–and I apologize if this is covered elsewhere, searching the forums for this topic is tough–have you experienced your machine spontaneously waking up on its own immediately after hibernating and shutting down?

The pattern I observe, consistently, is that I hibernate the device. It shuts down. Then immediately powers on. When grub appears I hit the power button to shut off the machine. Then it spontaneously powers up again. I hit the power button a second time. And then it shuts down for good.

All USB devices have been disabled for wakeup. I don’t have WoL enabled. I don’t have the “power on when you plug the device in” setting enabled in the BIOS.

This happens if I trigger hibernation with systemctl or via Gnome (after adding an extension to make hibernation available in the power menu).

It’s honestly a bit mystifying.

Am I the only one who’s reported this? Any suggestions for how to troubleshoot? Nothing in the kernel dmesg indicates what’s going on, and the last time I checked, the result of dmidecode said the wakeup was from the power button being pressed (which is definitely not true).

Also, I can certainly fire up a new thread if this is off topic. :slight_smile:

No problem, happy to address this.

On Linux Suspend vs Hibernation are different. We refer to suspend as suspending to RAM in a lower power state. Hibernation is to disk, where the computer powers off, but saves the state. Then pressing the power button brings back the state from the disk, as if in a really, really deep sleep.

Tod find things that are waking up your suspend state, running this to take a look at the suspend logs can be helpful - 99% of the time it’s software that’s open.

journalctl | grep "suspend"

dmidecode is good, but it lacks context.

You can also test this out further by testing suspend with all applications closed, nothing attached (USB).

I’m afraid you misunderstand.

I am hibernating my laptop to disk. Not suspending it.

And yes, rather than the laptop simply shutting down, it appears to power down then immediately power back up and begin the normal POST and boot cycle. How do I know? Because the laptop boots into the bootloader (i.e. grub in this case), which would not happen on a normal wake from suspend.

Yes, that is as surprising to me as it is to you! :smiley:

It sounds like it’s not actually going into hibernation at all, when you say ‘I hibernate the device. It shuts down’ that is odd to me because hibernation doesn’t look like shutting down, it just looks like the screen turning off and power button light turning off a short while later.

When I first tried to set up hibernation, something similar happened to what you’re describing, in that it looked more like shutting down. I looked over everything again and it turned out I’d just put the wrong UUID in my grub settings or something.

So maybe just go through the whole process of setting up hibernate or suspend-to-hibernate again making extra certain you’ve put the right UUIDs in and everything? Sorry I’m not very techy so this isn’t detailed advice but might help.

The past few days, I’ve been experimenting with adding and removing two USB-A cards and switching between s2idle and deep sleep. I’m on a Framework 13 11th gen, 64 GB of RAM, BIOS 3.17, Fedora 37. I’ve been noting sleep and wake times and checking the battery percentage in the task bar. I added the nvme.noacpi=1 option at boot, dragged KDE’s “Power Profile” to “Power Save”, did nothing else to modify battery usage.

Roughly, assuming percentages are correct and my battery’s 55 Wh,

  • deep sleep with USB-A drains around 3.3% battery / hour, or 1.8 watts
  • deep sleep without USB-A drains around 0.95% battery / hour, or 0.5 watts
  • s2idle sleep with USB-A drains 1.8% battery / hour, or about 1 watt
  • s2idle sleep without USB-A drains 1.6% battery / hour, or 0.9 watts

With USB-A cards plugged in, I get lower power usage while sleeping with s2idle selected than with deep.

If I could somehow get around 0.5 watts/hour or less battery drain while in s2idle (it’s nice having the laptop come back up without a delay), or get maybe half that with deep sleep, leaving the USB-A ports in, I’d be pretty happy. Even 1% per hour is a noticeable loss overnight, nevermind if you leave your laptop the better part of a 24 hour period.

1 Like

Hmm. I will put this into my testing calendar.

  • Please list your boot parameters used when seeing this?
  • What tool are you using to track the wattage (asking as powertop is not that great, I recommend powerstat if you’re not already to compare the data.

Recently i got email from frame.work that there is new firmware released for DP modules and there are new HDMI modules in production with fixed powerdrain. Does it mean that this issues with powerdrain in sleep should be solved by that?

It will help with the drain from those modules, yes.

1 Like

My boot parameters are, from dmesg:

[ 0.000000] Command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.2.15-200.fc37.x86_64 root=UUID=f6df2103-a8db-456a-bc97-bdfb3a031302 ro rootflags=subvol=root rhgb quiet mem_sleep_default=s2idle nvme.noacpi=1

The tools I was using were KDE’s default battery indicator in the system tray and post-it notes :wink:

Those wattages are estimated averages, based on the battery percentage changes over time while I left the laptop asleep, usually for an 8ish hour period. Could be a ways off, since I’m assuming the percentages are right and I’m assuming 1% of the battery == 0.55 Wh, but I’d expect them to be representative relative to each other.

I could attempt a more rigorous approach if that’s useful, cycle the battery first to maybe calibrate it, invoke a tool or a script.

Your numbers are within margin of error with the rest of the community with the 11th gen. Any non-USB-C card seems to drain the battery.

I assume you’ve seen this:

and this:

Best case is with full usb-C cards only. Draining around 0.3w…but still rather far off from other competition of the same period (11th gen):

1 Like

Yeah, thanks. I might’ve overlooked the Windows thread… mainly was posting just to gently pile on and help this issue remain recognized as definitely still present and relevant. Over the course of months (for sure years), it’s very easy for intractable problems to slide farther and farther from the center of focus. It does sound like these issues can be addressed, albeit with difficulty.

That and I didn’t think a little repetition about USB-A cards in particular would hurt, vs. HDMI and DisplayPort, which I think have been worked around already. (And the s2idle thing is just weird, thought maybe I’d overlooked something there.)

1 Like

Has anyone noticed an improvement here recently? I’m using Archlinux with kernel version 6.3.1 and the s2idle sleep mode. All four of my USB modules are USB-C. It’s otherwise an OG Framework with a i7-1165G7 CPU. I haven’t done any firmware upgrades in a while. My BIOS version is 03.07.

I haven’t done any careful measurements yet, but it seems like suspending uses a lot less battery than it was previously just a few weeks ago. (Probably before a kernel upgrade.) I left it unplugged for several hours today. When I went back to it, I realized what I had done and figured my battery would be at 50-60%. But it was still at 98%.

I’ll try another more careful experiment tonight and see what happens. But I was just curious to see if anyone else noticed any improvements and what might have changed.

Yes, things have improved. I just redid some measurements and the situation is indeed better than a year ago:

Unfortunately, USB-A and HDMI cards still force a significant drain compared to just USB-C (I think @nrp thought BIOS 3.17 should have improved the USB-A situation, but I did not see that reflected in my test), but that should not be an issue for you.

Hah, well, I’d prefer to have my HDMI and USB-A modules in (with 2 USB-C modules), but I swapped them out precisely because of this issue. But assuming things got substantially better, I’ll take the win with 4 USB-C modules.