thelinuxvault blog

How to Quickly Increase and Optimize Laptop Battery Life Using TLP in Linux

In today's mobile world, laptop battery life is crucial. Linux users often look for ways to extend their battery runtime. TLP is a powerful tool that can help achieve this. TLP is a Linux power management utility that optimizes battery usage by adjusting various system settings. In this blog, we'll explore how to install, configure, and use TLP to enhance your laptop's battery life.

2026-05

Table of Contents#

  1. What is TLP?
  2. Installation
  3. Configuration
  4. Example Usage
  5. Best Practices
  6. Common Practices
  7. Conclusion
  8. References

What is TLP?#

TLP is an open-source Linux power management tool. It automatically applies battery-saving and power-optimizing settings. It can control things like CPU frequency scaling, disk spin-down, wireless device power management, and more. It works with most Linux distributions and is highly configurable.

Installation#

On Debian/Ubuntu#

  1. Open the terminal.
  2. Update the package list: sudo apt update
  3. Install TLP: sudo apt install tlp tlp-rdw
  4. Enable TLP to start on boot: sudo systemctl enable tlp
  5. Start TLP: sudo systemctl start tlp

On Fedora#

  1. Open the terminal.
  2. Install TLP: sudo dnf install tlp
  3. Enable TLP to start on boot: sudo systemctl enable tlp
  4. Start TLP: sudo systemctl start tlp

On Arch Linux#

  1. Open the terminal.
  2. Install TLP from the AUR (using a helper like yay): yay -S tlp
  3. Enable TLP to start on boot: sudo systemctl enable tlp
  4. Start TLP: sudo systemctl start tlp

Configuration#

Understanding the Configuration File#

The main configuration file for TLP is /etc/default/tlp (in some distributions) or /etc/tlp.conf. It contains a large number of settings. Each setting is well-documented with comments. For example, you can find settings related to CPU frequency scaling (like CPU_SCALING_GOVERNOR_ON_AC and CPU_SCALING_GOVERNOR_ON_BAT which define the CPU governor when on AC power or battery respectively).

Common Settings to Tweak#

  • CPU Frequency Scaling:
    • If your laptop's CPU supports it, you can set a more conservative governor on battery. For example, change CPU_SCALING_GOVERNOR_ON_BAT from ondemand (which can be more power-hungry in some cases) to powersave.
  • Disk Spin-Down:
    • Adjust DISK_APM_LEVEL_ON_AC and DISK_APM_LEVEL_ON_BAT (Advanced Power Management levels for disks). Lower values (e.g., 128 for more power-saving) can make disks spin down faster when idle.
  • Wireless Devices:
    • You can control the power management of wireless cards. For example, WIFI_PWR_ON_AC and WIFI_PWR_ON_BAT can be set to on or off depending on your usage pattern. If you don't need Wi-Fi all the time on battery, set it to off.

Example Usage#

Basic Commands#

  • Check TLP status: sudo tlp-stat
    • This will show detailed information about TLP's current settings, battery status, CPU frequency scaling, etc. For example, it will display the current battery charge percentage, the CPU governor in use, and more.
  • Reload TLP configuration: sudo systemctl restart tlp
    • If you make changes to the configuration file, run this command to apply the new settings.

Monitoring Battery Status#

You can use tools like upower in combination with TLP. For example:

  • upower -i $(upower -e | grep 'BAT')
    • This will show detailed battery information like the battery's state (charging, discharging), energy full, energy now, etc. You can monitor how TLP's settings affect these values over time.

Best Practices#

Keep TLP Updated#

Regularly check for updates to TLP. New versions may have improved power management algorithms or support for new hardware features. On Debian/Ubuntu, you can use sudo apt upgrade tlp; on Fedora sudo dnf upgrade tlp; and on Arch Linux (if installed from AUR) use your AUR helper to update.

Combine with Other Power-Saving Measures#

  • Software:
    • Close unnecessary applications. Some applications (like web browsers with many tabs open) can consume a lot of resources and battery.
    • Use lightweight desktop environments or window managers if possible. They generally have lower resource requirements.
  • Hardware:
    • If your laptop has an external GPU, disable it when on battery (if possible through BIOS or software settings).

Common Practices#

Regularly Check Battery Health#

Use tools like upower -i or acpi -i to check battery health. If the battery is old and its capacity has significantly degraded, no amount of software optimization may give you the desired battery life. Consider replacing it if needed.

Adjust Screen Brightness#

Lowering the screen brightness is one of the simplest ways to save battery. You can use keyboard shortcuts (usually Fn + a brightness adjustment key) or software tools (like xbacklight in Xorg environments) to set a lower brightness on battery.

Conclusion#

TLP is a powerful tool for optimizing laptop battery life in Linux. By installing, configuring, and using it effectively, along with following best and common practices, you can significantly extend your laptop's battery runtime. Experiment with the settings, monitor the results, and find the optimal configuration for your specific laptop model.

References#