User Tools

Site Tools


foss:wikishelf:gpm:hacking

Hacking Gnome Power Manager

CPU throttling policy

CPU throttling is a method to save power by changing the frequency at which the CPU (also called processor) is running. As one might guess, when the frequency is high, the power consumed is important. With today processor power, it is now possible to have a multi-tasking environment working fine with lower processor frequency (thus reduced energy consumption). The CPU throttling policy helps determine when to raise or lower the frequency. One could imagine that when the load on the computer raises, the frequency can be raised stepwise or directly to the highest frequency.

On Linux the CPU throttling policy are as follows:

  • powersave: uses always the lowest frequency - static
  • performance: uses always the highest frequency - static
  • conservative: adapts slowly the speed to the load - dynamic
  • ondemand: adapts quickly the speed to the load - dynamic
  • userspace: does not take any decision. The frequency can be modified by userspace applications

Gnome Power Manager (GPM) allows to select a default policy when the computer is plugged on the AC power and when the computer runs on battery. However, the option is not yet accessible in GPM preferences and one has to go via the Gnome Configuration Editor (a.k.a. gconf).

Click to enlargeTo install Gnome Configuration Editor, one has to install the gconf2 package using his prefer installation method (see Ubuntu documentation for installing software). Then, the new installed tool can be found in the Gnome menu “Applications” → “System Tools” → “Configuration Editor”. This application looks like a file explorer with some kind of directory in the left pane and parameters in the right one. Navigate using the left pane under: /apps/gnome-power-manager. There will be several parameters in the right pane now, all concerning GPM. Scroll down until you get to the parameters concerning cpufreq (see figure on the right side).

The parameters cpufreq_ac_policy and cpufreq_battery_policy are the two interesting one. The first one concerns the default policy when running on AC power, the second when using the battery. By default, both should be set to ondemand, feel free to change them to suit your needs. There is no wrong value. The default value is good enough when on AC power, because it will quickly adapt the frequency to the application needs. To save some power while using the battery as the only source of energy, one could select conservative or even better powersave.

Further reading

foss/wikishelf/gpm/hacking.txt · Last modified: 2015/05/01 23:32 (external edit)