If you have a Lenovo laptop with Windows, you can simply use the Vantage software. But not those who use a Linux distro.

I find the setting for trickle charging on Lenovo laptops very practical. With the setting activated, the battery only charges up to a maximum of 65% instead of permanently to 100%. This saves the battery health and extends the service life. However, this setting reduces the usage time.

I have been using Pop! _OS as my operating system for a few weeks now and the Lenovo Vantage software does not exist on this system. I could set this setting in the BIOS, but every time to change it, shut down the laptop and go to the BIOS is a bit cumbersome.

That’s why I decided to make the feature available via shell script. The shell script looks like this:

#!/bin/bash

#written by Daniel Wenzlik 2021 - https://danielwenzlik.com
#Script under the GNU AGPLv3 license.

#see the status of battery conservation settings
echo "0 means battery conservation mode is OFF."
echo "1 means battery conservation mode is ON."
echo " "
echo "Current status:" 
cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode;
echo " "
#control the status of battery conservation settings
echo "Do you wish to end the script, enable or disable the battery conservation mode?"
select yn in "Exit" "Enable" "Disable"; do
    case $yn in
        Exit ) echo "Bye. Love ya!" && exit 0;;
        Enable ) echo 1  > /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode && echo "Enabled - Battery only charges to max. 65%. Thank you!" && exit 0;;
        Disable ) echo 0  > /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode && echo "Disabled - Battery will charge to 100%. How dare you?!" && exit 0;;
    esac
done

exit 0

The Shell script must be started with the sudo command and made executable beforehand. The first thing you see is a brief explanation.

0 means the function is deactivated & the battery always charges to 100%.

1 means the function is activated & the battery only charges up to 65%.

Next you will be asked whether you want to end the script, activate or deactivate the trickle charge. To do this, enter the corresponding number and confirm with Enter.

The script processes the file in /sys/bus/platform/drivers/ideapad_acpi/VPC2004: 00/conservation_mode and then terminates itself.

The script can either be downloaded here or first inspected on GitHub and then loaded from there. I published this script under the AGPLv3.0 license, so it is completely open source.

CC-BY 4.0 Image
This work is licensed under a Creative Commons Attribution 4.0 International License.
Feedback?
+1
0
+1
0
+1
0
+1
0
+1
0