Difference between revisions of "TLP"

From ArchWiki
Jump to navigation Jump to search
m (add ja link)
(Added link to supplementary tool aclidswitch)
Line 82: Line 82:
  
 
* [http://linrunner.de/tlp TLP - Linux Advanced Power Management] - Project homepage & documentation.
 
* [http://linrunner.de/tlp TLP - Linux Advanced Power Management] - Project homepage & documentation.
 +
* {{AUR|aclidswitch-git}} - Supplementary tool that extends TLP's functionality to run commands depending on the laptop's AC state

Revision as of 19:22, 15 November 2014

From the project page:

TLP brings you the benefits of advanced power management for Linux without the need to understand every technical detail. TLP comes with a default configuration already optimized for battery life, so you may just install and forget it. Nevertheless TLP is highly customizable to fulfil your specific requirements.

Installation

Install tlp from the official repositories - pay attention to its optional dependencies that may help provide additional power saving.

Configuration

The configuration file is located at /etc/default/tlp and provides a "largely" optimized power saving by default; for a full list of option explanations see: TLP configuration. Listed here are the notable settings.

CPU frequency scaling governor

TLP can control the CPU frequency scaling governor. Changing this to ondemand is generally recommended:

CPU_SCALING_GOVERNOR_ON_AC=perfomance
CPU_SCALING_GOVERNOR_ON_BAT=ondemand

Hard disk

Most disks have power saving built-in whose settings can be adjusted, set to: 255 to disable, 128 for the maximum power save value, <128 will enable disk spindown and possibly additional power savings. Before setting a spindown value, think carefully before using: spindowns require disk wakeups that negatively contribute to disk longevity.

DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="128 128"

Optical drive

Powering down the optical drive can save a little bit of power (power restored on disk-enter or tray close).

BAY_POWEROFF_ON_BAT=1

Radio device wizard

The TLP Radio Device Wizard manages the power state of Bluetooth, WiFi, and WWAN devices. It requires NetworkManager to be installed as a dependency, tlp-rdw from the official repositories, and the NetworkManager-dispatcher service be started. The options relevant for the RDW are found at the end of /etc/default/tlp and commented out by default.

To restore radio device states on start-up:

RESTORE_DEVICE_STATE_ON_STARTUP=1

To enable or disable specific devices at boot, use the following options:

DEVICES_TO_DISABLE_ON_STARTUP="wifi"
DEVICES_TO_ENABLE_ON_STARTUP=""

If you make use of one of these three options, it is necessary to mask the systemd service systemd-rfkill to avoid conflicts.

# ln -s /dev/null /etc/systemd/system/systemd-rfkill@.service

Start service

Before starting the service, disable other power saving services as they likely will conflict with TLP. Also, laptop-mode-tools will have to be removed as tlp will not load if it is installed.

To load TLP, enable and start the systemd units: tlp.service and tlp-sleep.service.

Command line tool

A command line tool called tlp is provided, mainly for debugging purposes.

To generate a report of the loaded configuration and the current power state of the devices, run:

tlp stat

It can also be used to control battery charging and discharging on supported laptops, to discharge:

tlp discharge

Run man tlp for the full set of commands.

Features excluded

Read this link for a list. If wanting a backlight solution, read backlight.

See also