1. Overview
TLP is an advanced power management tool for optimizing battery life and power usage on Linux systems. However, there may be scenarios where we want to disable it. Whether we’re troubleshooting power-related issues or simply preferring manual control over power settings, disabling TLP is a straightforward process.
In this tutorial, we’ll explore the method of disabling TLP on our Linux system.
2. Why Disable TLP?
While TLP is a powerful tool for optimizing battery life and power efficiency on Linux systems, there are situations where we might want to disable it. Here are some common reasons:
- Troubleshooting: Disabling TLP can help isolate system performance or stability issues.
- Custom power management: Users may want manual control over power settings, configuring parameters according to personal preferences.
- Conflicts with other tools: TLP may sometimes conflict with alternative power management tools or scripts, necessitating temporary disablement.
3. How Does TLP Work?
TLP employs a set of rules and configurations to manage various power-related aspects of a system. It dynamically adjusts parameters such as CPU (Central Processing Unit) frequency scaling, peripheral device power management, and more to optimize power consumption and thermal performance.
TLP monitors system metrics and adapts its settings based on factors like battery status, temperature, and system load. This dynamic adjustment ensures that the system operates efficiently under different conditions, maximizing battery life and minimizing heat generation.
4. Temporarily Disabling TLP Using systemctl
systemctl is a powerful command-line utility in Linux that allows users to control and manage the system’s services, including starting, stopping, and configuring them.
Firstly, before diving into the process of disabling TLP in Linux, let’s check the status of TLP service using systemctl:
$ sudo systemctl status tlp.service
● tlp.service - TLP system startup/shutdown
Loaded: loaded (/lib/systemd/system/tlp.service; enabled; preset: disabled)
Active: active (exited) since Tue 2024-01-02 09:31:17 +0545; 1h 51min ago
Docs: https://linrunner.de/tlp
...
The output shows the status of the TLP service. It’s active with a successful exit status, indicating it ran without issues.
One of the simplest ways to disable TLP temporarily is by stopping its service. For this, we’ll open the terminal and stop TLP using systemctl:
$ sudo systemctl stop tlp.service
The above command will halt the TLP service immediately. However, this change is temporary and will only last until the next system reboot or until tlp.service gets started again.
5. Permanently Disabling TLP Using systemctl
If we don’t want TLP to start during the boot process, we can prevent it from being loaded by the system. Let’s disable TLP permanently using systemctl:
$ sudo systemctl disable tlp.service
The disable option prevents the TLP service from starting during the system boot process. To validate this, we can verify by restarting the Linux system and checking whether TLP starts during the startup process.
After restarting the system, we can check whether the TLP service has been permanently disabled:
$ sudo systemctl status tlp.service
○ tlp.service - TLP system startup/shutdown
Loaded: loaded (/lib/systemd/system/tlp.service; disabled; preset: disabled)
Active: inactive (dead)
...
This above output shows the status of the TLP service is disabled and inactive. However, this will only prevent TLP from applying charge thresholds and switching radios on system startup/shutdown. Power saving settings are applied, nevertheless.
Since we identified the TLP service is disabled, to revert the changes, we need to enable the TLP service and start it again:
$ sudo systemctl enable tlp.service
$ sudo systemctl start tlp.service
6. Permanently Disabling TLP via Configuration File
Another method to disable TLP permanently during the boot process is making changes in the TLP configuration file. Let’s open the tlp.conf file using the nano text editor:
$ sudo nano /etc/tlp.conf
Once we open the tlp.conf file, we’ll need to find the line that says #TLP_ENABLE=1 and set it to TLP_ENABLE=0. Further, save the changes and exit the text editor. This modification tells the system not to start TLP during the boot process.
Finally, let’s reboot the system and verify the status of tlp.service to see if it’s disabled:
$ sudo systemctl status tlp.service
× tlp.service - TLP system startup/shutdown
Loaded: loaded (/lib/systemd/system/tlp.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Sat 2024-01-06 16:36:05 +0545; 1min 39s ago
...
Jan 06 16:36:05 kali systemd[1]: Starting TLP system startup/shutdown...
Jan 06 16:36:05 kali tlp[1151]: Error: TLP power save is disabled. Set TLP_ENABLE=1 in /etc/tlp.conf.
Jan 06 16:36:05 kali systemd[1]: tlp.service: Main process exited, code=exited, status=1/FAILURE
Jan 06 16:36:05 kali systemd[1]: tlp.service: Failed with result 'exit-code'.
Jan 06 16:36:05 kali systemd[1]: Failed to start TLP system startup/shutdown.
The command output indicates that the TLP service is disabled, and the reason for the error is specified as Error: TLP power save is disabled. To resolve this issue, it suggests enabling TLP power save by setting TLP_ENABLE=1 in the TLP configuration file located at /etc/tlp.conf.
7. Conclusion
In this article, we explored methods for disabling TLP either temporarily or permanently.
Upon utilizing the systemctl command to disable TLP or by modifying the configuration file, we can customize how our Linux system manages power. Additionally, this ensures that it works exactly the way we want it to, fitting our preferences and goals effortlessly.