Graph of the battery charge level

Yes, and I think my post here is already pretty much complete when it comes to that:

Something isn’t clear there yet?

(btw. I added “during charging” to my previous post in case it wasn’t clear what I meant)

Your post was very clear and I did this as you adviced.

Could we get a patched version in the Purism Librem 5 repo?

1 Like

I guess merge requests eventually merge …

What does the value for capacity mean:

upower -d
    state:               discharging
    warning-level:       none
    energy:              11.5609 Wh
    energy-empty:        0 Wh
    energy-full:         12.7091 Wh
    energy-full-design:  13.8572 Wh
    energy-rate:         1.4414 W
    voltage:             3.94406 V
    time to empty:       8.0 hours
    percentage:          90%
    temperature:         26.7 degrees C
    capacity:            89.5%
    technology:          lithium-ion

Difference between energy-full and energy-full-design. Basically what the gauge thinks is the actual battery capacity in relation to stated design capacity. energy-full gets updated after every full charge cycle.


$ bc
>>> scale=5
>>> 12.7091*100/13.8572

and how could I increase this percentage?

The arrow of time usually points in a single direction :stuck_out_tongue:

1 Like

I’ve read about astrophysicans saying that time goes also backwarts.

I used the original L5 power supply and a special trick which improved capacity already from 89.5% to 92.5%.

In this reference frame…lol. Time doesn’t move for photons, there’s a real brain tickler.

As I said above, that value is determined by gauge’s heuristics and is updated at the end of charging cycle, so if your gauge is still calibrating it will likely fluctuate a bit. That said, this is simply a not-100%-accurate representation of the actual physical property, and that physical property tends to only go down over time with battery age. Seems like your gauge simply took a pessimistic stance at first ;]

When the L5 is fully charged from the original power supply and the red LED goes off, I power it down by SSH with sudo systemctl poweroff and without disconnecting the power supply from the L5. As you can see in the photo below, it keeps charging with 5.231V and 0.087A which is nearly 0.5W. A reboot after half hour shows now:

    energy-full:         12.9961 Wh
    energy-full-design:  13.8572 Wh
    energy-rate:         0.705233 W
    voltage:             4.20969 V
    percentage:          100%
    temperature:         31.2 degrees C
    capacity:            93.7143%

1 Like

Great job done there (please do not forget to mark your last post here as solution)!

Also (IMO), there is no charging of battery going on after red LED light off (although around 0.9A shown, in range from 5.00V up to 5.30V relates to which power supply used there), yet repeating (up to your description) two or three times sudo systemctl poweroff and power on over power button (power supply still connected) will get your inserted battery to 100% (I’m quite sure, just follow when red LED light present, leave Librem 5 charging, either with OS showing 100% yet red LED light still … or when phone powered of). Thanks for your post as now I’m quite sure (as well) that actually repeated boot into this great Linux Kernel adjusts what you were into in this thread:


P.S. Your BPP-L503 battery cell (1S) is still fine (but you need to test my advice as above at first place, from time to time, monthly perhaps).

PureOS Kernel is not only supposed to read actual BPP-L503 battery cell voltage/capacity, this Linux Kernel indeed “configures the gauge with correct values” or reads exact stage (capacity number for example) from within Librem 5 belonging battery, from the very precise bq25890-charger connected to the inserted Librem 5 battery (even when brand new fully charged to exactly 4.20V or properly serviced one just inserted) during booting phase into PureOS GUI. IMHO, here related Linux Kernel does what supposed although other HW related questions being quite complex to be understood right out-of-the-box as self-explanatory (for any end-user):

Perhaps right time to clone/upgrade:, and if not, etc., just my two cents anyway.

TPS65982 and BQ25895 are unrelated to what we’re talking about here. It’s all about the battery gauge (MAX17055), which monitors the current flowing through the battery and its voltage to determine its state of charge.

MAX17055 needs to know the expected battery capacity (and a few other things) to work correctly, but it loses its configuration and goes back to its default (incorrect) values when the power is taken away from it by taking the battery out. So when the kernel notices that MAX17055 is uninitialized at boot, it reads the design capacity from the device tree (plus other things needed by the gauge like sense resistor value, which also varies across hw revisions) and configures the gauge with it.


Thanks! And in addition, your kind reply, fuel gauge related, brought me to this important update: “I know you missed our kernel reports lately but even if you can’t believe it, we haven’t forgotten about them.Purism and Linux 5.19 to 6.1 article link is here:

My L5 shows now:

upower -d
    present:             yes
    rechargeable:        yes
    state:               fully-charged
    warning-level:       none
    energy:              14.3521 Wh
    energy-empty:        0 Wh
    energy-full:         14.362 Wh
    energy-full-design:  13.8572 Wh
    energy-rate:         0.0402105 W
    voltage:             4.15969 V
    percentage:          100%
    temperature:         32.8 degrees C
    capacity:            100%
    technology:          lithium-ion
    icon-name:          'battery-full-charged-symbolic'
1 Like

It seems to me that the energy-full value deviates over time, from being exactly as or close to energy-full-design after calibration it gradually increases. Currently my energy-full is at 16.6485 Wh.

It may increase if you often plug it in while the battery is already nearly full - but that’s just because of gauge’s inaccuracy.

1 Like

Indeed I do. Feels good to have as full a tank as possible because I am often not sure when I will be away from the filling station…