Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:cpu_frequency_scaling_basics [2011/09/30 23:20] – added some linebreaks littlebat | wiki:cpu_frequency_scaling_basics [2014/12/26 06:43] (current) – bmarkus | ||
---|---|---|---|
Line 3: | Line 3: | ||
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. | 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. | ||
- | CPU frequency scaling | + | TC4 activates |
- | It is a short introductory article how to enable and use it. There are plenty of additional | + | In most cases it works fine and you do not need any additional |
- | + | However, as there are certain setups where either not all required drivers are automatically loaded | |
- | ===== #TOOLS REQUIRED ===== | + | |
- | + | ||
- | You need the cpufreq.tcz extension | + | |
- | + | ||
- | + | ||
- | ===== #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/ | + | |
- | + | ||
- | Depending on the CPU, load one of the following modules with the 'modprobe' | + | |
- | + | ||
- | p4-clockmod | + | |
- | powernow-k6 (AMD K6) | + | |
- | powernow-k7 (AMD K7) | + | |
- | powernow-k8 (AMD K8) | + | |
- | longhaul | + | |
- | + | ||
- | If you choose | + | |
- | + | ||
- | Alternatively you can try | + | |
- | + | ||
- | acpi-cpufreq | + | |
- | + | ||
- | It is not so efficient as CPU specific | + | |
- | + | ||
- | 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 ===== | ===== #VIEW CPU FREQUENCY INFORMATION ===== | ||
- | Now you can check actual CPU frequency | + | If you want to view actual CPU frequency |
cpufreq-info | cpufreq-info | ||
- | and you will get a similar screen: | ||
- | {{" | ||
Line 59: | Line 29: | ||
userspace - allows userspace programs (or any process running as root) to set the frequency | 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. | + | Above governors are modules, loaded automatically when needed, but you can modprobe them before using. |
- | For most systems, the Ondemand | + | For most systems, the ' |
- | ===== #SELECT | + | ===== #CHANGING |
- | At this point everything is prepared but no active | + | If you want to use a different |
Use the ' | Use the ' | ||
- | cpufreq-set -g ondemand | + | cpufreq-set -g performance |
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: | 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: | ||
Line 90: | Line 60: | ||
===== #USER SPACE PROGRAMS ===== | ===== #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/ | + | There are user space programs to manage not only cpu frequency but other components also. One of those, cpufreqd is available in the repository. |
+ | |||
+ | |||
+ | ===== # | ||
- | For the curious there are many good articles | + | The following relates to a Pentium M under TC3.8.4 (2.6.33.3 kernel) running |
+ | laptop, but may still be applicable if you run into a similiar problem.\\ | ||
+ | Installed cpufrequtils and selected ondemand govenor. The policy line from the cpufreq-info command read:\\ | ||
+ | < | ||
+ | indicated that CPU was locked at 800Mhz. Executing the command: | ||
+ | < | ||
+ | returned the value 800000 (frequency in Khz). Using the boot code: | ||
+ | < | ||
+ | fixed that. Now bios_limit contains 2267000 (2.267Ghz), the maximum speed for this CPU. Checking\\ | ||
+ | \proc\cpuinfo several times showed that the frequency was bouncing between 800Mhz and 2.27Ghz\\ | ||
+ | even though the machine was not doing anything. Changing the governor to conservative fixed that.\\ | ||
+ | For links to bug reports that helped solve this problem, see:\\ | ||
+ | http:// |