Created
June 12, 2016 10:52
-
-
Save evansd/42899ab9a9117b5a5d1ade5352e647e9 to your computer and use it in GitHub Desktop.
Thinkpad Battery Management Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository ppa:morgwai/tpbat | |
sudo apt update | |
sudo apt install tpacpi-bat | |
# Start charging at 40%, stop charging at 80% | |
echo '[Unit] | |
Description=sets battery thresholds | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/usr/bin/tpacpi-bat -s ST 0 40 | |
ExecStart=/usr/bin/tpacpi-bat -s SP 0 80 | |
ExecStop=/usr/bin/tpacpi-bat -s ST 0 0 | |
ExecStop=/usr/bin/tpacpi-bat -s SP 0 0 | |
[Install] | |
WantedBy=multi-user.target' \ | |
| sudo tee /etc/systemd/system/tpacpi.service | |
sudo systemctl enable tpacpi.service | |
sudo systemctl start tpacpi.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment