1

Device - HP 23-q010e

Kernel - 4.4.0-64-generic

Heres what I've tried:

No way to lock the CPU-frequency to a specific value

The above link only talks about setting the cpu freq on the current boot, but if you reboot, your settings are back to default. So I thought about going to Applications>System Settings>Applications>Startup and adding custom command:

cpupower -c all frequency-set --max 1.3ghz
/usr/bin/cpupower -c all frequency-set --max 1.3ghz

Neither one works.

https://askubuntu.com/questions/523640/how-i-can-disable-cpu-frequency-scaling-and-set-the-system-to-performance

I've also tried the above setting /etc/init.d/cpufrequtils. No matter what I set the frequency to, doesn't work.

https://blog.sleeplessbeastie.eu/2015/11/09/how-to-set-cpu-governor-at-boot/

The above works great for Manjaro, but not Elementary OS.

I've also tried inserting the cpupower command into /etc/rc.local:

/usr/bin/cpupower -c all frequency-set --max 1.3ghz
cpupower -c all frequency-set --max 1.3ghz

exit 0

and

sh -c /home/ed/Documents/rclocal &;

exit 0

Maybe this is why rc.local doesn't work for Elementary OS:

Failed to start /etc/rc.local Compatibility.

Please explain in lamen terms.

1 Answer 1

3

Install TLP

 sudo apt install tlp

Then edit the config file - set the governor to powersave

 sudo scratch-text-editor /etc/default/tlp

Ensure the following lines are not commented and are as show below

CPU_SCALING_GOVERNOR_ON_AC=powersave CPU_SCALING_GOVERNOR_ON_BAT=powersave

or

Try setting the CPU governor to performance. This will "lock" the CPU to max speed.

Install cpufrequtils

 sudo apt-get install cpufrequtils

Then edit pr create the following file

 sudo scratch-text-editor /etc/default/cpufrequtils

And add the following line to it

 GOVERNOR="performance"

Save and exit

Then disable Ondemand daemon to keep your settings on reboot

 sudo update-rc.d ondemand disable

Check your settings with

 cpufreq-info

If this doesn't work for you, you can try what's listed here

6
  • That worked for the governer, but what about frequency? In that same file I've tried: MAX_SPEED="1ghz" and MAX_SPEED="1000000". To no avail. I guess my question could be revised as this: How to run an administrative command at startup.
    – Jeff Luyet
    Commented Mar 8, 2017 at 4:16
  • With the governor set to Performance it will run your CPU at it's max freq all the time. Is that not what you are seeing when you run cpufreq-info?
    – pretz
    Commented Mar 8, 2017 at 12:36
  • Yes it is what I'm seeing. The max frequency is 2.2ghz. I don't want 2.2ghz I want 1.3ghz. Ok so.. I tried to set it to powersave, which would make it run 1ghz only. But the problem is, the file /etc/default/cpufrequtils does nothing. The only thing that worked in what you said was this: sudo update-rc.d ondemand disable. Doing that disabled the ondemand which disabling the ondemand I guess the computer picks performance governer next by default.
    – Jeff Luyet
    Commented Mar 8, 2017 at 14:21
  • Oh I see you don't want it locked at max. Sorry I misread. What you might try is installing TLP and editing the config file to force the powersave governor. I've had mixed results with that on eOS though but worth a shot.
    – pretz
    Commented Mar 8, 2017 at 14:44
  • BOOM, TLP is the answer. Inside etc/default/tlp I changed CPU_SCALING_MAX_FREQ_ON_AC=1300000. Now my frequency is 1.3ghz. I was also able to change the governor here as well by CPU_SCALING_GOVERNOR_ON_AC=ondemand. If you edit your answer I'll +1 you if I have enough points, if not then I can give you a check. Thank you!!!!
    – Jeff Luyet
    Commented Mar 8, 2017 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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