Librem 5 battery charge calibration

My actual values are:

    energy-full:         30.1395 Wh
    energy-full-design:  13.8572 Wh
    energy-rate:         0.952684 W
    voltage:             3.87375 V
    time to empty:       28.2 hours
    percentage:          89%

which are fare away from making any sense. I have not taken out the battery since ages. And from time to time my L5 shuts down due to battery empty (because I felled into sleep). What is the best advice now to get energy-full to a reasonable value?

This is unreasonable indeed. Could you post (or send me) a graph showing your battery usage pattern from the last week? You can use gnome-power-statistics from gnome-power-manager package. Make sure to enable scale-to-fit for it as it won’t fit the screen otherwise. Here’s an example graph of how it may look like:

Also, provide the output of cat /sys/class/power_supply/max170xx_battery/uevent.

1 Like

Here we go:

1 Like

Looks like you somehow got the estimated charge_full value to be so high that the gauge stopped reliably detecting the end of charge (notice how it never reaches 100%), so it can’t adjust it down to reasonable values.

Charge the battery to full (until the red LED goes off), then turn the phone off, take the battery out for a few seconds and put it back in. Then let it discharge to 0 and charge it back to 100% afterwards. This should give the gauge enough rope to make its estimations better.

Although, to be sure: could you send another screenshot with the checkboxes at the bottom set to the same states as on my one? Smoothing may make this chart misleading.

Here is the screenshot again as requested:

And the requested output is:

purism@pureos:~$ cat /sys/class/power_supply/max170xx_battery/uevent
POWER_SUPPLY_NAME=max170xx_battery
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=6254
POWER_SUPPLY_VOLTAGE_MAX=4220000
POWER_SUPPLY_VOLTAGE_MIN=3080000
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3300000
POWER_SUPPLY_VOLTAGE_NOW=4208281
POWER_SUPPLY_VOLTAGE_AVG=4209453
POWER_SUPPLY_VOLTAGE_OCV=4025625
POWER_SUPPLY_CAPACITY=93
POWER_SUPPLY_CHARGE_FULL_DESIGN=4199160
POWER_SUPPLY_CHARGE_FULL=9133173
POWER_SUPPLY_CHARGE_NOW=8569286
POWER_SUPPLY_CHARGE_COUNTER=21895620
POWER_SUPPLY_CHARGE_TERM_CURRENT=159343
POWER_SUPPLY_TEMP=348
POWER_SUPPLY_TEMP_ALERT_MIN=-1280
POWER_SUPPLY_TEMP_ALERT_MAX=1270
POWER_SUPPLY_TEMP_MIN=-2147483648
POWER_SUPPLY_TEMP_MAX=700
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_SCOPE=System
POWER_SUPPLY_TIME_TO_EMPTY_NOW=368634
POWER_SUPPLY_CURRENT_NOW=780781
POWER_SUPPLY_CURRENT_AVG=790154
1 Like

So yeah, do as above ^^^^

Will obey and report back. :slight_smile:

I did:

1. charged full (until red LED off)
2. powered down
3. took battery off for a short moment
4. powered on (~7:20pm)
   upower -d 
   ...
   energy-full:         14.075 Wh
   energy-full-design:  13.8572 Wh
5. let it run out of power
6. reboot and charging starts at 5:52 CEST
   energy-full:         14.075 Wh
   energy-full-design:  13.8572 Wh
7. reached full (LED off, 100%) at ~9:30 CEST

@dos, I followed your procedure some days ago and as I saw that the value for energy-full is again growing, I installed a cron job:

# watch the growing value of energy-full
#
12 8-22 * * 0-6 (date ; upower -d | grep energy-full | head -2) >> /home/purism/energy-full.log

here is the log:

Sat 01 Apr 2023 11:04:57 AM CEST
    energy-full:         14.1938 Wh
    energy-full-design:  13.8572 Wh
Sat Apr  1 11:10:01 CEST 2023
    energy-full:         14.1938 Wh
    energy-full-design:  13.8572 Wh
Sat Apr  1 16:12:01 CEST 2023
    energy-full:         14.1938 Wh
    energy-full-design:  13.8572 Wh
Sat Apr  1 17:00:01 CEST 2023
    energy-full:         14.1938 Wh
    energy-full-design:  13.8572 Wh
Sat Apr  1 18:00:01 CEST 2023
    energy-full:         14.1938 Wh
    energy-full-design:  13.8572 Wh
Sat Apr  1 19:00:01 CEST 2023
    energy-full:         14.3323 Wh
    energy-full-design:  13.8572 Wh
Sat Apr  1 20:12:02 CEST 2023
    energy-full:         14.5006 Wh
    energy-full-design:  13.8572 Wh
Sat Apr  1 21:12:01 CEST 2023
    energy-full:         14.5006 Wh
    energy-full-design:  13.8572 Wh
Sat Apr  1 22:12:01 CEST 2023
    energy-full:         14.5006 Wh
    energy-full-design:  13.8572 Wh
Sun Apr  2 09:12:01 CEST 2023
    energy-full:         14.5105 Wh
    energy-full-design:  13.8572 Wh
Sun Apr  2 10:12:01 CEST 2023
    energy-full:         14.5105 Wh
    energy-full-design:  13.8572 Wh
Sun Apr  2 11:12:01 CEST 2023
    energy-full:         14.5105 Wh
    energy-full-design:  13.8572 Wh
Sun Apr  2 12:12:01 CEST 2023
    energy-full:         14.5105 Wh
    energy-full-design:  13.8572 Wh
Sun Apr  2 13:12:01 CEST 2023
    energy-full:         14.5105 Wh
    energy-full-design:  13.8572 Wh
Sun Apr  2 14:12:01 CEST 2023
    energy-full:         14.5105 Wh
    energy-full-design:  13.8572 Wh
Sun Apr  2 15:12:01 CEST 2023
    energy-full:         14.5105 Wh
    energy-full-design:  13.8572 Wh
Sun Apr  2 16:12:02 CEST 2023
    energy-full:         14.5105 Wh
    energy-full-design:  13.8572 Wh
Sun Apr  2 17:12:01 CEST 2023
    energy-full:         14.6986 Wh
    energy-full-design:  13.8572 Wh
Sun Apr  2 18:12:01 CEST 2023
    energy-full:         14.7975 Wh
    energy-full-design:  13.8572 Wh
Sun Apr  2 19:12:02 CEST 2023
    energy-full:         14.9361 Wh
    energy-full-design:  13.8572 Wh
1 Like

I am posting this in this thread too, where it belongs.
About a day ago, my L5 showed the following:

energy-full:         18,0441 Wh
energy-full-design:  13,8572 Wh

Today, I get this:

energy-full:         19,1626 Wh
energy-full-design:  13,8572 Wh

@dos Whatever the battery calibration does, even with long charging cycles (~20%->100%) it seems to notoriously fail. The phone’s energy-full has been increasing steadily over the past week.

I am at a loss here on how to operate this phone in a way where battery calibration improves instead of deteriorates over time.

1 Like

Discharging just to 20% is useless, it doesn’t give the gauge a chance to adjust itself in case of overshooting. It’s important to discharge to 0% and charge to 100% when you’re trying to calibrate the gauge.

Ok, I see, but it is rather awkward to wait out a complete battery drain before recharging. I have done that at occasions, but often the gauge doesn’t seem to be fully calibrated even after such a cycle. Am I supposed to do this discharge/recharge cycle regularly to keep the calibration where I want it to be or is it enough to do this only once in a while?

Today I charged from about 38% to red-LED-goes-off - power was turned off on the L5 - and when I disconnected and powered up, battery percentage indicator in the notifications area was “0%.”

Weird.

I powered down, removed the battery for a few seconds, then put it back in and powered up. Percentage then showed 99%.

Never had that before.

P.S. Charge time required seemed to be shorter than usual. :+1:

I have been trying to discharge my phone as much as possible before charging over several months now. Unfortunately that doesn’t seem to improve the calibration, which notoriously goes towards energy-full being upwards of 15-16 Wh in a few days.

Turning the phone off and removing/reinserting the battery resets the calibration to energy-full = enery-full-design, which to me is better than the gauge overestimating the battery’s capacity.

Is there another way to reset the calibration, e.g. by software? That would make it easier to fix the calibration issue rather than constantly emptying the battery completely before a recharge. The latter makes it very difficult to use the phone without a power bank.

I charged from 0% to 100% over night, but the battery calibration still continued to increase its deviation from the energy-full-design value. It seems to me that battery calibration is somehow broken on the L5.

Until there is a fix for this, I will continue to reset the calibration regularly by removing/reinserting the battery.

I try tomorrow to look at the calibration.

I charge the battery if i need a powered device in the next 6 hours. So i charge it daily. Sometimes in 1 of 10 times over night. And often from 5 % to 100% or from 2x% to 90%.

This way i got a reliable phone and the battery use seems to increase since the last updates. But i turn of mic, camera and Mobil every night. Right now my L5 have a less power usage as my decades old Android have.

1 Like

Last night upower on my phone showed:

    energy-full:         13,764 Wh
    energy-full-design:  13,8572 Wh

The battery charge showed 16% and I connected it to the Librtem5 charger at about 11pm and took it off the charger at about 8am at 100%. Now upower shows the following:

$ upower -d | grep energy-full | head -2
    energy-full:         14,7184 Wh
    energy-full-design:  13,8572 Wh

@dos
How am I supposed to charge my phone to avoid this upward calibration “drift”? Not charging until the battery is completely empty is not an option for me.

1 Like

This is the actual calibration i have:

energy-full:         12,4814 Wh
energy-full-design:  13,8572 Wh

Sorry to see your upwoard drift tomoqv. Just intuitive, i would charge it from 5 or 2 Percent some times to 90% only, and avoid 100% loading.

Yeah, your mileage may vary, as they say. Your charging habits wouldn’t work for me, but even when I have been close to that, my calibration still seems to drift higher.

I am also using a Nexdock quite often, which charges the phone too from whatever charge level the phone might have.

Its just a wild guess. Is it possible to use Nexdoc, without battery? However do not know how it effects Battery calibration, and the fix would be a battery manger which handle this issue of a full Battery at docking station.

From Tuxedo Notebooks i know that they hold loading to spare the batteries, by Firmware/Battery.