Fix the battery charging limit being reset after reboot on linux
Disclaimer: This method reportedly only works on some ASUS and Lenovo ThinkPad laptops
Download this Battery Management Utility for Linux from their GitHub releases.
(Optional) Rename the file from 'bat' to 'battery' for clarity.
Either include the file in PATH or move the file to a location which is already included in PATH (for example
\usr\bin\
)Make sure the file has executable permission by running
sudo chmod +x battery
on your terminal.Set the charging threshold (to 80%, for example) by running the command
battery threshold 80
.(Important) For this threshold to remain persistent between restarts, run the command
sudo battery persist
.
Resources: