First we need to install this packages:
cpufrequtils
cpuspeed
also recomend to install
lm_sensors
To install those packages you can simple do:
yum install cpufrequtils cpuspeed lm_sensors
after installing those packages you will have some information about your CPU by typing cpufreq-info
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which need to switch frequency at the same time: 0
hardware limits: 1.87 GHz - 3.20 GHz
available frequency steps: 3.20 GHz, 2.93 GHz, 2.67 GHz, 2.40 GHz, 2.13 GHz, 1.87 GHz
available cpufreq governors: userspace, performance
,ondemand
current policy: frequency should be within 1.87 GHz and 3.20 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1.87 GHz.
This will show you what driver control your CPU frequency and the policy is set and the frequency it is working at the moment you run the command.
cpufreq-set -c 0 -f 3.20 GHz -g performance
where C is the CPU number
f is the frequency you want
g is the governor you are setting
Let check the change
cpufreq-info
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which need to switch frequency at the same time: 0
hardware limits: 1.87 GHz - 3.20 GHz
available frequency steps: 3.20 GHz, 2.93 GHz, 2.67 GHz, 2.40 GHz, 2.13 GHz, 1.87 GHz
available cpufreq governors: userspace, performance
current policy: frequency should be within 1.87 GHz and 3.20 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency is 3.20 GHz.
Remember you need to do this set for each CPU if you have more that one CPU.
Of course this will set your CPU frequency for this session but what if you want to set your CPU to a 100% frequency every time you boot your notebook, then you need to use the cpuspeed service.
First we need to edit the cpuspeed configuration file that is at /etc/sysconfig/ , you can edit this file with vi or your favorite editor, you will need to change this line
GOVERNOR=
to
GOVERNOR=performance
this will set you CPU to full speed all the time, to change the way it behave when it is working with the battery look at the en of the file and uncommend the line
OPTS="$OPTS -a /proc/acpi/ac_adapter/*/state "
you can also uncomment this
# uncomment and modify this to check the state of the AC adapter
OPTS="$OPTS -a /proc/acpi/ac_adapter/*/state "
you may need to change this line to the location of your temperature file normally at acpi but it may vary depending on you system
# uncomment and modify this to check the system temperature
OPTS="$OPTS -t /proc/acpi/thermal_zone/temperature 65"
if you restart you system you will see your CPU frequency changes. Also if you added the CPU performance applet on you desktop you can see your changes.
You may need to read more on the way cpuspeed there are more settings there. Please use this information with care your and at your risk.