Welcome to TLP!

Contents

  1. Features
  2. Installation
  3. Kernel Boot Options
  4. Configuration
  5. Start
  6. Check
  7. Terminal Commands
  8. License
  9. Support
  10. Links

With each release cycle the Linux kernel and the distributions implement new improvements in terms of laptop power management. Therefore even plain standard installations can show quite good results.

Additional possibilities to save battery power are easily found on the web with the search engine of your choice. But selecting the right solutions for your particular hardware and Linux flavour from the myriad of wikis, blogs and forums is much more difficult and often requires advanced Linux knowledge on behalf of the user.

TLP brings you the benefits of advanced power management for Linux without the need to understand every technical detail.

TLP does not replace but enhance the existing power management of your Linux installation. TLP applies it's settings upon system startup and on every change of the power source.

TLP packages are available for Arch, Debian, Fedora, Gentoo, openSUSE and Ubuntu. You're welcome if you want to package TLP for other distributions – please take a look at the TLP Developer Documentation.

Please note: TLP runs on every laptop brand. Setting the battery charge thresholds is available for IBM/Lenovo ThinkPads only.

Features

TLP is a pure command line tool with automated background tasks. It does not contain a GUI.

Settings depending on the Power Source

Additional functions

Installation

Prerequisites

Ubuntu 12.04 – 13.04

as well as Linux Mint 13 – 14, but not LMDE (see Debian)

Add the TLP-PPA to your package sources with the commands:

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update

Install the following packages:

The above packages may be installed via package management tools (Ubuntu Software Center, Synaptic, ...) or terminal command:

sudo apt-get install tlp tlp-rdw

ThinkPads require an additional:

sudo apt-get install tp-smapi-dkms acpi-call-tools

Debian 6.0 and higher

as well as Linux Mint Debian Edition (LMDE)

Execute the following steps in a root shell.

Add a line for the package repository TLP-PPA to your /etc/apt/sources.list:

deb http://ppa.launchpad.net/linrunner/tlp/ubuntu lucid main

Add the public key for the PPA:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 02D65EFF

If the above command fails, try with a different keyserver:

apt-key adv --keyserver pool.sks-keyservers.net --recv-keys 02D65EFF

Update package data:

apt-get update

Install the following packages:

The above packages may be installed via package management tools or terminal command:

sudo apt-get install tlp tlp-rdw

ThinkPads require an additional:

sudo apt-get install tp-smapi-dkms acpi-call-tools

Arch Linux

Packages are available via AUR: tlp, tlp-rdw. For installation instructions see the Arch Wiki.

Gentoo

Installation via Portage Overlay is described in the Gentoo Wiki (currently in German only).

openSUSE

The following steps install TLP on openSUSE (in a root shell).

Add package repositories:

openSUSE 12.1

zypper ar -f http://download.opensuse.org/repositories/home:/cdersch:/TLP/openSUSE_12.1/home:cdersch:TLP.repo

In case the contrib repo is not yet active:

zypper ar -f http://download.opensuse.org/repositories/openSUSE:/Factory:/Contrib/openSUSE_12.1/openSUSE:Factory:Contrib.repo

openSUSE Tumbleweed

zypper ar -f http://download.opensuse.org/repositories/home:/cdersch:/TLP/openSUSE_Tumbleweed/home:cdersch:TLP.repo

Update repository data:

zypper ref

Install the following packages:

Install the above packages with the following command (in a root shell):

zypper in tlp tlp-rdw smartmontools ethtool

ThinkPads require an additional:

zypper in tp_smapi-kmp-desktop

Fedora 17 and higher

To install TLP on Fedora use the follwowing steps in a root shell.

Variant 1 (recommended): add TLP and RPM Fusion package repositories with yum

yum localinstall --nogpgcheck http://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release-1.0-0.noarch.rpm
yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm

Variant 2: add TLP and RPM Fusion package repositories with rpm

wget http://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release-1.0-0.noarch.rpm
wget http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
rpm -ivh tlp-release-*.noarch.rpm rpmfusion-free-release-*.noarch.rpm

Install the following packages:

Install the above packages with the following command (in a root shell):

yum install tlp tlp-rdw

ThinkPads require an additional:

yum install akmod-tp_smapi akmod-acpi_call

Kernel Boot Options

Starting with Linux 2.6.39/3.0 some advanced power saving techniques have been disabled by default due to stability problems on particular hardware, leading to a substantial increase in power consumption – especially on current models with Sandy Bridge cpu/chipset. This section shows kernel boot options to re-activate the techniques in question.

Important: use of these options may cause instabilities or display problems on some systems. Thus they should be applied by experienced Linux users only.

Intel Graphics (Linux 3.0 and above, not Ubuntu)

i915.i915_enable_rc6=1

Enables RC6 power saving for Intel graphics chips and results in high savings potential on Sandy Bridge (and newer) hardware. May lead to graphics freezes.

Hint: for Ubuntu this option is not neccessary.

General (Linux 2.6.39 only, not Ubuntu)

pcie_aspm=force

Enables PCIe Active State Power Management (see according section in TLP Configuration). May cause system freezes.

Hint: for Linux >= 3.0 and Ubuntu in particular this option is not neccessary. This is true despite tlp-stat showing the following output:

+++ PCIe Active State Power Management
/sys/module/pcie_aspm/parameters/policy = default (using bios preferences)

Boot Manager Configuration

Current distributions use the GRUB2 boot manager. Add the desired boot options in /etc/default/grub (example):

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.i915_enable_rc6=1"

Separate multiple options with blanks.

Activate any changes with

sudo update-grub

and reboot.

Hint: it is advisable to add and test only one option at a time to help isolating the cause when problems show up.

Configuration

All TLP settings are stored in the config file /etc/default/tlp.

As the default configuration already provides for optimized power saving, there is no immediate need to change it in most cases. Nevertheless the full reference can be read at TLP Configuration.

Start

After installation TLP will be automatically activated upon system start.

To start it immediately without reboot or to apply changed settings use:

sudo tlp start

Check

Use the tlp-stat terminal command to check if TLP is working properly

sudo tlp-stat

and check the output for

+++ System Status
TLP power save = enabled
power source = ...

Please note: there is no TLP background process or daemon that shows up in ps.

Terminal Commands

Hint: all commands described in this section that are shown with sudo, may be executed without sudo in a root shell.

wifi, bluetooth, wwan

Enable, disable or check the state of builtin wifi, bluetooth and wwan (3G or UMTS) radios:

wifi [ on | off | toggle ]

Hint: for Intel 2200bg and 2915abg cards call the command with sudo or in a root shell.

bluetooth [ on | off | toggle ]
wwan [ on | off | toggle ]

Prerequisite: the radio device must be supported by the kernel's rfkill framework (except Intel 2100/2200/2915). This may be checked with

rfkill list

tlp-stat

Status report with configuration and all active settings:

sudo tlp-stat

Show battery information only:

sudo tlp-stat -b
sudo tlp-stat --battery

Show configuration only:

tlp-stat -c
tlp-stat --config

Show radio devices switch state only:

tlp-stat -r
tlp-stat --rfkill

Show temperatures and fan speed only:

tlp-stat -t
tlp-stat --rfkill

Show trace output from /var/log/debug:

tlp-stat -T
tlp-stat --trace, --rfkill

tlp

Apply Settings

(according to the actual power source)

sudo tlp start

Apply Battery Settings

(ignoring the actual power source)

sudo tlp bat

Apply AC Settings

(ignoring the actual power source)

sudo tlp ac

Apply Auto Suspend for all attached USB Devices

(except input and blacklisted devices)

sudo tlp usb

Power off Optical Drive in Drive Slot or Ultrabay

sudo tlp bayoff

Hints:

Change Battery Charge Thresholds (temporarily)

ThinkPads only

sudo tlp setcharge [ START_THRESH STOP_THRESH [ BAT0 | BAT1 ] ]

Sets the thresholds to the given values. Valid thresholds range from 1 bis 100; START_THRESH must be below STOP_THRESH - 3. Without parameters the configured settings for the main battery (BAT0) are applied.

Upon reboot, thresholds are reset to the configured settings.

Set Battery Charge Thresholds to Factory Settings (temporarily)

ThinkPads only

sudo tlp fullcharge [ BAT0 | BAT1 ]

Sets the thresholds to 96 / 100% (charge the battery to full capacity).

Upon reboot, thresholds are reset to the configured settings.

Charge Battery once to the Upper Charge Threshold

ThinkPads only

sudo tlp chargeonce [ BAT0 | BAT1 ]

Sets the lower threshold to upper threshold - 4 to initiate the charge.

Upon reboot, thresholds are reset to the configured settings.

Discharge Battery on AC Power

ThinkPads only

sudo tlp discharge [ BAT0 | BAT1 ]

BAT0 selects the main battery, BAT1 the auxiliary/Ultrabay battery for discharge. The command continously shows remaining capacity and estimated discharge time. Discharging may be stopped at any time with Ctrl+C.

Hints:

Recalibrate Battery

ThinkPads only

Hint: the recalibration process resets the capacity information in the battery pack. It cannot repair defective battery cells.

sudo tlp recalibrate [ BAT0 | BAT1 ]

This command combines the functions fullcharge and discharge. First the thresholds are set to factory defaults 96 / 100 %, then the battery is discharged completely.

Disk ID

tlp diskid

Shows the IDs of all attached disk drives.

Status Report

sudo tlp stat

is an alias to tlp-stat.

run-on-ac, run-on-bat

Conditional execution of commands depending on the actual power source:

run-on-ac command parameter ...
run-on-bat command parameter ...

Manpages

Manpages exist for all TLP commands:

man command

License

TLP is licensed under the GPL version 2. To obtain the sources, please take a look at the TLP Developer Documentation.

Support

When asking for support, always provide the following output (on battery):

sudo tlp-stat

Trace Mode

To examine suspected problems in TLP more closely, activate trace mode in /etc/default/tlp:

TLP_DEBUG="lock nm path pm rf run sysfs udev usb"

The accumulated trace data may be read at any time with

tlp-stat -T

or

grep "tlp" /var/log/debug

In case the trace output is missing, you have to modify your rsyslogd configuration. Create the file /etc/rsyslog.d/90-debug.conf containing

*.=debug;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug

and restart the daemon

sudo /etc/init.d/rsyslog restart

Links

TLP

Instructions in other languages