How to use the command tlp (with examples)
- Linux
- December 25, 2023
TLP is a command that provides advanced power management for Linux. It allows users to apply different power settings based on the power source. The command tlp
can be used to apply settings according to the actual power source, or specific settings for battery or AC power sources.
Use case 1: Apply settings according to the actual power source
Code:
sudo tlp start
Motivation: Applying power settings based on the actual power source helps optimize power consumption and performance. For example, when a laptop is running on battery power, it might be beneficial to use power-saving settings to extend battery life.
Explanation:
sudo
: Execute the command with administrative privileges.tlp
: The command to manage power settings.start
: Apply settings according to the actual power source.
Example output:
TLP started in battery mode.
Use case 2: Apply battery settings (ignoring the actual power source)
Code:
sudo tlp bat
Motivation: Sometimes, it is necessary to enforce specific power settings for battery power sources. This can be useful when the usual behavior configured for the actual power source is not optimal.
Explanation:
sudo
: Execute the command with administrative privileges.tlp
: The command to manage power settings.bat
: Apply battery settings, ignoring the actual power source.
Example output:
TLP started in battery mode.
Use case 3: Apply AC settings (ignoring the actual power source)
Code:
sudo tlp ac
Motivation: Similarly to the previous use case, it might be necessary to enforce specific power settings for AC power sources. This allows users to configure different power profiles based on the power source to optimize performance and power consumption.
Explanation:
sudo
: Execute the command with administrative privileges.tlp
: The command to manage power settings.ac
: Apply AC settings, ignoring the actual power source.
Example output:
TLP started in AC mode.
Conclusion:
The tlp
command provides advanced power management for Linux systems. It can be used to apply different power settings based on the actual power source or to enforce specific settings for battery or AC power sources. By using the appropriate arguments (start
, bat
, ac
), users can optimize power consumption and performance based on their specific requirements.