Librem 5 charging behavior question

Hello everyone,

A year and a half ago, I replaced by old battery (that had by then almost 1000 cycles and 2/3 of original capacity left) with a new one brought by a friend from the US.

With the intention of having it last longer, I always have my phone plugged in when at home (even when I am using it), and I usually go up and down between 10% and 20% per day. Hardly ever I run errands that would have me away from a charger for more than one hour.

I also have set, from new, the new battery charging current to 1000000 and constant charge voltage to 4000000 at /sys/class/power_supply/bq25890-charger-0 and I thought I was good to go.

Last week, I went out and found my phone discharging quite too fast and found out that I had 6.000 cycles on the battery already and it is in a way worst state that the original battery I didn’t care about at all.

Where did I go stupid? How would the phone behave always connected the way I have it set?

Thanks, as always!

If you’re rarely fully discharging, the battery gauge has very little data to infer the battery health from. Setting the constant charge voltage lower will also likely disturb its calculations a bit (and, obviously, reduce the available capacity), as the gauge is a separate component to the charger and has no idea how the charger is being configured - it can only observe the current flowing from or to it. I’d say it’s quite likely that what you’re seeing is just a reporting artifact and if you were to actually measure the available capacity of the battery it may give you different results.

The battery is rated 4500mAh at 4.35V. The phone is charging it up to 4.2V due to requirements of some of its components, which reduces the capacity of a perfectly healthy battery to something around 4200mAh already. If you go down even further to 4V, you’ll likely end up at somewhere around 3500mAh or so, so a perfectly calibrated gauge will report battery health to be at 80% right from the start as it’s configured to take 4200mAh as the baseline - and it will only go down from there.

Maybe that is the key word. If adjusting the charge voltage downwards then check the battery right then after charging to see what the battery health is reported as and then take that as the unofficial baseline for comparison with 18 months later.

…and you need to read that out right after at least one full undisturbed discharge-charge cycle as otherwise you’ll be reading the gauge’s best guess rather than any measurement.

Thanks for the information, as always. I will do a full cycle. So I am probably ok.

What about the cycle counter?

Wouldn’t trust it either in such case, could be that the gauge interpreted some measurement noise as (dis)charging when the device was predominantly powered from USB.

Unless you go out of your way to disable the indicator, charging can only happen when the red LED is shining. If it doesn’t, you know that the battery isn’t being charged. So I’ll leave it up to your judgement to decide whether 6000 cycles is a plausible value given your usage :wink:

Yay! That’s great to know. The phone sits on my desk and the LED is never on.

I’m going out tonight and I will let it flat out rather than put it to charge when I get home, then let it charge fully. But then it should be ok, as my battery still lasts long and the gauge going down fast was just probably hallucination by the counter according to your explanations.

I will report back.

@dos I’ve just noticed the lightning indicator coming up when using the phone connected to power (and the LED off). A quick visit to the terminal and settings and yes, the system believes the battery is being charged and the LED is fully off. Let’s see.

Definitely 6000 cycles doesn’t make any sense.:grinning_face_with_smiling_eyes:

Generally, the gauge is expected to report the capacity of 100% whenever the battery is fully charged, regardless of its current health. It uses a bunch of heuristics to determine an end-of-charge event, so it’s not fully accurate, but IME it works most of the time. At that point, it refreshes its guesses about battery capacity and health.

I’m guessing that with your settings you’re not seeing it ever reach 100% or even 99% - is that right?

You are correct. With my settings, I usually see between 60 and 70%. I’d be a bit more careless with my batteries if they were easily available in Europe.

I did some tests. After removing my settings, it goes to 100%. I can go about the day normally (suspend after 5 minutes, light browsing, checking a map here and there) and be home in the evening with 10-15% early evening, which is my historical average.

Now when I restore my settings, it is charging to 73%. I think I am ok but it is showing now 8600+ cycles. =)))))

Wait - by “cycles” you mean the raw value from cycle_count? Its unit is 1 percentage point, so a full charge/discharge cycle will increment it by 100.

In Linux, the property is documented as:

What:           /sys/class/power_supply/<supply_name>/cycle_count
Date:           January 2010
Contact:        linux-pm@vger.kernel.org
Description:
                Reports the number of full charge + discharge cycles the
                battery has undergone.

                Access: Read

                Valid values:
                        Integer > 0: representing full cycles
                        Integer = 0: cycle_count info is not available

…so the driver should probably divide the value by 100. It doesn’t do it at the moment.

        case POWER_SUPPLY_PROP_CYCLE_COUNT:
                ret = regmap_read(map, MAX17042_Cycles, &data);
                if (ret < 0)
                        return ret;

                val->intval = data;
                break;
cat /sys/class/power_supply/max170xx_battery/cycle_count -> 8988

So call that 90 full charge cycles from 0% to 100% or whatever number of actual charge cycles is equivalent to that for your chosen (formal or informal) percentage limits - and by “equivalent” I really just mean mathematically equivalent, not necessarily equivalent in terms of how tired the battery is. :wink:

Well, I am glad the battery is fine. However, I recall on my prehistorical ThinkPad W530 seeing 800-900 when fetching the values via upower rather than 342340 cycles, so I find it weird.

In any case, my battery seems fine and I got scared for nothing. Now I know that what counts is the LED light so I will mark dos’ answer as the solution. Thanks, all.

Now we are at 9135 cycles. =)

upower -i $( upower -e | head -n 2 | tail -n 1 )

To see my battery info. And i have 13300 Charges and only a capacity of 13.7187 Wh even it was designed to have 17.6365 Wh.

Try to have a battery in the 30 to 70 Percentage every time and avoid some exposition about a temperature above 35 to 40 and more degrees of Celsius.

Edit: The stuff in the $( … ) was just to address my upower -e battery file location " /org/freedesktop/UPower/devices/battery_max170xx_battery "

So, it doesn’t harm the battery if the device stays on all the time and remains plugged in continuously?

I have an energy-full value of 14.6005 Wh, meaning the battery is already down to just 82% of its original capacity after only 33 full charge cycles.

BTW We need some affordable batteries with low shipping costs, especially for the European market…

Also, please remember that the cycle counter resets whenever you take the battery out. If it shows 33 cycles, it means 33 cycles have been accumulated since the battery was put in, not that the battery experienced 33 cycles in its lifetime.

Is it documented somewhere? I once used an external charger with my second battery, and now I understand that I was just lucky to avoid burning my phone. :fearful:

I do not know the code or algorithm for charging the battery. But if it did not fit your special use case it will likely harm it. Like i said: Good Battery usage is 30 to 70 Percent and not exposed to heat over 35 degrees C or extreme cold.

I load my L5 too much likely because i love it and use it large time every day. If you use it every time from a connected power supply or kind of a docking station you should use it without battery and if you like to keep the battery healthy insert it and drop the power supply daily keep the percent loading state between 30 and 70 or 80 percent.

But you could still waste the battery hardware and buy a new one since purism offer some new one.

Here right now i have just some Dirt in my charging slot and kind of broken usb-c cable since the plastic got old and be shredded. But still works fine.

Like not using the manual shared definition of open source available information? But i understand. If you try to use the phone like every user do it will be complicated.