CPU Frequency doesn't work on cpufreqd

Asked by laptoplinux

I had an interesting and frustrating problem.

I had to reinstall Jaunty due to a borked Karmic upgrade. Prior to that I was successfully running cpu frequency scaling and could use the gnome applet as well.

So I am setting it up again on a clean install of Jaunty and it works fine. I could change frequencies with the gnome applet etc, I reboot once and something went wacko.

The applet will let me select different frequencies/governors but would not actually change the frequency! After doing some troubleshooting I discovered that the minimum frequency had somehow become set to the highest frequency possible.
Hopefully the info below will make what I am trying to explain clearer.

************************************************************************************
cpufreq-info
cpufrequtils 004: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to <email address hidden>, please.
analyzing CPU 0:
  driver: p4-clockmod
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 175 MHz - 1.40 GHz
  available frequency steps: 175 MHz, 350 MHz, 525 MHz, 700 MHz, 875 MHz, 1.05 GHz, 1.23 GHz, 1.40 GHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 1.40 GHz and 1.40 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.40 GHz.
  cpufreq stats: 175 MHz:0.00%, 350 MHz:0.00%, 525 MHz:0.00%, 700 MHz:0.00%, 875 MHz:0.00%, 1.05 GHz:0.00%, 1.23 GHz:0.00%, 1.40 GHz:0.00%
******************************************************************************************
cat scaling_min_freq 1400000
******************************************************************************************

So for some reason I could not understand, cpu frequency scaling thought that the minimum speed is 1400000 and the maximum is 1400000 which is causing my problem.

It turns out that Jaunty doesn't like cpufreqd which is odd given I had successfully used it for quite sometime. cpufreqd forces the minimum frequency value to be the same as the maximum so I will also file it as a bug.

The powernowd and cpydyn function properly. Data follows:

cpufreqd
:/sys/devices/system/cpu/cpu0/cpufreq$ cat scaling_*175000 350000 525000 700000 875000 1050000 1225000 1400000
conservative ondemand userspace powersave performance
1400000
p4-clockmod
powersave
1400000
1400000
<unsupported>

powernowd
:/sys/devices/system/cpu/cpu0/cpufreq$ cat scaling_*175000 350000 525000 700000 875000 1050000 1225000 1400000
conservative ondemand userspace powersave performance
175000
p4-clockmod
ondemand
1400000
175000
<unsupported>

cpudyn
:/sys/devices/system/cpu/cpu0/cpufreq$ cat scaling_*175000 350000 525000 700000 875000 1050000 1225000 1400000
conservative ondemand userspace powersave performance
1400000
p4-clockmod
performance
1400000
175000
<unsupported>

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Matthew Lange
Solved:
Last query:
Last reply:
Revision history for this message
Best Matthew Lange (matthewlange) said :
#1

Hi! I recently had a similar problem.

This should fix it for you:
sudo cpufreq-set -c 0 -d 175Mhz -u 1.40Ghz

NB: You can replace the 175Mhz above with whatever lower limit you want your CPU to reach, out of the list you provided: "175 MHz, 350 MHz, 525 MHz, 700 MHz, 875 MHz, 1.05 GHz, 1.23 GHz, 1.40 GHz"

Just for reference of others, here's an explaination of the command I gave above:

sudo (Act as superuser)
cpufreq-set (Set the CPU Frequency options)
-c 0 (For CPU 0... (as specified in cpufreq-info))
-d 175Mhz (Set the lower CPU limit for CPU 0 to 175 Mhz)
-u 1.40Ghz (Set the upper CPU limit for CPU 0 to 1.4 Ghz)

See 'man cpufreq-set' for more information, if you are curious :-)

Cheers!

Revision history for this message
laptoplinux (laptoplinux) said :
#2

Thanks Matthew Lange, that solved my question.