Difference between revisions of "TLP"

From ArchWiki
Jump to: navigation, search
(Start: this is mentioned right in the #Installation section)
m (Force battery (BAT) configuration: rm unneeded comments)
 
(13 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
[[Category:Power management]]
 
[[Category:Power management]]
 
[[ja:TLP]]
 
[[ja:TLP]]
 +
[[zh-hans:TLP]]
 
{{Related articles start}}
 
{{Related articles start}}
 
{{Related|Laptop}}
 
{{Related|Laptop}}
Line 16: Line 17:
 
To complete TLP's install, you must [[enable]] the systemd services {{ic|tlp.service}} and {{ic|tlp-sleep.service}}. You should also [[mask]] the systemd service {{ic|systemd-rfkill.service}} and socket {{ic|systemd-rfkill.socket}} to avoid conflicts and assure proper operation of TLP's radio device switching options.
 
To complete TLP's install, you must [[enable]] the systemd services {{ic|tlp.service}} and {{ic|tlp-sleep.service}}. You should also [[mask]] the systemd service {{ic|systemd-rfkill.service}} and socket {{ic|systemd-rfkill.socket}} to avoid conflicts and assure proper operation of TLP's radio device switching options.
  
{{Note|{{ic|tlp.service}} starts {{ic|NetworkManager.service}} if it is available: {{bug|43733}}. If you use a different [[List_of_applications#Network_managers|network manager]], [[edit]] {{ic|tlp.service}}in order to remove the service (line {{ic|1=Wants=}}) or [[mask]] it.}}
+
{{Note|{{ic|tlp.service}} starts {{ic|NetworkManager.service}} if it is available: {{bug|43733}}. If you use a different [[List_of_applications#Network_managers|network manager]], [[mask]] {{ic|NetworkManager.service}} or [[edit]] {{ic|tlp.service}} and remove the service out of line {{ic|1=Wants=}}.}}
  
 
=== ThinkPads only ===
 
=== ThinkPads only ===
Line 26: Line 27:
  
 
See the TLP FAQ, section [http://linrunner.de/en/tlp/docs/tlp-faq.html#kernmod "Which kernel module?"], for details.
 
See the TLP FAQ, section [http://linrunner.de/en/tlp/docs/tlp-faq.html#kernmod "Which kernel module?"], for details.
 +
 +
Controlling the charge thresholds using D-Bus without root privileges is possible using {{AUR|threshy}} and it's example Qt user interface {{AUR|threshy-gui}}.
 +
 +
=== Graphical interface ===
 +
 +
{{AUR|tlpui-git}} is a GTK user interface for TLP written in Python. Software is currently in beta.
  
 
== Configuration ==
 
== Configuration ==
  
The configuration file is located at {{ic|/etc/default/tlp}} and provides a "largely" optimized power saving by default. For a full explanation of options see: [http://linrunner.de/en/tlp/docs/tlp-configuration.html TLP configuration].
+
The configuration file is located at {{ic|/etc/default/tlp}} and provides a "largely" optimized power saving by default. For a full explanation of options see: [http://linrunner.de/en/tlp/docs/tlp-configuration.html TLP configuration].
 +
 
 +
=== Force battery (BAT) configuration ===
 +
When no power supply can be detected, the setting for AC will be used (e.g. on desktops and embedded hardware).
 +
 
 +
You may want to force the battery (BAT) settings when using TLP on these devices to enable more power saving:
 +
 
 +
{{hc|/etc/default/tlp|2=
 +
# Operation mode when no power supply can be detected: AC, BAT.
 +
TLP_DEFAULT_MODE=BAT
 +
 
 +
# Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
 +
TLP_PERSISTENT_DEFAULT=1}}
  
 
=== Btrfs ===
 
=== Btrfs ===
Line 60: Line 79:
  
 
== Debugging ==
 
== Debugging ==
You can display informations about the currently used Mode(AC/BAT) and applied configurations:
+
You can display information about the currently used Mode(AC/BAT) and applied configurations:
  
 
   # tlp-stat
 
   # tlp-stat
Line 66: Line 85:
 
== Features intentionally excluded ==
 
== Features intentionally excluded ==
  
* Fan control. See [[Fan speed control]] and [[ThinkPad Fan Control]]
+
* Fan control. See [[Fan speed control]]
  
 
* Backlight brightness. See [[Backlight]]
 
* Backlight brightness. See [[Backlight]]

Latest revision as of 20:07, 3 July 2018

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 fulfill your specific requirements.

Installation

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

To complete TLP's install, you must enable the systemd services tlp.service and tlp-sleep.service. You should also mask the systemd service systemd-rfkill.service and socket systemd-rfkill.socket to avoid conflicts and assure proper operation of TLP's radio device switching options.

Note: tlp.service starts NetworkManager.service if it is available: FS#43733. If you use a different network manager, mask NetworkManager.service or edit tlp.service and remove the service out of line Wants=.

ThinkPads only

For advanced battery functions, i.e. charge thresholds and recalibration, install the following package(s):

  • tp_smapi – tp-smapi is needed for battery charge thresholds, recalibration and specific status output of tlp-stat
  • acpi_call – acpi-call is needed for battery charge thresholds and recalibration on Sandy Bridge and newer models (X220/T420, X230/T430 et al.)

See the TLP FAQ, section "Which kernel module?", for details.

Controlling the charge thresholds using D-Bus without root privileges is possible using threshyAUR and it's example Qt user interface threshy-guiAUR.

Graphical interface

tlpui-gitAUR is a GTK user interface for TLP written in Python. Software is currently in beta.

Configuration

The configuration file is located at /etc/default/tlp and provides a "largely" optimized power saving by default. For a full explanation of options see: TLP configuration.

Force battery (BAT) configuration

When no power supply can be detected, the setting for AC will be used (e.g. on desktops and embedded hardware).

You may want to force the battery (BAT) settings when using TLP on these devices to enable more power saving:

/etc/default/tlp
# Operation mode when no power supply can be detected: AC, BAT.
TLP_DEFAULT_MODE=BAT

# Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
TLP_PERSISTENT_DEFAULT=1

Btrfs

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: Hardware/kernel-specific quirk (Discuss in Talk:TLP#Btrfs)

To avoid filesystem corruption on btrfs formatted partitions, set:

SATA_LINKPWR_ON_BAT=max_performance

See also these links for discussion on this topic: Github bug report, Reddit follow-up discussion.

Bumblebee with NVIDIA driver

If you're running Bumblebee with NVIDIA driver, you need to disable power management for the GPU in TLP in order to make Bumblebee control the power of the GPU.

Run lspci to determine the address of the GPU (such as 01:00.0), then set the value:

 RUNTIME_PM_BLACKLIST="01:00.0"

Radio Device Wizard

The Radio Device Wizard allows a more sophisticated management of radio devices depending on network connect/disconnect events. It requires NetworkManager, tlp-rdw and enabling NetworkManager-dispatcher.service.

See TLP configuration for details.

Command line

TLP provides several command line tools. See TLP commands.

Debugging

You can display information about the currently used Mode(AC/BAT) and applied configurations:

 # tlp-stat

Features intentionally excluded

See also