Extend laptop battery life using TLP

TLP helps optimize battery usage for laptops. TLP supports setting battery charging thresholds to keep the battery partially charged, which prolongs its life. This can be done by creating a new file under /etc/tlp.d/01-battery.conf:

START_CHARGE_THRESH_BAT0=80
STOP_CHARGE_THRESH_BAT0=85

Reload the TLP configuration for the new settings to take effect:

$ systemctl reload tlp.service

You can disable the battery threshold temporarily using:

$ sudo tlp fullcharge

Restore the thresholds using:

$ sudo tlp setcharge