Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After playing with GRUB profiling and installing preload, default scaling governor suddenly becomes 'performance' not 'ondemand'. I tried to enable /etc/init.d/ondemand service, but nothing changes - after reboot or resume, governor is always 'performance'. Do anybody knows what happened and how to revert old behaviour.

I'm using HP 6710s laptop.

share|improve this question
Uninstall cpufreqd. Use only cpufreq-utils. – user247165 Feb 11 '14 at 18:45
up vote 12 down vote accepted

You can Manually set the governor by running the cpufreq-set command (as root).

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.

sudo cpufreq-set -c 0 -g ondemand

To install cpufreq:

sudo aptitude install cpufrequtils

cpufrequtils includes a daemon which allows users to set the desired scaling, governor and min/max clock speeds for all processor cores at boot-time. Before starting the daemon, edit /etc/conf.d/cpufreq as root, selecting the desired governor and setting the min/max speed for your CPU(s), for example:

#configuration for cpufreq control
# valid governors:
#  ondemand, performance, powersave,
#  conservative, userspace
# valid suffixes: Hz, kHz (default), MHz, GHz


share|improve this answer
Thanks, this works fine. Probably when I have some time, I will try to find why this happened at all. – user65404 Jun 11 '12 at 6:57
It's /etc/default/cpufrequtils on Ubuntu, not /etc/conf.d/cpufreq. And the variables (as seen in /etc/init.d/cpufrequtils) are MAX_SPEED, MIN_SPEED and GOVERNOR. – elmicha Jun 19 '12 at 6:08
@elmicha I'll verify, and edit as needed. Thanks :) – Mitch Jun 19 '12 at 6:26
sudo cpufreq-set -c 0 -g ondemand will just apply to the frequency of the first CPU or core. So, for example, on a dual core system, you have to run sudo cpufreq-set -c 1 -g ondemand next, so it takes effect for both cores. – Eliah Kagan Jul 9 '12 at 2:09
Do all your CPUs at once: for cpu in $(seq 0 $(($(nproc) -1))) ; do echo sudo cpufreq-set -c $cpu -g ondemand ; done – artfulrobot Dec 8 '14 at 10:50

You can use following command to change governor:

cpufreq-selector -g ondemand

With this command, you don't need root privileges to change governor. Just add this command to Startup Applications... to change governor on login.

share|improve this answer
Problem was in Jupiter which changes governor at each restart/resume even if program isn't running. – user65404 Jul 10 '12 at 9:04
You saved my day, I edited that command and use it with Cuttlefish to dim light and switch the governor on change of power ;) Man youre great! – Zbunjeni Nov 26 '14 at 23:59

Under Xubuntu, you also need to disable ondemand task by command:

sudo update-rc.d ondemand disable

the system boot cpu as GOVERNOR="performance" mentioned above

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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