TLP – Quickly Increase and Optimize Linux Laptop Battery Life

[‘

n

TLP is a free open source, feature-rich and command line tool for advanced power management, which helps to optimize battery life in laptops powered by Linux. It runs on every laptop brand, and ships in with a default configuration already tunned to effectively and reliably maintain battery life, so you can simply install and use it.

n

It performs power saving by allowing you to configure how devices such as CPU, disk, USBs, PCIs, radio devices should utilize power when your laptop is running on battery.

n

TLP Features:

n

    n

  • It is highly configurable through various power saving parameters.
  • n

  • It uses automated background tasks.
  • n

  • Uses kernel laptop mode and dirty buffer timeouts.
  • n

  • Supports processor frequency scaling including “turbo boost” and “turbo core”.
  • n

  • Has a power aware process scheduler for multi-core/hyper-threading.
  • n

  • Provides for runtime power management for PCI(e) bus devices.
  • n

  • PCI Express active state power management (PCIe ASPM).
  • n

  • Supports radeon graphics power management (KMS and DPM).
  • n

  • Has a I/O scheduler (per disk).
  • n

  • Offers USB autosuspend with blacklist.
  • n

  • Supports Wifi power saving mode.
  • n

  • Also offers Audio power saving mode.
  • n

  • Offers hard disk advanced power management level and spin down timeout (per disk).
  • n

  • Also supports SATA aggressive link power management (ALPM) and so much more.
  • n

n

How to Install TLP Battery Management Tool in Linux

n

TLP package can be easily installed on Ubuntu as well as corresponding Linux Mint using TLP-PPA repository as shown.

n

$ sudo add-apt-repository ppa:linrunner/tlprn$ sudo apt updatern$ sudo apt install tlp tlp-rdwrn

n

On Debian 10.0Buster” and 9.0Stretch” add the following line to your /etc/apt/sources.list file.

n

deb http://ftp.debian.org/debian buster-backports mainrndeb http://ftp.debian.org/debian stretch-backports-sloppy mainrn

n

and then update the system package cache and install it.

n

$ sudo apt update rn$ sudo apt install tlp tlp-rdw rn

n

On Fedora, Arch Linux and OpenSuse, execute the following command as per your distribution.

n

# dnf install tlp tlp-rdw     [On Fedora]rn# pacman -S tlp  tlp-rdw      [On Arch Linux]rn# zypper install tlp tlp-rdw  [On OpenSUSE]rn

n

How to Use TLP to Optimize Battery Life in Linux

n

Once you have installed TLP, its configuration file is /etc/default/tlp and you will have the following commands to use:

n

    n

  • tlp – apply laptop power saving settings
  • n

  • tlp-stat – displays all power saving settings
  • n

  • tlp-pcilist – displays PCI(e) device data
  • n

  • tlp-usblist – for viewing USB devices data
  • n

n

It should start automatically as a service, you can check if it is running under SystemD using systemctl command.

n

$ sudo systemctl status tlprn

n

After the service starts running, you have to restart the system to actually start using it. But you can prevent this by manually applying the current laptop power saving settings with root privileges using the sudo command, like so.

n

$ sudo tlp start rn

n

Afterwards, confirm that it is running using the following command, which actually shows system information and TLP status.

n

$ sudo tlp-stat -s rn

n

Show System and TLP Information
Show System and TLP Information

n

Important: As we mentioned before, it uses automated background tasks but you will not see any TLP background process or daemon in ps command output.

n

To view current TLP configuration, run the following command with -c option.

n

$ sudo tlp-stat -crn

n

Show TLP Configuration
Show TLP Configuration

n

To display all power settings run the following command.

n

$ sudo tlp-statrn

n

Show Power Saving Settings
Show Power Saving Settings

n

To display Linux battery information, run the following command with -b switch.

n

$ sudo tlp-stat -brn

n

Show Linux Battery Information
Show Linux Battery Information

n

To display Temperatures and Fan Speed of system, run the following command with -t switch.

n

$ sudo tlp-stat -trn

n

Show CPU Temperature and Fan Speed
Show CPU Temperature and Fan Speed

n

To display Processor Data, run the following command with -p switch.

n

$ sudo tlp-stat -prn

n

Show Processor Data
Show Processor Data

n

To display any Warnings, run the following command with -w switch.

n

$ sudo tlp-stat -wrn

n

Note: If your are using ThinkPad, there are certain specific packages you need to install for your distribution, that you can check from the TLP homepage. You will also find more information and a number of other usage commands there.

n

Read Also: PowerTop – Monitors Total Power Usage and Improve Linux Laptop Battery Life

n

TLP is a useful tool for all laptops powered by Linux operating systems. Give us your thought about it via the comment form below, and you can let us know of any other similar tools you have come across as well.

n

‘]