How to Set Battery Charge Thresholds in Ubuntu to Extend Laptop Lifespan

Modern laptop batteries rely on lithium-ion chemistry, which experiences physical chemical degradation when held at full 100% capacity and elevated temperatures for prolonged periods. If you use your Ubuntu laptop primarily as a desktop replacement—permanently plugged into mains AC power at a desk or connected to a USB-C docking station—maintaining maximum charge accelerates battery wear, causing permanent loss of overall charge capacity and increased battery swelling risk.

To preserve long-term battery health, hardware manufacturers incorporate battery charge thresholds: limiting maximum charging to 75% or 80%, and only initiating recharging when battery capacity falls below a specified start threshold (such as 70%). While Windows often ships with proprietary vendor software, Linux users can easily control charge thresholds across Lenovo ThinkPads, ASUS laptops, Dells, and other supported systems using TLP, the premier open-source power management suite for Linux. In this guide, you will learn how to install TLP in Ubuntu, configure start and stop charging thresholds, verify hardware support, and prolong your laptop’s battery lifespan.

Why Battery Charging Thresholds Matter

Lithium-ion cells experience the greatest chemical stress at the extreme ends of their operational voltage range (below 20% and above 80%). When a laptop stays connected to AC power constantly at 100%:

  • Continuous trickle charging at high voltage degrades internal cathode materials.
  • Elevated laptop operational temperatures compound the rate of capacity degradation.
  • By setting a maximum stop threshold at 80% and a start threshold at 75%, your laptop stops charging once it reaches 80% and powers the system purely from AC mains electricity, effectively bypassing the battery entirely until unplugged.

Checking Hardware Compatibility

Battery charging thresholds are enforced at the hardware and firmware level by your laptop’s Embedded Controller (EC). Consequently, support depends on your laptop’s manufacturer and Linux kernel driver compatibility:

  • Lenovo ThinkPad: Full out-of-the-box hardware threshold support via the thinkpad_acpi kernel module.
  • ASUS Laptops: Supported on modern ZenBook, ROG, and TUF models via the asus-wmi kernel module.
  • Dell Laptops: Supported on select Latitude, XPS, and Precision models via the dell-laptop module or SMBIOS utilities.
  • Sony / Huawei / LG Gram: Supported on modern Linux kernels via manufacturer-specific ACPI modules.

Step 1: Installing TLP on Ubuntu Desktop

TLP is maintained directly in the official Ubuntu software repositories and operates completely in the background without requiring continuous manual intervention:

  1. Open the Terminal application from the Ubuntu dash or press Ctrl + Alt + T.
  2. If your laptop runs Ubuntu 22.04 LTS or newer, install TLP along with its hardware diagnostics utilities:
    sudo apt update && sudo apt install tlp tlp-rdw
  3. Ensure that competing power management packages (such as power-profiles-daemon) do not conflict. TLP automatically manages power modes once enabled.
  4. Enable and launch the TLP systemd background service:
    sudo systemctl enable --now tlp

Step 2: Checking Current Battery Status and Threshold Capabilities

Before applying new configuration thresholds, inspect your battery hardware attributes:

  1. In your terminal, execute the TLP battery diagnostic command:
    sudo tlp-stat -b
  2. Scroll through the output and look for the sections titled Charge Thresholds and Battery Status.
  3. If your hardware is supported, TLP will display the currently active charge_control_start_threshold and charge_control_end_threshold values, along with your battery’s design capacity and current health percentage.

Step 3: Setting Custom Battery Charge Thresholds

TLP configuration files are centrally managed in the /etc/tlp.conf file or via drop-in configuration scripts inside /etc/tlp.d/. The cleanest approach in Ubuntu is creating a dedicated drop-in configuration override:

  1. Open a new configuration file in the nano text editor with administrative privileges:
    sudo nano /etc/tlp.d/01-battery.conf
  2. To configure your laptop to stop charging at 80% and only begin recharging when the battery drops below 75%, enter the following lines:
    # Set battery charge thresholds to extend battery lifespan
    START_CHARGE_THRESH_BAT0=75
    STOP_CHARGE_THRESH_BAT0=80
  3. Note for Dual-Battery Laptops: If your ThinkPad features dual internal batteries, add threshold lines for the secondary battery as well:
    START_CHARGE_THRESH_BAT1=75
    STOP_CHARGE_THRESH_BAT1=80
  4. Press Ctrl + O followed by Enter to save the file, then press Ctrl + X to exit the nano editor.
  5. Apply your new battery rules immediately without rebooting:
    sudo tlp start

Temporarily Forcing a Full 100% Charge for Travel

When you plan to travel away from mains electricity and require the absolute maximum operating duration, you do not need to re-edit your configuration file. TLP provides a one-line command to temporarily charge your battery to 100% capacity:

sudo tlp fullcharge BAT0

Your laptop will immediately begin charging through to 100%. Once you unplug and plug the laptop back in, your regular 80% threshold rules will automatically re-engage.

Troubleshooting Battery Thresholds in Ubuntu

If your battery continues charging past your defined threshold, review these diagnostic tips:

  • Hardware ACPI Incompatibility: If sudo tlp-stat -b reports “Charge threshold: unsupported”, your laptop manufacturer has not exposed hardware-level threshold registers to the Linux kernel. In this scenario, check your laptop’s BIOS/UEFI setup screens (press F2 or Del at boot); many manufacturers (such as Dell and HP) offer an “AC Custom Charge” setting directly in firmware.
  • Service Disabled After Kernel Update: Verify that the TLP service is active by running sudo systemctl status tlp. If inactive, re-enable it using sudo systemctl enable --now tlp.

Frequently Asked Questions

What is the recommended stop threshold for everyday desk use?

Setting the stop threshold between 75% and 80% provides the optimal balance between preserving lithium-ion chemical lifespan and ensuring you retain substantial battery runtime when you need to disconnect for meetings.

Does setting charge thresholds reduce the battery capacity permanently?

No. Charge thresholds simply prevent the battery charging circuit from filling the cells to their physical maximum voltage. You can disable the threshold or run sudo tlp fullcharge at any time to regain 100% capacity.

How do I reset my battery thresholds to default factory behaviour?

To restore standard 100% charging behaviour, delete the configuration file by executing sudo rm /etc/tlp.d/01-battery.conf, and restart TLP using sudo tlp start.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.