Skip to content

Instantly share code, notes, and snippets.

@JudahSan
Created October 4, 2024 00:58
Show Gist options
  • Save JudahSan/203b25bc30cc0703acb22c6de794e968 to your computer and use it in GitHub Desktop.
Save JudahSan/203b25bc30cc0703acb22c6de794e968 to your computer and use it in GitHub Desktop.
Laptop Settings for Battery Longevity Using TLP

Machine: thinkpad t480
OS: ubuntu 24.04 LTS


  1. Change charge threshold: Keep the lithium-ion batteries between 40%-80% for regular use, as charging to 100% constantly can degrade the battery.
  2. For dual battery setup, you might want to configure separate charging thresholds for both.

Installation

  1. Install tlp

Steps to change charging threshold permanently

  1. Open the TLO configuration file:
sudo nano /etc/tlp.conf
  1. Modify the battery charge control section:
# Battery charge thresholds for BAT0 (internal)
START_CHARGE_THRESH_BAT0=40
STOP_CHARGE_THRESH_BAT0=80

# Battery charge thresholds for BAT1 (external)
START_CHARGE_THRESH_BAT1=30
STOP_CHARGE_THRESH_BAT1=85
  1. save the file and restart TLP
sudo tlp start

Adjust based on usage: 50-90 -> travel, 40-80 -> docked

  1. Monitor battery health
sudo tlp-stat -b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment