This is an old revision of the document!


#INTRODUCTION

To reduce power consumption is essential for portable computers but there are no reason not to use on desktop machines. You can save power turning off not needed hardware components like WiFi, Bluetooth, turning off or reduce monitor backlight, spinning down HDD and to control CPU frequency.

TC4 activates CPU frequency scaling by default at startup time in case of suitable CPU and enables 'ondemand' governor, which will select automatically frequency based on applications demand.

In most cases it works fine and you do not need any additional action.

#CPU DRIVER

Next you have to load the proper CPU kernel driver matching your CPU. To identify the CPU type in a terminal window:

cat /proc/cpuinfo

Depending on the CPU, load one of the following modules with the 'modprobe' command:

p4-clockmod (Intel) powernow-k6 (AMD K6) powernow-k7 (AMD K7) powernow-k8 (AMD K8) longhaul (VIA Nehemiah)

If you choose a wrong driver you will get an error message and module is not loaded, nothing goes wrong.

Alternatively you can try

acpi-cpufreq

It is not so efficient as CPU specific modules, but better than nothing.

There are drivers for certain chipsets not only for CPU's but it is out of the scope of this introduction.

#VIEW CPU FREQUENCY INFORMATION

Now you can check actual CPU frequency and other information. Type in a terminal window:

cpufreq-info

and you will get a similar screen:

#GOVERNORS

Governors are kernel modules changing the CPU frequency. There are different governors implementing different rules:

powersave - sets the lowest possible frequency constantly
performance - sets the possible highest frequency constantly
ondemand - changes frequency automatically based upon actual demand of programs
conservative - same as ondemand but with a different algorithm, better for notebook battery use
userspace - allows userspace programs (or any process running as root) to set the frequency

Above governors are modules, loaded automatically when needed, but you can modprobe them before using. Default is performance.

For most systems, the Ondemand governor can provide the best compromise between heat emission, power consumption, performance, and manageability. When the system is only busy at specific times of the day, the Ondemand governor will automatically switch between maximum and minimum frequency depending on the load without any further intervention.

#SELECT GOVERNOR

At this point everything is prepared but no active governor selected and no running third party daemon installed, so no any power saving yet.

Use the 'cpufreq-set' command to activate one of the governors mentioned above, for example:

cpufreq-set -g ondemand

Please note, if you have a dual-core or multiple-core CPU, you must specify explicitely the CPU. There are CPU's where each core can run with different setting! Example for a dual-core CPU:

cpufreq-set -c 0 -g conservative cpufreq-set -c 1 -g conservative

You can explicitely specify the frequency also.

#MAN PAGES

#USER SPACE PROGRAMS

There are user space programs to manage not only cpu frequency but other components also. One of those, cpufreqd is part of the cpufreq.tcel/tcpufreq.tcz extension installed.

For the curious there are many good articles on the net.

Print/export
QR Code
QR Code wiki:cpu_frequency_scaling_basics (generated for current page)