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

**URL:** <https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484>\
**Category:** Linux\
**Tags:** arch\
**Created:** [September 12, 2022, 10:53am UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484 "2022-09-12T10:53:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![real\_or\_random](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/real_or_random/32/10642_2.png) [@real\_or\_random](https://community.frame.work/u/real_or_random)\
**Post date:** [September 12, 2022, 10:53am UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/1 "2022-09-12T10:53:49Z")

</div>

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](http://community.frame.work/t/manjaro-issue-detecting-plugged-in-states/10558/6) and [Charging / discharging notification on mxlinux](http://community.frame.work/t/charging-discharging-notification-on-mxlinux/17563)), 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?

---

<div class="post-metadata">

**Author:** ![real\_or\_random](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/real_or_random/32/10642_2.png) [@real\_or\_random](https://community.frame.work/u/real_or_random)\
**Post date:** [September 12, 2022, 12:47pm UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/3 "2022-09-12T12:47:24Z")

</div>

> [@anon81945988](#):
>
> That seems unlikely, though just because a supply says it can provide 95W doesn’t mean it does so better off checking it’s output.

How can I check?

---

<div class="post-metadata">

**Author:** ![A\_Matty](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/a_matty/32/12057_2.png) [@A\_Matty](https://community.frame.work/u/A_Matty)\
**Post date:** [September 12, 2022, 1:23pm UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/4 "2022-09-12T13:23:25Z")

</div>

> [@real\_or\_random](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![real\_or\_random](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/real_or_random/32/10642_2.png) [@real\_or\_random](https://community.frame.work/u/real_or_random)\
**Post date:** [September 12, 2022, 1:38pm UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/5 "2022-09-12T13:38:55Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![Second\_Coming](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/second_coming/32/29330_2.png) [@Second\_Coming](https://community.frame.work/u/Second_Coming)\
**Post date:** [September 12, 2022, 6:24pm UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/7 "2022-09-12T18:24:40Z")

</div>

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.

> [@Battery Management with min/max limits possible?](http://community.frame.work/t/battery-management-with-min-max-limits-possible/19207/3):
>
> Unfortunately, there’s no min limit (Start charging threshold). In [repeated] high load / boost situations, the laptop would go into trickle charge cycles. In order to minimize occurrence of trickle charge cycles, you’ll need to get a higher wattage USB-PD charger.

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).

---

<div class="post-metadata">

**Author:** ![real\_or\_random](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/real_or_random/32/10642_2.png) [@real\_or\_random](https://community.frame.work/u/real_or_random)\
**Post date:** [September 12, 2022, 9:12pm UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/8 "2022-09-12T21:12:06Z")

</div>

Oh interesting, I missed that thread.

> [@Second\_Coming](#):
>
> 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.

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

> [@Second\_Coming](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![Second\_Coming](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/second_coming/32/29330_2.png) [@Second\_Coming](https://community.frame.work/u/Second_Coming)\
**Post date:** [September 13, 2022, 2:26am UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/9 "2022-09-13T02:26:25Z")

</div>

> [@real\_or\_random](#):
>
> Just confirming, do you see this also with the threshold set to 100%?

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%.

---

<div class="post-metadata">

**Author:** ![Second\_Coming](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/second_coming/32/29330_2.png) [@Second\_Coming](https://community.frame.work/u/Second_Coming)\
**Post date:** [September 13, 2022, 2:50pm UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/10 "2022-09-13T14:50:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Second\_Coming](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/second_coming/32/29330_2.png) [@Second\_Coming](https://community.frame.work/u/Second_Coming)\
**Post date:** [September 13, 2022, 3:27pm UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/12 "2022-09-13T15:27:31Z")

</div>

> [@anon81945988](#):
>
> No decimal, so 99.5% will read as 100%

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

---

<div class="post-metadata">

**Author:** ![Adam\_Spiers](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@Adam\_Spiers](https://community.frame.work/u/Adam_Spiers)\
**Post date:** [November 20, 2022, 4:46pm UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/13 "2022-11-20T16:46:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Rolphin](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@Rolphin](https://community.frame.work/u/Rolphin)\
**Post date:** [March 10, 2023, 7:25pm UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/14 "2023-03-10T19:25:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Matt\_Hartley](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/matt_hartley/32/13623_2.png) [@Matt\_Hartley](https://community.frame.work/u/Matt_Hartley)\
**Post date:** [March 11, 2023, 3:41am UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/15 "2023-03-11T03:41:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Rolphin](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@Rolphin](https://community.frame.work/u/Rolphin)\
**Post date:** [March 13, 2023, 10:57am UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/17 "2023-03-13T10:57:51Z")

</div>

> [@anon81945988](#):
>
> How much flipping? Is this just an internal notification or a clear LED like power switching observation?

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.

---

<div class="post-metadata">

**Author:** ![Rolphin](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@Rolphin](https://community.frame.work/u/Rolphin)\
**Post date:** [March 13, 2023, 11:01am UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/18 "2023-03-13T11:01:47Z")

</div>

> [@Matt\_Hartley](#):
>
> Never experienced this myself on multiple Framework laptops. But I have heard others have seen this occasionally.

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

---

<div class="post-metadata">

**Author:** ![Matt\_Hartley](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/matt_hartley/32/13623_2.png) [@Matt\_Hartley](https://community.frame.work/u/Matt_Hartley)\
**Post date:** [March 13, 2023, 7:49pm UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/19 "2023-03-13T19:49:42Z")

</div>

> [@Rolphin](#):
>
> 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:

> [@Rolphin](#):
>
> I see how the charge icon flipping at the tray and LED slightly changes the color as well.

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

---

<div class="post-metadata">

**Author:** ![FaultedBeing](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/faultedbeing/32/197_2.png) [@FaultedBeing](https://community.frame.work/u/FaultedBeing)\
**Post date:** [March 14, 2023, 12:11am UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/20 "2023-03-14T00:11:45Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![Usernames](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/usernames/32/40546_2.png) [@Usernames](https://community.frame.work/u/Usernames)\
**Post date:** [March 15, 2023, 12:47am UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/22 "2023-03-15T00:47:38Z")

</div>

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:

 ![2](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/2X/c/c816f1d25ffdc8da40c159a1202be9b8f676a7c1.png)

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

 ![1](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/2X/9/90eec32c2eec32e65493201378016744e977bdb2.png)

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.

---

<div class="post-metadata">

**Author:** ![Stephen\_Panicho](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/stephen_panicho/32/14209_2.png) [@Stephen\_Panicho](https://community.frame.work/u/Stephen_Panicho)\
**Post date:** [March 19, 2023, 1:24pm UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/23 "2023-03-19T13:24:24Z")

</div>

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:

```plaintext
$ 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:

> [@Exploring the Embedded Controller](http://community.frame.work/t/exploring-the-embedded-controller/12846):
>
> Hey all! wave:t2 For the past week, I’ve been exploring the embedded controller on our awesome laptops, and I’d like to share some of my findings. This is going to be somewhat structured and somewhat stream-of-consciousness, so bear with me. Most of the same findings are written up on my website at [The Framework Laptop's Embedded Controller (EC) :: HowettNET](https://www.howett.net/posts/2021-12-framework-ec/). Rationale@nrp mentioned [here](http://community.frame.work/t/free-the-ec-and-coreboot-only/791/5) that the EC firmware is based on chromium-ec, and it seemed like it would be a fun challenge to reverse…

> [@\[RESPONDED\] Battery charge control thresholds in sysfs](http://community.frame.work/t/battery-charge-control-thresholds-in-sysfs/21385):
>
> Currently we have an option to set the battery charge limit in BIOS. However, that setting is not propagated to the kernel and thus is not visible to the userspace. For example my KDE battery applet still shows the battery as charging even when upper limit is reached. Also, it incorrectly calculates the battery wear. I suppose this happens because kernel does not provide the information in sysfs: +++ Battery Status: BAT1 /sys/class/power\_supply/BAT1/manufacturer = NVT /sys/c…

---

<div class="post-metadata">

**Author:** ![nadb](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/nadb/32/12102_2.png) [@nadb](https://community.frame.work/u/nadb)\
**Post date:** [March 19, 2023, 1:47pm UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/24 "2023-03-19T13:47:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Usernames](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/usernames/32/40546_2.png) [@Usernames](https://community.frame.work/u/Usernames)\
**Post date:** [March 19, 2023, 4:26pm UTC](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484/25 "2023-03-19T16:26:21Z")

</div>

> [@nadb](#):
>
> Personally I think the charger being used has something to do with it

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.

[Next page](https://community.frame.work/t/tracking-battery-flipping-between-charging-and-discharging-draws-from-battery-even-on-ac/22484.md?page=2)
