TLP Settings

Contents

  1. General
  2. File System
  3. Processor and Frequency Scaling
  4. Kernel
  5. Undervolting
  6. Disks and Controllers
  7. PCI Express Bus
  8. Graphics Cards
  9. Networking
  10. Audio
  11. Drive Slot / Ultrabay
  12. Runtime Power Management
  13. USB
  14. Radio Device Switching
  15. ThinkPad Battery Charge Thresholds
  16. Radio Device Wizard
  17. Links

Introduction

All TLP settings are stored in the config file /etc/default/tlp. The default configuration provides optimized power saving out of the box. Some advanced features like turning off the optical drive and battery thresholds need to be activated explicitly.

The config file can be changed with any text editor (root privilege is needed). For example:

gksudo gedit /etc/default/tlp

Changes to the settings take effect after a reboot, a change of the power source or directly by

sudo tlp start

Hint: when installing updates of TLP, the package manager asks for confirmation before overwriting a changed config file with an updated version.

Parameters

Power Saving

General hints:

General

TLP_ENABLE=1

Set to 0 to disable TLP (Reboot needed).

TLP_DEFAULT_MODE=AC

Defines TLP's default operating mode (AC / BAT) in case a power source cannot be detected. Concerns some desktop and embedded hardware only.

File System

DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=2

Values > 0 activate kernel laptop mode. Do not change this setting.

MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60

Timeout (in seconds) for writing unsaved data in file systems buffers to disk.

Processor and Frequency Scaling

CPU_SCALING_GOVERNOR_ON_AC=ondemand
CPU_SCALING_GOVERNOR_ON_BAT=ondemand

Selects the CPU scaling governor for automatic frequency scaling. Possible values are ondemand (default), powersave, performance and conservative.

intel_pstate: since kernel 3.9 the new scaling driver intel_pstate is available for Intel Core i 2nd gen. ("Sandy Bridge ") or newer hardware. intel_pstate supports the governors powersave (recommended default) and performance only. To determine the active scaling driver, refer to the output of tlp-stat -p.

Important: to use this setting you must disable your distribution's governor settings or conflicts will occur. See the TLP FAQ.

CPU_SCALING_MIN_FREQ_ON_AC=0
CPU_SCALING_MAX_FREQ_ON_AC=0
CPU_SCALING_MIN_FREQ_ON_BAT=0
CPU_SCALING_MAX_FREQ_ON_BAT=0

Set the min/max frequency available for the scaling governor. Possible values depend on your CPU. For available frequencies consult the output of tlp-stat -p. A value of 0 means to use processor defaults.

Hint: after enabling the processor defaults a restart is required to ensure that the new setting takes.

Important: lowering the max frequency on battery power does not conserve power. The best results are achieved by the ondemand governor without frequency limits.

CPU_MIN_PERF_ON_AC=0
CPU_MAX_PERF_ON_AC=100
CPU_MIN_PERF_ON_BAT=0
CPU_MAX_PERF_ON_BAT=30

Define the min/max P-state for Intel Core processors. Values are stated as a percentage (0..100%) of the total available processor performance.

Hints:

CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0

Disable CPU "turbo boost" (Intel) or "turbo core" (AMD) feature (0 = disable / 1 = allow).

Hints:

SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1

Minimize number of used CPU cores/hyper-threads under light load conditions (1 = enabled, 0 = disabled). Depends on processor model.

ENERGY_PERF_POLICY_ON_AC=performance
ENERGY_PERF_POLICY_ON_BAT=powersave

Define the general performance versus energy savings policy for the CPU. Possible values are performance, normal and powersave.

Important: this setting requires the kernel module msr and the tool x86_energy_perf_policy matching your kernel version.

Kernel

NMI_WATCHDOG=0

Activate kernel NMI watchdog timer (0 = disabled/save power, 1=enabled). A value of 1 is relevant for kernel debugging only.

Undervolting

Hint: advanced Linux skills are necessary to use this feature.

PHC_CONTROLS="F:V F:V F:V F:V"

Frequency/voltage ID pairs for the undervolting of Intel processors. Assumes that a kernel with PHC patches is installed. For more information see the PHC wiki.

Disks and Controllers

Note: TLP's default settings work well with SSDs, there is no immediate need to tune them.

Device Assignment

DISK_DEVICES="sda sdb"

Defines the disk devices the following parameters are effective for. Multiple devices are separated with blanks.

When using a 2nd disk in a swappable drive slot or the Ultrabay, the assignment of device names by the kernel (sda/sdb) can change possibly. In this case it is advisable to do the device assignment using IDs:

DISK_DEVICES="ata-INTEL_SSDSA2M160G2GC_XZY123456890 ata-HITACHI_HTS541612J9SA00_XZY123456890"

The command

tlp diskid

shows the IDs of all attached disks.

Advanced Power Management

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

Set the "Advanced Power Management Level". Possible values range between 1 and 255.

Some selected values are:

Values for multiple disks are separated with blanks.

Spin Down

DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"

Timeout value until the spindle motor stops when the disk is idle. Valid settings:

Values for multiple disks are separated with blanks.

SSDs don't have moving parts, therefore this setting is "don't care" for them and can remain disabled.

Hint: stopping the system disk for extended periods of time is unlikely to work, because applications and system daemons wake up the disk frequently. However for a 2nd disk in a swappable drive slot or the Ultrabay that is not accessed permanently, this setting may be quite useful.

Disk I/O Scheduler

DISK_IOSCHED="deadline cfq"

Sets the I/O scheduler per disk. Possible values:

Values for multiple disks are separated with blanks.

SATA Aggressive Link Power Management

SATA_LINKPWR_ON_AC=max_performance
SATA_LINKPWR_ON_BAT=min_power

Sets the power management mode for the SATA links connecting disk and optical drives. Possible values:

Hint: to disable this setting completely, insert a '#' in the first column.

PCI Express Bus

Active State Power Management

PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave

Sets PCIe ASPM power saving mode. Available with kernel 2.6.35 and above. Possible values:

Graphics Cards

Radeon (old)

RADEON_POWER_PROFILE_ON_AC=high
RADEON_POWER_PROFILE_ON_BAT=low

Controls the graphics card's clock. Available with kernel 2.6.35 and above. Supported by the radeon driver only, not fglrx. Possible values:

Hint: this setting makes the display flicker briefly upon changing the power source.

Radeon DPM (new)

Since kernel 3.11 the new radeon dynamic power management (DPM) is available. Supported by the radeon driver only, not fglrx.

Hint: needs the kernel boot option radeon.dpm=1.

RADEON_DPM_STATE_ON_AC=performance
RADEON_DPM_STATE_ON_BAT=battery

Controls the power management method. Possible values:

RADEON_DPM_PERF_LEVEL_ON_AC=auto
RADEON_DPM_PERF_LEVEL_ON_BAT=auto

Controls the performance level. Possible values:

Networking

Wifi Power Management

WIFI_PWR_ON_AC=1
WIFI_PWR_ON_BAT=5

Sets wifi power saving mode. Adapter support depends on kernel and driver. Possible values:

Hint: power save can cause an unstable wifi link.

Wake On LAN

WOL_DISABLE=Y

Hint: after enabling a restart is required to ensure that the new setting takes.

Audio

SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=1

Timeout (in seconds) for the audio power saving mode (supports Intel HDA, AC97). A value of 0 disables power save.

Hint: this setting can cause slight clicks in sound output.

SOUND_POWER_SAVE_CONTROLLER=Y

Drive Slot / Ultrabay

BAY_POWEROFF_ON_BAT=0
BAY_DEVICE=sr0

Device file for the optical drive (default: /dev/sr0).

Hints:

Runtime Power Management

RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto

Controls runtime power management for PCI(e) devices. Available with kernel 2.6.35 and above. Possible values:

Hint: to disable this setting completely, insert a '#' in the first column.

RUNTIME_PM_ALL=1

Controls which PCI(e) devices are considered for runtime power management:

RUNTIME_PM_BLACKLIST="00:12.3 00:45.6"

Exclude listed PCI(e) device addresses from runtime power management. Use lspci to lookup the addresses (first column).

RUNTIME_PM_DRIVER_BLACKLIST="radeon nouveau"

Exclude PCI(e) devices assigned to listed drivers from runtime power management. Use tlp-stat -e to lookup the drivers (in parentheses at end of line). Separate multiple drivers with spaces.

The default is "radeon nouveau" to prevent accidential power on of hybrid graphics' discrete part. Use an empty list ("") to disable the feature completely (not recommended).

USB

USB_AUTOSUSPEND=1

Set autosuspend mode for all USB devices upon system start or a change of power source. Input devices like mice and keyboards are exluded by default (see USB_DRIVER_BLACKLIST below). Possible values:

Note: TLP activates USB autosuspend independent of the power source, i.e. on battery and AC.

USB_BLACKLIST="1111:2222 3333:4444"

Exclude USB device IDs from autosuspend mode. Useful for devices having difficulties in waking up from autosuspend. Use tlp-stat -u to determine IDs. Multiple IDs are separated with blanks.

Hint: all input devices (driver "usbhid") get excluded by default. It's therefore unnecessary to put them on the USB_BLACKLIST. To circumvent the default for certain devices enter the IDs into USB_WHITELIST.

Note: because of conflicts with udevd v221 (and higher) the parameter USB_DRIVER_BLACKLIST had to be removed with TLP version 0.8. Enter the device IDs to be excluded into USB_BLACKLIST instead.

USB_BLACKLIST_WWAN=1

Exclude builtin WWAN devices from autosuspend mode:

Note: this feature is implemented by an internal blacklist currently matching cards from Qualcomm, Ericsson and Sierra. To re-enable autosuspend mode for WWAN, enter the ID into USB_WHITELIST.

USB_WHITELIST="5555:6666 7777:8888"

Re-enable autosuspend mode for USB device IDs already excluded by any of the lists above (whitelist always wins). Use tlp-stat -u to determine IDs. Multiple IDs are separated with blanks.

USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1

Disables USB autosuspend mode upon system shutdown. This is intended as a workaround if suspended USB devices disturb the shutdown process.

Radio Device Switching

On System Start and Shutdown

RESTORE_DEVICE_STATE_ON_STARTUP=0

Restores radio device state (builtin bluetooth, wifi, wwan) from previous shutdown on system startup:

Hint: the parameters DEVICES_TO_DISABLE_ON_STARTUP/SHUTDOWN below are ignored when this is enabled.

DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"

Disables builtin radio devices upon system start:

Multiple devices are separated with blanks.

DEVICES_TO_ENABLE_ON_STARTUP="bluetooth wifi wwan"

Linux enables all builtin radio devices by default. In case of exception you can use this setting to enable the missing devices upon system startup. Possible values are as above.

DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"

Disables builtin radio devices upon system shutdown. May be used as a workaround when enabled radio devices block the shutdown process. Possible values are as above.

DEVICES_TO_ENABLE_ON_SHUTDOWN="bluetooth wifi wwan"

Enables builtin radio devices upon system shutdown. May be used as a workaround to prevent other operating systems from missing disabled devices. Possible values are as above.

Upon Change of Power Source

Note: the following settings apply only at the moment where the power source actually changes (from AC to battery or vice versa).

DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"

Enables builtin radio devices when AC power is plugged in. Possible values are as above.

DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"

Disables builtin radio devices when changing to battery power regardless of their connection state. Possible values are as above.

DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"

Disables builtin radio devices that are not connected when changing to battery power. Possible values are as above.

Hint: do not use both DEVICES_TO_DISABLE_ON_BAT and DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE for the same radio device because DEVICES_TO_DISABLE_ON_BAT always has precendence.

ThinkPad Battery Charge Thresholds

ThinkPads only

START_CHARGE_THRESH_BAT0=75
STOP_CHARGE_THRESH_BAT0=80

START_CHARGE_THRESH_BAT1=75
STOP_CHARGE_THRESH_BAT1=80

Set ThinkPad battery charge thresholds for main battery (BAT0) and auxiliary/Ultrabay battery (BAT1). Values are given as a percentage of the full capacity. A value of 0 is translated to the hardware defaults 96 / 100%.

Charging starts upon connecting AC power, but only if the remaining capacity is below the value of START_CHARGE_TRESH (start threshold). Charging stops when reaching the STOP_CHARGE_TRESH (stop threshold) value. If, however when you connect the AC adapter, charge is above the start threshold, then it will not charge.

Note: the charge threshold settings are disabled by default and must be enabled explicitly by removing the leading '#'.

ThinkPad T420(s)/T520/W520/X220 (and all newer models): check erratic battery behavior (FAQ).

For further questions concerning charge thresholds please visit the TLP FAQ.

Radio Device Wizard

The radio device wizard provides the capability to enable or disable builtin radio devices triggered by certain events. In Ubuntu and Debian it is implemented in the (optional) package tlp-rdw.

Hint: the radio device wizard needs Network Manager as a prerequisite.

Disable on Network Connect

DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"

Upon a lan, wifi or wwan connect the stated radio devices are disabled:

Multiple devices are separated with blanks.

Enable on Network Disconnect

DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""

Upon a lan, wifi or wwan disconnect the stated radio devices are enabled.

Enable/Disable on Dock

DEVICES_TO_ENABLE_ON_DOCK=""
DEVICES_TO_DISABLE_ON_DOCK=""

After docking the stated radio devices are enabled/disabled.

Enable/Disable on Undock

DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
DEVICES_TO_DISABLE_ON_UNDOCK=""

After undocking the stated radio devices are enabled/disabled.

Trace Mode

For support purposes TLP provides a trace mode. To enable it add the following line to the configuration file:

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

Default Configuration

For reference see /etc/default/tlp as contained in the installation package.

Links

TLP

Background