[ltp] Battery recalibration (was: T470 multi-battery, discharging order)

Kevin Locke kevin at kevinlocke.name
Mon Apr 4 17:44:02 CEST 2022


Hi Axel,

Thanks for the updates and info about your results!

On Mon, 2022-04-04 at 15:57 +0200, Axel Braun wrote:
> Am Mittwoch, 30. März 2022, 16:22:43 CEST schrieb Kevin Locke:
>> On a T470 with kernel 5.16.15 you'd likely want to install tpacpi-bat
>> with the acpi_call kernel module, as described in Diego's reply, then
>> run `tpacpi-bat -g FD 1` to force-discharge battery 1.  However, if
>> you can upgrade to Linux 5.17, no additional software or modules are
>> required and the process should be as simple as:
>> 
>> if charge thresholds are being used, clear them during recalibration:
>>     echo 0 >/sys/class/power_supply/BAT0/charge_control_start_threshold
>>     echo 100 >/sys/class/power_supply/BAT0/charge_control_end_threshold
>> echo force-discharge >/sys/class/power_supply/BAT0/charge_behaviour
>> # Wait until battery is fully discharged
>> # Wait until battery is fully recharged
>> # Restore change thresholds as desired
> 
> While this worked well for the T520, the result on the X1E was in so far 
> disappointing as at the end of the discharge process the Laptop just switched 
> off, despite power was connected. Obviously the charge_control_start_threshold 
> should be above 0.

That's an interesting difference in behavior.  Be aware that, at least
on my T430, charge_behaviour takes precedence over
charge_control_start_threshold[1] (status remains Discharging below
the start threshold), so it may not prevent power loss.  (However, I
haven't tested how 0% start threshold behaves.  It may indeed
cause/avoid power loss.  I'd be curious to hear about it.)

>> Of course, if you have physical access to the machine, you could
>> recalibrate without software by simply disconnecting AC power,
>> discharging the battery, then reconnecting.
> 
> Sure, tried that as well. Nice to see that one can gain some percent of 
> capacity back. Although I was of the impression that driving down a LiIon 
> battery to Zero is not something that LiIon likes....

As a non-expert, my understanding is that, under normal conditions,
the over-discharge circuit will disconnect the cells before the
voltage becomes low enough to damage them.  However, there may be some
risk to old/damaged/unreliable cells or of tripping the protection
circuitry.  I'm not sure whether fully discharging the battery is
likely to shorten its life more than normal use, but it wouldn't
surprise me.

I'm also not sure when (or if?) recalibration is generally advisable.
Likely only after prolonged use (years?) without significant
discharge, which is likely to lead to drift, or when there is reason
to suspect it is incorrect.

As you point out, low charge can damage LiIon cells.  I would advise
not leaving the battery in a fully discharged state where leakage
could lead to permanent damage.  Recharging the battery promptly after
fully discharging it seems highly advisable.  Thanks for pointing that
out!

Cheers,
Kevin

[1]: https://lore.kernel.org/lkml/YZ%2FQMNQIe04x%2FtkF@kevinlocke.name/


More information about the Linux-Thinkpad mailing list