TLP don't change CPU frequency

14,581

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.

Share:
14,581

Related videos on Youtube

Daniyal Javani
Author by

Daniyal Javani

Updated on September 18, 2022

Comments

  • Daniyal Javani
    Daniyal Javani over 1 year

    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?

    • vembutech
      vembutech over 9 years
      The usage of -cpufreq and tlp are same. Both will manage the advanced power management in Linux. Hope so -cpufreq is enough to identify the CPU usage.
    • Edward Torvalds
      Edward Torvalds over 9 years
      you want to increase CPU clock speed ?
  • J'e
    J'e over 6 years
    on ubuntu 16 there is no tlp file. sudo apt-get install tlp
  • MᴀʀɪᴜsᴢS
    MᴀʀɪᴜsᴢS almost 4 years
    It is worth to know, that disabling intel_pstate probably isn't good idea: phoronix.com/scan.php?page=news_item&px=MTM3NDQ
  • mchid
    mchid almost 4 years
    @MᴀʀɪᴜsᴢS It certainly runs slightly hotter without pstate but overall performance is extremely close and it depends on what you're actually using it for. Here are some more recent benchmarks on 18.10.
  • mchid
    mchid almost 4 years
    @J'e Wow, kind of late to answer back. Sorry about that. The answer is to enable the universe repository like this: sudo add-apt-repository universe then sudo apt update and finally sudo apt install tlp