GPU power drops when over BIOS-set maximum charge

SOLUTION FOUND

  • When the charge is above the BIOS-set maximum, whether due to the battery life saver BIOS setting or due to manually setting the maximum lower than the current charge, the EC charge controller will set the charging state to DISCHARGE, which acts exactly as if you’d physically unplugged the device, putting it into a low power state.
  • You can resolve this in two ways:
    • turn off the feature and set the maximum charge to something lower than 100% (I’ve picked 70%). This will generally prevent this state from getting triggered in this way
    • When gaming, use ectool to manually change the charge state to IDLE by running sudo ectool chargecontrol IDLE. If you do this, just remember to set it back to NORMAL afterwards to allow the battery to charge back up to full.

ORIGINAL POST:

I’m hoping that someone else can reproduce this, as I finally have enough information to accurately and consistently reproduce this myself.

Hardware: FW 16 with dGPU and the 7940HS mainboard
RAM: 64GB 32x2
SSD: 1TB SSD, WD Black (purchased with FW)
OS: Bazzite (but reproduced on Fedora 41 Live USB as well)

When gaming, if the maximum charge is above the BIOS set maximum (I’ll get to how this happens in a minute), then the iGPU and dGPU wattage drops drastically, causing low FPS and other issues even outside the game. I have had this issue since the latest BIOS 3.05 update, but only recently figured out what exactly was causing it, as it appeared to be totally random (it’s not).

Straightforward steps to reproduce:

  1. Charge laptop to 100%
  2. Set the maximum battery life to something lower (i.e. 80%)
  3. Play a game (in my case Minecraft with shaders), basically something to “push” your system hard.
  4. very shortly, you should experience lag, low FPS, programs crashing, and possible audio glitches. Here’s a video of what happens to me under these circumstances: https://youtu.be/LsLGI1YMoW0
  5. The instant that the battery reaches the limit you set (80% in this example), the glitch will suddenly disappear and stay gone

Here’s why it appeared to be totally random:

  • I had the maximum charge set to 100%
  • I had the battery life saver enabled (which it is by default)

At first it was extremely random. It would sometimes happen multiple times a day, and sometimes would disappear for days on end. I finally realized that one thing was consistent, though it took me months to realize: unplugging the laptop would cause this to happen, and if it stayed plugged in for long enough, it disappeared.

Why did this cause this issue? Basically, with the battery saver enabled, every so often, the maximum charge threshold will be reduced by some amount. Maybe 5%, maybe less, I’m not sure. For a brief period of time after that reduction occurs, the laptop will be above the maximum charge, causing the glitch for however long it takes to drop the charge by that amount. If you play a very power-hungry game, this will be extremely short or even happen so fast it doesn’t visibly occur at all. However, if you play a game that isn’t all that power hungry, you might actually notice it due to the power dropping slower.

This happened primarily in Balanced and Performance profiles, but much more infrequently in Battery Saver. I believe this is because battery saver is battery-aware and that somehow interacts with whatever’s at the root of this issue.

I have been in contact with FW support since February, and I want to have a single point of reference for all of this information going forward, so here are all of the symptoms and non-symptoms I noticed and what I believe that rules out.

  • Software/OS: I have reproduced this on Bazzite and Fedora 41 Live USB. I don’t have Windows, so I haven’t tested that. It may be specific to Linux, but I don’t know. Since it presents itself as a BIOS thing, I doubt it.
  • Thermal Throttling: All thermals are well within acceptable limits before, during, and after the issue
  • RAM Throttling: Only 20% of my total RAM is ever in use during this entire process
  • CPU Throttling: This one is interesting. When playing the game, the CPU cores are as expected. One core is more used than the others, and the rest are mostly unused due to games being single-threaded. However, you’ll see in this video I took that during the issue, in certain situations, all CPU cores will suddenly go completely maxed out, even though the game is single-threaded. Mega weird, and I don’t know what causes this, but I do think this is why other programs (like my audio mixer) crash when this happens.
  • Battery Issues: As mentioned above, somehow the battery level is responsible. I don’t know why, but when the battery level is above the BIOS-set maximum, the issue occurs for the entire duration of time that it remains above the set value. It’s not specifically a high-power or low-power issue, simply being above the set value. Basically, I don’t think this is a TDP issue.
  • Problematic RAM: I tried a ram shuffle at Framework Support’s request, but that didn’t have any affect
  • Problematic SSD: I have reproduced this on two different SSDs and one Live USB
  • Disk encryption: I have tried this with and without disk encryption
  • Expansion Card Issues: I can reproduce this issue both with and without any expansion cards plugged in.

For a while, I thought this only occurred with Albion Online, which sent me into a wild goose chase tracking down whether it was Albion’s fault. However, my hypothesis is that because Albion is not a power-hungry game, the battery spent more time being above the maximum charge like I mentioned before, while games like GTFO would drain that amount much more quickly, making it less likely for the bug to trigger or simply to resolve itself so quickly it wasn’t noticed.

If anyone is able to reproduce this (or better yet, if you’ve found a proper fix), I would be extremely grateful, as I worry that there may be a hardware issue occurring making this unique to my machine.

If you have seen this on your machine, I have a workaround for you that is perfectly acceptable!

  1. Turn off the battery lifetime saver in BIOS
  2. Set the maximum battery life to something lower than 100% (I chose 60%, but really anything should work)

For some reason, being set to 100%, even with battery life saver off this issue occasionally occurs. I don’t know why.

I will continue to update/edit this post with everything I’ve tried as I attempt more things. Since I have found quite a good workaround though, they likely won’t be frequent.

I have opened a bug report, as this seems likely to be a BIOS bug: GitHub · Where software is built

This is great feedback for the development team at Framework. Consider filing a bug report at the Framework Github for their BIOS. Upon first reading this my thoughts are that something is being communicated to the EC, then the charge controller, to the power controller, to the system, and a feedback loop or a timeout is occuring. Only then does a watchdog timer go off and then something else happens. I would estimate that this behavior is OS agnostic as well. There is still lots of little refinements for the BIOS team to be going through and this one may have slipped their testing with the complexity of conditions. Good on you for narrowing it down. Let us know how it progreses!

That’s a great idea, I forgot the BIOS issue tracker was on github, thanks for the reminder!

created! :smiley:

Have you sent this thread A call on 240w adapter - #241 by James3
It helps if you set chargemode to idle.
You can start reading it couple post above the one which I linked. Guys made phenomenal work modifining EC and ectool to be able debug that issue

What you describe is normal behaviour.
When in “forced discharge” mode, the laptop behaves like you have unplugged the psu, until it reduces the charge down to your charge limit.
Note also, that performance is reduced at 60% and below in favour of longer battery life, so probably best to set battery limit to 70 or 80%.

1 Like

If this is expected behavior, then it’s problematic behavior, as when using the battery life saver functionality, this causes games to become extraordinarily glitchy whenever the max charge drops, as there is a short time when the laptop will be over that value. Also, I’m pretty sure that this behavior is much worse than simply being unplugged, but that’s a great thing to try. I’ll see if being unplugged has better or the same performance as what I’ve been describing and update the post :slight_smile:

Update: I used ectool to check the charge state and you’re 100% right, it switches to “discharging” when above the BIOS maximum. Imo this is insane if this is intended, as while gaming this means absurdly poor performance “randomly” if using the battery life saver feature, since it effectively forcibly unplugs the laptop once in a while, even while under load, causing glitches and software crashes

This all seems to be related primarily to the 240W chargers that came out this year? I’m using the stock 180W charger

oh shoot, yeah! Unplugging the device has the same effect as far as I can tell! It even spikes the CPU (still don’t know why thats happening), and both GPUs wattage drops. Let me charge my laptop higher and trigger the original issue and try the ectool thing from your thread. I want to see if this is precisely the same issue :smiley:

wow, that had an immediate affect. Fascinating! So what now then, is there a better workaround that involves using ectool, or is my workaround of just keeping the battery lower and not using the life-saver feature one of the better ones?

@Obasav (I’m pinging you since you replied in a dm instead of in the thread) using sudo ectool chargecontrol idle worked perfectly, but I’m curious though, the thread you and others have pointed out all mention this mainly being an issue with using 240W chargers, however I’m using my stock FW 180W one? Does that imply mine is defective or is this actually an issue across the board?

Over on this thread:

Someone has been experimenting, and they managed to draw 497 Watts while loading up the system on a FW16 with dGPU and a 240W PSU.

So, I don’t think there is an issue with the 240W PSU. Its always going to want PSU + Battery when playing a game that needs more than 200W.
Similarly for a 180W PSU.

The “IDLE” state is the best state to be in when playing games, as it can draw from both the PSU and the Battery.
The “DISCHARGE” state can only draw from the battery, and ignores the PSU.
The “NORMAL” state means it would try to re-charge the battery from the PSU, thus leaving less for games.

This is why “ectool chargecontrol idle” is so useful. It tries to take it out of “DISCHARGE” mode and put it in “IDLE” mode.

That makes sense. Do we know if the state being “discharge” while above BIOS maximum is intended or a bug? It seems like allowing the PC to drop power states while under load due to the battery lifetime saver feature occasionally dropping the max charge is a pretty upsetting bug to me, not a feature

The “DISCHARGE” is a “feature” apparently.

Oof :sob:

I’ll try for over 500 next time :laughing:

I think it’s just in general it’s a very power hungry laptop. I pulled 497 when really trying to push it, but I’m sure it’s possible to use significantly less or even more depending on what you do. I think it’s marvelous the laptop can use that much, without breaking a sweat. It certainly can cause a lot of headaches though, as seen in the forums.

1 Like

See what’s interesting tho, and please correct me if I’m misunderstanding, this is way outside my normal understanding, but this has less to do with how much power you can draw (at least my issue is), and more to do with the “feature” that is putting the charge profile into “discharge” when over the BIOS-set maximum. As in, this would occur completely regardless of whether I was using the GPU, it’s just that it’s extremely noticeable when using it, since it has such a drastic drop in capabilities during that period.

I feel like “idle” would be a way better thing to swap it to instead of discharging, since the battery would still drain, just not so quickly

A summary of what’s going on and the solutions (thank you @James3, @wojciech_migas, and @Obasav):

When the charge is above the BIOS-set maximum, whether due to the battery life saver BIOS setting or due to manually setting the maximum lower than the current charge, the EC charge controller will set the charging state to DISCHARGE, which acts exactly as if you’d physically unplugged the device, putting it into a low power state.

You can resolve this in two ways:

  • turn off the feature and set the maximum charge to something lower than 100% (I’ve picked 70%). This will generally prevent this state from getting triggered in this way.
  • When gaming, use ectool to manually change the charge state to IDLE by running sudo ectool chargecontrol IDLE. If you do this, just remember to set it back to NORMAL afterwards to allow the battery to charge back up to full.
1 Like

I do want to know though, will setting the charge state to IDLE too long cause the laptop to power off due to low battery, or will it stay on even at 0%?

You can use “sudo ectool chargecontrol” to see what state it is in.
IDLE is pull power from psu + battery.
NORMAL is charge if the psu is connected.
DISCHARGE is discharge battery as if psu is disconnected.

As charge drops, the IDLE mode should automatically switch to NORMAL once it reaches battery limit - 5.

Lithium ion batteries degrade life a bit quicker below 30%, so try to keep the battery above that.
A 0% lithium ion battery can cause the battery to completely fail, so avoid that.

1 Like