﻿Power Management with cpufrequtils

Productivity Sauce

Aug 05, 2010 GMT

Dmitri Popov

Switching to a lightweight graphical desktop environment is a great way to improve the overall performance of your system, especially if this system happens to be a notebook or netbook. But if you opt, for example, for LXDE, you'll discover that it lacks a graphical tool for managing power profiles and controlling the processor frequency. This might not be a big problem on a desktop machine, but the ability to adjust power settings is crucial for improving the battery life of your mobile companion. The cpufrequtils utility provides a neat solution to this problem. This utility can help you to tweak power management options from the command line. cpufrequtils is available in the software repositories of most mainstream Linux distributions, so you can install it using your distro's package manager.

Using cpufrequtils is easy. For starters, run the cpufreq-info command to view the processor and power management info. The output of this command should look something like this:

The first line tells you which frequency steps are available for your particular processor, while the second line displays the available power governors.

Using the cpufreq-set command with the -g switch you can enable the desired governor. For example, if your netbook is running on the battery, you might want to enable the conservative or powersave governor:

sudo cpufreq-set -g conservative

Instead of enabling a specific governor, you can set the desired CPU frequency. To do that, you have to enable the userspace governor first:

cpufreq-set -g userspace

You can then use the cpufreq-set command with the -f switch to set the desired CPU frequency: