A battery threshold will stop the computer from charging the battery once it reaches a certain level and increase the lifespan of your battery.
Disclaimer
The following will/should only work on most IBM/Lenovo Thinkpads. If you have a Lenovo, but not a ThinkPad, this may work: https://gist.github.com/linrunner/4a687 ... 5d0582a945
OK, let’s do this
In this howto, we’ll use TLP. It will give you optimized power saving out of the box. If you already have laptop-mode-tools installed, you must uninstall it:
Code: Select all
# apt remove laptop-mode-tools
Code: Select all
# apt install tlp tlp-rdw tp-smapi-dkms acpi-call-dkms
Now we’ll look for the correct kernel module.
Code: Select all
# tlp-stat -b
Code: Select all
tp-smapi = inactive (unsupported hardware)
tpacpi-bat = inactive (unsupported hardware)
Code: Select all
# apt remove tp-smapi-dkms
OR
Code: Select all
# apt remove acpi-call-dkms
Configuration
All tlp settings are stored in /etc/default/tlp * Let’s edit it:
Code: Select all
# nano /etc/default/tlp
Code: Select all
START_CHARGE_THRESH_BAT0=75
STOP_CHARGE_THRESH_BAT0=80
START_CHARGE_THRESH_BAT1=75
STOP_CHARGE_THRESH_BAT1=80
If your computer almost always is connected to AC power, I recommend setting the charge threshold closer to 50% to maximize battery life.
Getting a full charge
Even if you have set the threshold to 80%, or even 50%, sometimes you just need a full charge. You can achieve this by entering the following:
Code: Select all
# tlp fullcharge
You can also charge just one of the batteries, for example:
Code: Select all
# tlp fullcharge BAT1
* Edit: 14.05.2020: The path for Sid is /etc/tlp.conf. See below.
* Edit: 01.01.2023: Updated with link for other Lenovos. Thanks to Ahmed_samy!
Credits:
https://linrunner.de/en/tlp/docs/tlp-li ... ement.html
https://linrunner.de/en/tlp/docs/tlp-configuration.html