Introduction

This section explains how TLP’s settings are organized, the Config Files, the Parameter Syntax and Making Changes.

Profiles

TLP uses two settings profiles that are automatically applied depending on the power source:

  • Parameters ending in _AC are effective when AC is connected

  • Parameters ending in _BAT are effective when running on battery

Parameters ending neither in _AC nor in _BAT apply to both profiles.

Important

Parameters without intrinsic default (see below) must always be specified for both _AC and _BAT. Omitting one of the two makes the set value effective for both power sources, since a change only occurs when different values are defined.

Config Files

Settings are read from the following files in the specified order:

  • Intrinsic defaults

  • /etc/tlp.d/*.conf: Drop-in customization snippets, read in lexical (alphabetical) order

  • /etc/tlp.conf: User configuration

Hints:

  • In case of identical parameters in several but also within the same file, the last occurence has precedence

  • This also means, parameters in /etc/tlp.conf will override anything else because it is read last

  • All parameters in /etc/tlp.conf are disabled, remove the leading # to activate your change

  • Config files in the /etc/tlp.d/ directory are created by the user:

    • Filenames must end in .conf, otherwise the file will be ignored

    • 00-template.conf is provided as an example

  • If in doubt, put your configuration changes in /etc/tlp.conf

  • Transfer settings when upgrading describes how to migrate your configuration from versions before 1.3

Note

TLP versions 1.2.2 and older stored all settings in a single config file named /etc/default/tlp.

Parameter Defaults

Two kinds of parameters exist:

  • Parameters with intrinsic default:

    • Marked with “Default when unconfigured:” in this documentation

    • Preceded by “Default:” in /etc/tlp.conf

  • Parameters without intrinsic default

Note

Parameter values given in this documentation and in the config files may be suggestions rather than intrinsic defaults.

Parameter Syntax

Config Files consist of parameter and comment lines.

Parameter lines

PARAMETER=value

Parameter values containing blanks must be enclosed in double quotes:

USB_DENYLIST="1111:2222 3333:4444"

Comment lines

The content of lines beginning with a # in the first column is ignored completely:

#What is written here does not matter.

Empty lines are ignored as well.

Until version 1.5 comments after parameters are not allowed, the whole line will be silently ignored:

EXAMPLE="do not use like this" # Parameter in front is ignored - until version 1.5!

As of version 1.6 the above line is valid and taken into account.

Disabling features

Parameters without intrinsic default may be disabled by commenting them out with a leading #:

#STOP_CHARGE_THRESH_BAT1=80

Parameters with intrinsic default may be disabled by entering an empty string:

RUNTIME_PM_DRIVER_DENYLIST=""

Concatenation with +=

Version 1.4 and newer

A nifty feature to add something to an intrinsic default (Example 1):

Intrinsic default DISK_DEVICES=”nvme0n1 sda”

plus /etc/tlp.d/01-my.conf:

DISK_DEVICES+="sdb"

Results in: DISK_DEVICES=”nvme0n1 sda sdb”

Or add values in a subsequent config file (Example 2):

/etc/tlp.d/01-general.conf:

USB_DENYLIST="1111:2222 3333:4444"

plus /etc/tlp.d/02-special.conf:

USB_DENYLIST+="5555:6666"

Results in: USB_DENYLIST=”1111:2222 3333:4444 5555:6666”

Making Changes

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

sudo nano /etc/tlp.conf

All changes must be activated by removing the leading # and, after saving the file, will take effect only

  • after a reboot,

  • plugging or unplugging AC

  • or by the command

    sudo tlp start
    

Note

When installing upgrades of TLP, the package manager asks for confirmation before overwriting a changed config file with an updated version. Please refer to Does upgrading TLP overwrite my settings?

See also

Use tlp-stat to:

  • Show active configuration files and enabled parameters: tlp-stat -c

  • Show the difference between default and user configuration: tlp-stat --cdiff

  • Get the TLP version installed: tlp-stat -s