0

I try to lock my CPU to a specific clock frequency (1.2 GHz). Using Ubuntu (14 or 15), it works perfectly by editing the /sys/devices/system/cpu0/cpufreq/scaling_max_freq with the specific Hz-value (e.g. 1200000). And the same for cpu1, cpu2, cpu3, cpu4.

However, for some reason, elementary OS ignores the settings made within the files and puts them back to stock after a reboot.

Also frequency-settings made with the tool TLP aren't recognized by elementary OS.

I'm using an Lenovo Thinkpad T430s with a Intel Core i5-3320M (with Intel pstate driver).

  • I do not know the settings. But in your "Hz example" you wrote 1,200,000 Hz. This is 1.2 MHz not GHz. Maybe this is the problem? – mazienho Mar 29 '16 at 16:49
  • Oh, you're right, I meant kHz not Hz. But 1.200.000 kHz is correct. My CPU can handle clock values between 1.2 and 3.3 Ghz, so the stock value in the file is 3300000. – Simon Wyss Mar 29 '16 at 17:13
  • Why do you want to make your new PC slow? If it is overheating I would suggest you get the fan cleaned and thermal paste reapplied. Do you want to save battery by doing this? – Suici Doga Mar 30 '16 at 1:22
  • No, it is not overheating. Sometimes I use the notebook to watch streams (Twitch, Youtube, sportsevents...). These streams run perfectly at 1.2 GHz, so there is no need for the CPU to run at a higher clockrate. At 1.2 GHz the fan is quieter, the CPU stays cooler and the battery lasts longer, thats the only reason :) – Simon Wyss Apr 4 '16 at 12:17
1
sudo apt-get install linux-tools-common

and then you can either force:

cpupower frequency-set -f clock_freq

set max:

cpupower frequency-set -u clock_freq

or set min:

cpupower frequency-set -d clock_freq

cpu clock frequency.

More in-depth information about cpupower can be found here: https://wiki.archlinux.org/index.php/CPU_frequency_scaling

You may also have to install additional kernel related packages since cpupower is only installed automatically in 3.4 and above.

  • Your set max and set min commands are the same. – Lewis Goddard Mar 31 '16 at 12:04
  • Whoops, corrected! – Phil Jacobs Mar 31 '16 at 13:43
  • Thank you, but for some reasons, this doesn't work in Elementary OS. It ignores the cpupower-settings. TLP or editing the /sys/devices/system/cpu0/cpufreq/scaling_max_freq for all cores doesn't work either. All these approaches work in Ubuntu, Kubuntu and so on, but not in Elementary OS. – Simon Wyss Apr 4 '16 at 12:22
  • Weird, it works for me. But again,why would you lock the freq? – Phil Jacobs Apr 4 '16 at 12:46
  • Sometimes I use the notebook to watch streams (Twitch, Youtube, sportsevents...). These streams run perfectly at 1.2 GHz, so there is no need for the CPU to run at a higher clockrate. At 1.2 GHz the fan is quieter, the CPU stays cooler and the battery lasts longer (I benchmarked that using Ubuntu-Gnome), thats the only reason :) – Simon Wyss Apr 4 '16 at 14:31
0

I finally found a solution: I just updated the Kernel (standard in Elementary OS is 3.19) to 4.2.8 and now it works. For some reasons

watch grep \"cpu MHz\" /proc/cpuinfo

shows a few spikes to a higher frequency from time to time (would be interesting to know why) but thats ok, it instantly goes back to 1.2 GHz.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.