How to Install and Use TLP on Linux Laptop

Squeezing in a few hours in your Linux PC battery life may be what it takes to hit that deadline and submit your project or assignment on time. And that is where TLP comes in. TLP is a power management command line utility that enhances your existing power management for your system and earlier article we have shown how to check battery status. It does not replace your power management plan but adds another layer of optimizing your power plan by making a few tweaks here and there. The default settings come already optimized for your power management settings. The software is licensed under the GNU/GPL Version 2.

To enable effective power management in the Linux kernel, the following settings should be enabled

  • Processor
  • Battery
  • Fan
  • Thermal Zone
  • Processor
  • Video
  • AC adapter

Installation of TLP on Ubuntu 17.01

Add the TLP repository

sudo add-apt-repository ppa:linrunner/tlp

Update the system

apt-get update

Install TLP

apt-get install tlp tlp-rdw
  • tlp - For power management
  • tlp-rdw - Radio Device Wizard (This is optional)

For IBM ThinkPad

sudo apt-get install tlp tlp-rdw smartmontools ethtool tp-smapi-dkms acpi-call-tool

Starting TLP

tlp start

Output

tlp started in AC mode

Getting a detailed output of tlp

 tlp stat

Installation of TLP on Debian 9.3.0

Add the following to /etc/apt/sources.list

deb http://ftp.debian.org/debian jessie-backports main
 echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list

Install tlp

 apt-get install tlp tlp-rdw

Start tlp

 tlp start

Installation of TLP on Centos 7

Installing tlp

yum install tlp tlp-rdw

Once installed, start the service using the command below

tlp start

Output

tlp started in AC mode

Viewing detailed output

tlp stat

Installation of TLP on Fedora 27

Installing tlp

dnf install tlp tlp-rdw

For Thinkpads

dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
dnf install http://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release.fcXX.noarch.rpm

insert release number in XX above.

Starting the service

tlp start

Output

tlp started in AC mode

Viewing detailed output

tlp stat

Installation of TLP on Arch Linux 2017.03.01

Installing tlp

pacman -S tlp tlp-rdw

For Thinkpad Laptops

pacman -S tp_smapi acpi_call

Starting the service

systemctl start tlp.service

Enabling the service upon booting

systemctl enable tlp.service

Check if tlp is running correctly

tlp-stat -s

Installation of TLP on OpenSUSE Leap 42.3

Installing tlp

zypper install tlp tlp-rdw

Starting tlp

tlp start

Output

--- TLP 1.0 --------------------------------------------

+++ System Info
System         = QEMU pc-i440fx-2.9 Standard PC (i440FX + PIIX, 1996)
BIOS           = rel-1.10.2-0-g5f4c7b1-prebuilt.qemu-project.org
Kernel         = 4.9.64-x86_64-linode88 #1 SMP Tue Nov 21 17:54:17 UTC 2017 x86_64
/proc/cmdline  = root=/dev/sda console=tty1 console=ttyS0 ro  devtmpfs.mount=1
Init system    = systemd
Boot mode      = BIOS (CSM, Legacy)

+++ TLP Status
State          = enabled
Last run       = 08:34:37 AM,    303 sec(s) ago
Mode           = AC
Power source   = unknown

Notice: systemd-rfkill.service is not masked -- invoke "systemctl mask systemd-rfkill.service" to correct this!

The configuration file of tlp is found in the /etc/default/tlp path

tlp-stat Command

Displaying system’s configuration settings.

tlp-stat

Sample output
tlp-stat

Displaying battery information
sudo tlp-stat -b
sudo tlp-stat --battery

Sample output
tlp-stat -b

Showing configuration
tlp-stat -c
tlp-stat --config
Sample output
tlp-stat-c

Displaying disk data
tlp-stat -d
tlp-stat –disk
Sample output
tlp-stat -d

Displaying PCI (e) information
tlp-stat -e
tlp-stat --pcie

Sample Output
tlp-stat -e

Displaying graphics card data
tlp-stat -g
tlp-stat –graphics
Sample output
tlp-stat -g

Displaying processor data
tlp-stat -p
tlp-stat –processor
Sample output
tlp-stat -p

Displaying state of radio service
tlp-stat -r
tlp-stat –rfkill
Sample output
tlp-stat -r

Displaying system data
tlp-stat -s
tlp-stat –system
Sample output
tlp-stat -s

Display temperature and Fan speed
tlp-stat -t
tlp-stat –temp
Sample output
tlp-stat -t

Display USB device
tlp-stat -u
tlp-stat –usb
Sample output
tlp-stat -u

Display more information
tlp-stat -v
tlp-stat --verbose

Display warnings
tlp-stat -w
tlp-stat –warn
Sample output
tlp-stat -w

tlp command

Applying battery settings
tlp bat
Output

TLP started in battery mode.

Applying AC settings
tlp AC
Output

TLP started in AC mode.

Conclusion

There are many ways of saving your battery power on a Linux machine such as closing unwanted applications, disabling WiFi and Bluetooth feature when not in use, ejecting USB devices once you are done using them to mention but a few. tlp command line utility comes in to enhance and further save power and increase the longevity of your battery life. It comes already optimized for your battery and allows you to make tweaks according to your preferences. Try it today !

Jamie Arthur 12:05 am

About Jamie Arthur

Hey, I’m James, a passionate Linux Systems administrator, and a tech enthusiast. I derive immense gratification in conducting research on Linux systems and keeping myself up to date with the latest in the technology world.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.

3 Comments

    1. Hey Prexe, to stop the TLP service from running , login as root and type systemctl stop tlp. To disable it at startup , run systemctl disable tlp