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. System Start and Shutdown
  15. Wireless Radio Switch
  16. Battery Charge Thresholds
  17. Radio Device Wizard
  18. 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).

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 and enabled by default on Intel Sandy Bridge (or newer) hardware. intel_pstate supports the governors powersave (recommended default) and performance only. To determine the active scaling driver, refer to tlp-stat output, section "+++ Processor".

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, section "+++ Processor". 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_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.

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

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:

Different 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:

Different 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:

Different 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) bus devices. Available with kernel 2.6.35 and above. Possible values:

RUNTIME_PM_ALL=0

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

Warning: RUNTIME_PM_ALL=1 is an experimental feature, it may cause problems with reboot and shutdown.

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).

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. 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 devices from autosuspend mode. Useful for devices having difficulties in waking up from autosuspend. Use lsusb to determine IDs. Multiple IDs are separated with blanks.

USB_BLACKLIST_WWAN=1

Exclude builtin wwan devices from autosuspend mode:

Note: currently works for USB IDs 05c6:* (Qualcomm), 0bdb:* (Ericsson) and 1199:* (Sierra) only.

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.

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.

Hint: this feature is not available for all laptops. It depends on rfkill support for your model.

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.

Wireless Radio Switch

ThinkPads / Ubuntu only

DEVICES_TO_ENABLE_ON_RADIOSW="wifi wwan"

Radio devices to enable when wireless radio switch is turned on.

Hint: this feature is only available for ThinkPads with a slide switch (not Fn+F5!) running Ubuntu.

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.

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

The default configuration file provides sample settings designed to minimize battery wear – the battery is charged to 80% only. However these settings are disabled by default and must be enabled explicitly by the user (remove the leading '#'). Note that even the hardware defaults of 96 / 100% – effective without TLP – already prevent battery wear by blocking short charge cycles.

Hint: the charging process is not controlled by software, but by hardware. TLP just writes the thresholds to the hardware registers (via tp-smapi or tpacpi-bat).

DISABLE_TPACPIBAT=1

Disable use of tpacpi-bat – and use tp-smapi instead – for setting the charge thresholds on Sandy Bridge models (X220, T420 et al.) .

Hint: do not use this option with Ivy Bridge models (X230, T430 et al.) where tpacpi-bat is mandatory because tp-smapi does not work.

For further questions concerning battery thresholds consult 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="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

Other