TLP don't change CPU frequency
I check CPU clock speed with cat /proc/cpuinfo | grep "MHz"
, After sudo tlp start
and sudo tlp bat
still frequency is 2100MHz (Maximum). Could you please help me to solve this problem?
I'm using latest kernel (3.17.4) and because I want to use indicator-cpufreq, I'd some change in grub.
Can I use indicator-cpufreq and tlp at the same time?
Solution 1:
Sure, I've never had a problem using them both at the same time.
First, make sure the universe repository is enabled:
sudo add-apt-repository universe
Then, to install indicator-cpufreq, run the following commands:
sudo apt-get update
sudo apt-get install indicator-cpufreq
Now, edit grub. Execute the following command to open a text editor so you can edit the file:
sudo nano /etc/default/grub
Using your arrow keys, scroll down to line 11 where it should say this or something similar:
GRUB_CMDLINE_LINUX_DEFAULT="splash quiet"
Change the line to say this instead:
GRUB_CMDLINE_LINUX_DEFAULT="splash quiet intel_pstate=disable"
Next, press Ctrl + o and then press Enter to accept the changes. Press Ctrl + x to exit the file and then run the following command to update Grub:
sudo update-grub
Reboot the system and if indicator-cpufreq does not show up in the panel automatically, press Alt + F2, type indicator-cpufreq and then press Enter. You should now be able to scale the CPU by clicking on the indicator-cpufreq icon. "Performance" is high and "Ondemand" only clocks up when it needs to.
Also, you need edit the TLP configuration file before you use it. Execute the following command to edit the file:
sudo nano /etc/default/tlp
if you'd rather use gedit instead of nano, you can use either one of these commands instead: gksu gedit /etc/default/tlp
or sudo gedit /etc/default/tlp
.
Scroll down to where you see these two lines:
#CPU_SCALING_GOVERNOR_ON_AC=ondemand
#CPU_SCALING_GOVERNOR_ON_BAT=ondemand
Edit those lines by removing the comment (pound symbol) from the beginning or each line and change "ondemand" to "performance" like you see here:
CPU_SCALING_GOVERNOR_ON_AC=performance CPU_SCALING_GOVERNOR_ON_BAT=performance
Another line you probably want to change is this one:
DISK_APM_LEVEL_ON_BAT="128 128"
That setting can sometimes cause excessive wear on your hard drive by causing it to spin down way too often. The best thing to do is to set it to the same setting used by AC power. So, change 128 128 to 254 254 like in this example:
DISK_APM_LEVEL_ON_BAT="254 254"
And, you probably don't want wifi power management either. Scroll down to:
WIFI_PWR_ON_BAT=0
and change that to:
WIFI_PWR_ON_BAT=1
You may want to change a couple of others depending on user preference.
Save the file before you exit and restart TLP for the changes to take effect.
By setting TLP to "performance" you basically turn the scaling function off. This allows indicator-cpufreq to handle frequency scaling without conflict.
If you ever want to scale the frequency down, click on the indicator-cpufreq icon on the top panel and choose "ondemand", "powersave", or whatever to allow the CPU to wind down for better efficiency.
Finally, don't forget you need to remove "laptop-mode-tools" if you have not done so already or you may encounter issues. To do this, you can run the following command from an open terminal:
sudo apt-get remove laptop-mode-tools
NOTE:
According to user @antoine-viallon, using intel_pstate=passive
instead of intel_pstate=disable
enables turbo-boost frequencies while allowing linux to set the frequency itself but I have not tested this.