
Note: This tutorial is applicable mainly for Lenovo's ThinkPad laptops and notebooks.
To get information about your laptop battery, run this command:
cat /proc/acpi/battery/BAT0/info
sudo apt-get install tp-smapi-dkms
To check if the module is well loaded, run this command:
lsmod | grep tp_smapi
To set when charge threshold start, run this command:
echo 60 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
Replace 60 with any other battery level percentage of your choice.
To set when charge threshold stops, run this command:
echo 95 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
In the two commands given above, battery charge threshold will start at 60% and stop at 95%. You can set your own battery threshold percentages depending on the battery size you have and for how long you want to use your laptop.
To run the commands given above automatically at system startup, edit the rc.local file with this command:
sudo gedit /etc/rc.local
For Linux Mint:
sudo pluma /etc/rc.local
And enter the two commands at the end of the file just above "exit 0", then save and close:
Note: This tutorial may not work with all laptops. If you have something to add, please use the comment form listed below.
Post a Comment