I noticed today that a process "ondemand" was running on my Ubuntu Server that I recently upgraded (following the recommended process) from 9.10 to 10.04. Why on earth would they install this by default on a server, and how do I turn it off?

  • It's there probably to save money by decreasing power consumption when you don't need full processor power. You can disable it by recompiling kernel and disabling power savings there. There is probably some more elegant way to do the same, but nothing comes to my mind at this time. – AndrejaKo Aug 23 '10 at 10:04
  • 1
    On other distros, there's a single config line somewhere. I'd like to know where this is on Ubuntu (Debian). – A Student at a University Aug 23 '10 at 10:19
sudo apt-get install cpufrequtils sysfsutils


echo performance | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

and repeat for every core/CPU you have.

You can verify the result with cpufreq-info.

To make the change permanent: add the following line (or lines - for several cores/CPUs)

devices/system/cpu/cpu0/cpufreq/scaling_governor = performance

to /etc/sysfs.conf (or edit an already existing line).

You may also have a look at this post.

| improve this answer | |
  • I don't want to install managers. I want to remove what the 10.04 upgrade added and return the CPU to always running at full bore. – A Student at a University Aug 23 '10 at 12:11
  • Neither cpufrequtils, nor sysfsutils is a "manager". Citation 1: This package contains two utilities for inspecting and setting the CPU frequency through both the sysfs and procfs CPUFreq kernel interfaces. Citation 2: Sysfs is a virtual file system in Linux kernel 2.5+ that provides a tree of system devices. This package provides the program 'systool' to query it: it can list devices by bus, class, and topology. However, I've added another solution (which I haven't tested myself, unlike the initial solution). – chronos Aug 26 '10 at 21:39
  • sysfsutils provides that 'single config line' you are looking for. Installation of cpufrequtils is not really needed - it just provides a convenient way to examine CPU frequency scaling features. – chronos Aug 26 '10 at 21:47

Most of the solutions provided around the internet are complicated and inefficient since the CPU frequencies reset after a while.

The most simple and 100% solution to disable CPU scaling is:

  1. sudo rcconf

  2. Uncheck cpufrequtils, loadcpufreq, ondemand, powernowd, powernowd early.

  3. Add CPU frequency scaling monitor to your panel and set your cores to desired frequency.

  4. Reboot.

  5. Check with cpufreq-info that the selected frequency is active all the time (100%).

  6. All your drugs are belong to us! :D

| improve this answer | |

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.