[TRACKING] Battery flipping between charging and discharging / Draws from battery even on AC

With AC connected and battery charge at the set threshold, the battery status as reported by the kernel often flips between charging and discharging, sometimes even within one or two seconds. (This can be seen using the Gnome battery icon or upower -d). AC is always reported as online.

This also means I get a constant stream of udev events starting tlp, which then notices that AC is still online and does nothing, but this could probably be solved by tweaking udev rules.

Some more observations:

  • I’ve set the charge threshold to 60% but the same happens at 100%.
  • Under normal load, the LED stays white (no pulsing).
  • This happens with the official charger (65 W) and with my CalDigit TS 4 dock (reported to deliver 97 W).
  • The flipping happens more frequently when I put the laptop under stress. On both chargers, when I start some CPU heavy process, I see that some power is used from the battery, and the LED switches to amber (no pulsing). The wattage reduces slowly and goes back to 0 W after some time. Under heavy load, I get higher temperatures and louder fans with the 97 W charger.
  • This is on Arch Linux, Kernel 5.19.7.

This on 12th generation.

Is the constant flipping of status expected? There are other threads about this (Manjaro Issue Detecting Plugged-In States - #6 by Jake_Naviasky and Charging / discharging notification on mxlinux), but it’s not clear to me if this is a bug or just expected.

Is it true that even the 97 W supply is not enough to deliver enough power to run the laptop at full speed (because it still draws from the battery)? Can I some check how much power it actually delivers?

5 Likes

How can I check?

You can buy a power outlet meter online for less than $20. They’re not perfect, but it should at least tell you if it’s close to the expected power delivery. There’s probably a solution I’m not thinking of that doesn’t require spending extra money, but IMO it’s a useful thing to have anyway.

1 Like

You can buy a power outlet meter online for less than $20. They’re not perfect, but it should at least tell you if it’s close to the expected power delivery.

But this would measure the input and not the output of the supply? I have a multimeter here but well, I can’t just use it to measure the USB-C lines.

I may get an outlet meter but for now, my primary concern is the flipping battery indication, in particular because I see this also with the official supply. I’d be very interested if other people see the same on their system. I’m concerned that this constant charging/discharging kills the battery.

This charging / discharging flip-flop has been a known issue from 11th gen days…Framework has yet to officially response / acknowledge the behaviour / issue / characteristic.

Even with a 90W USB-PD charger, I still see this behaviour. i.e. The system doesn’t know when NOT to draw power from the battery (leave the battery alone), it seems.

The state of power [management / behaviour] with the laptop is pretty sad (suspend power consumption, overall battery runtime, sleep consistency, USB over current protection - too trigger happy, USB-PD unplug triggers wake from sleep, charge / discharge flip-flop).

2 Likes

Oh interesting, I missed that thread.

Just confirming, do you see this also with the threshold set to 100%?

Yes, it would be nice to have some kind of official statement if this behavior is expected and/or if there are plans to implement a more clever charging logic.

I went to set the threshold back to 100 (from 76), saved & exit. Rebooted. Plug in USB-PD, waited for the battery to get fully charged. Then repeated my looping stress-pause-repeat test. Currently not seeing the flip-flop behaviour.

For me, I only really noticed it when I had a lower-than-100 threshold set.

Going to do a longer test…

Update: Yes, I’m seeing the flip-flop behaviour even with 100% threshold. This happens when the CPU goes into repeated boost…and when that happens, the battery is discharged at around 5-10w (i.e. negative charge rate) during that boost period. and the battery charge would dip from 100 to 99.7%…then it goes into charging…back up to 100%.

1 Like

One other thing I noticed during my testing:
When Windows reports the battery is 100% fully charged, it actually isn’t (according to HWInfo). There seems to be some really small charging that still goes on for about 30-45 minutes before the battery is finally settled down.

My issue is with the “Fully charged” discrepancy due to Windows decision to round up. (Fully charged is a lie during that period)

1 Like

I see this constant flipping too, with 12th gen running openSUSE Tumbleweed Linux. It’s pretty annoying. Surely there’s nothing magic about Framework power management which would be so different to other laptops to require this?

1 Like

I have the same constant flipping issue on Fedora 37 with 12th generation.

Never experienced this myself on multiple Framework laptops. But I have heard others have seen this occasionally.

Test a live usb of Ubuntu or Fedora. If it happens there, likely need to open a ticket so we can take a look at the logs, etc.

Actually both. I turned off the notification, because it’s annoying every time to see it. But I see how the charge icon flipping at the tray and LED slightly changes the color as well.

1 Like

Try to load CPU at least 30% for a while.

Not able to replicate it here on Fedora 37, left it running under a decent load.

This feels like a bad battery or something related to hardware. I say this as:

Please open a support ticket and let them know what you’re seeing with the LED lighting.

Is the issue here that when it’s plugged in and nearly at full or full capacity it switches constantly between AC power and recharging the battery? I’m on windows 10 and this has happened to me a bit (11th gen).

So I might have recently experienced this too, it was brief and caught me by surprise so I didn’t check if the charge indicator LED changed colour and the battery is always reported as charging in the UI so I didn’t think to check that. I have a 75% charge limit, 11th gen i5 3.10 BIOS.

I was watching a 1080p/60 youtube video (normally I would watch at 720p/30) when out of nowhere I started to see battery drain. I happened to be looking at battery voltage using GTKStressTesting during this time:

I then checked Gnome power statistics which normally shows “There is no data to display” when running solely of mains.

I also happened to be running s-tui during the video playback which reported 15W psys so well within the 60W available from the adapter.

I will see if I can replicate it.

I just received my Framework laptop last week and immediately noticed that the battery never gets to the fully charged state. It’s always either “charging” or “discharging”. I’m on BIOS 3.04 and running Fedora 37.

This occurs no matter what value the battery charging threshold is set to. Testing with battery threshold at 100, upower reports the following when fully-charged and plugged in:

$ upower -i /org/freedesktop/UPower/devices/battery_BAT1
  native-path:          BAT1
  vendor:               NVT
  model:                Framewo
  serial:               000F
  power supply:         yes
  updated:              Sun 19 Mar 2023 07:53:22 AM EDT (0 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              54.593 Wh
    energy-empty:        0 Wh
    energy-full:         54.593 Wh
    energy-full-design:  55.0088 Wh
    energy-rate:         3.542 W
    voltage:             17.608 V
    charge-cycles:       1
    time to empty:       15.4 hours
    percentage:          100%
    capacity:            99.2441%
    technology:          lithium-ion
    icon-name:          'battery-full-symbolic'
  History (rate):
    1679226802	3.542	discharging
    1679226772	3.573	discharging
    1679226742	3.634	discharging
    1679226712	3.696	discharging

Note the state is “discharging”, when it should be “fully-charged”. In other words, from the perspective of sysfs, there is no condition in which /sys/class/power_supply/BAT1/status will report “Full”.

Is this a limitation of the embedded controller or am I dealing with a hardware issue?


Possibly-related threads:

1 Like

Personally I think the charger being used has something to do with it. Are you using the “Framework Charger”? If so I recommend getting something with a higher rated power delivery. When charging off of my Anker 737 this behavior went away, also in some situations updating to the latest UEFI helped as well. Simply the 60w charger cannot and will not provide all the needed power on a 12th gen board. I measure up to just over 74w of draw with an inline power tester, you wont get that on a 60w charger. Basically my suspicion is anytime it turboboosts for more than 5 seconds or so it switches over to battery to make up the difference.

2 Likes

I do not believe this is the cause even limiting the CPU to 15W and keeping total system consumption well within the 60W output this behaviour is still occurring.