Linux Power Save Governor Not Controlling CPU Frequency on ThinkPad P1
If you're using a ThinkPad P1 laptop with Linux kernel 5.15.0-43-generic (Ubuntu 22.04, Jammy) and want to limit CPU activity to extend battery life and prevent fan usage, you might have encountered an issue where the Linux power save governor is not controlling the CPU frequency.
Understanding CPU Frequency Scaling
CPU frequency scaling is a technique used to dynamically change the CPU clock speed to save power and reduce heat generation. The Linux kernel supports several governors that manage CPU frequency scaling, including the power save governor, which is designed to minimize power usage.
Checking Current CPU Frequency Scaling Governor
To check the current CPU frequency scaling governor, you can use the following command:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling\_governor
Setting the Power Save Governor
To set the power save governor, you can use the following command:
sudo cpufreq-set -g powersave
Checking CPU Frequency
To check the current CPU frequency, you can use the following command:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling\_cur\_freq
Understanding the Issue
Even after setting the power save governor, you might find that the CPU frequency is not being controlled properly, and the CPU frequency remains high, leading to increased power usage and fan noise. This issue is caused by a bug in the Linux kernel that affects some ThinkPad models.
Temporary Solution
A temporary solution to this issue is to use the `cpufrequtils` package to set the minimum and maximum CPU frequency limits. You can use the following commands to set the limits:
sudo apt-get install cpufrequtils
sudo cpufreq-set -u 2.4G
sudo cpufreq-set -d 1.2G
These commands set the maximum CPU frequency limit to 2.4 GHz and the minimum CPU frequency limit to 1.2 GHz. You can adjust these limits based on your requirements.
Permanent Solution
A permanent solution to this issue is to wait for a patch to be released for the Linux kernel that addresses the bug. You can keep an eye on the official Linux kernel mailing list for updates.
References
- CPU Frequency Scaling: https://www.kernel.org/doc/html/latest/admin-guide/pm/cpu-freq.html
- cpufrequtils: http://cpufrequtils.sourceforge.net/
- Linux Kernel Mailing List: https://lkml.org/
Note: This article is for informational purposes only. The author and publisher are not responsible for any damage or loss caused by following the instructions in this article.