# cpu frequency scale not working

## raphiusks

Hi,

I recently changed my 2.2ghz core2duo to a 2.8ghz core2duo (E7400)..

I have no idea why, tried lots of different combination on acpi kernel settings after it refused to run, but just can't get cpufreqscaling launch to run anymore. There's nothing on dmesg that could help..

I have emerged cpufrequtils, and i get the following message:

insane log # cpufreq-info 

cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009

Report errors and bugs to cpufreq@vger.kernel.org, please.

analyzing CPU 0:

  no or unknown cpufreq driver is active on this CPU

  maximum transition latency: 4294.55 ms.

analyzing CPU 1:

  no or unknown cpufreq driver is active on this CPU

  maximum transition latency: 4294.55 ms.

As far as i've been able to find (read Wiki, other users posts on forum, Intel's specs to this processor,...) theres nothing that makes me believe that it has any difference would keep cpufreq from running.

Output from cat on .config for acpi and cpu:

CPU:

# CPU Frequency scaling

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

# CONFIG_CPU_FREQ_DEBUG is not set

CONFIG_CPU_FREQ_STAT=y

# CONFIG_CPU_FREQ_STAT_DETAILS is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set

CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_POWERSAVE=y

CONFIG_CPU_FREQ_GOV_USERSPACE=y

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

# CPUFreq processor drivers

# CONFIG_X86_PCC_CPUFREQ is not set

CONFIG_X86_ACPI_CPUFREQ=y

CONFIG_CPU_IDLE=y

CONFIG_CPU_IDLE_GOV_LADDER=y

CONFIG_CPU_IDLE_GOV_MENU=y

acpi:

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_PROCESSOR_AGGREGATOR=m

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_CUSTOM_DSDT is not set

# CONFIG_ACPI_CUSTOM_OVERRIDE_INITRAMFS is not set

CONFIG_ACPI_BLACKLIST_YEAR=0

# CONFIG_ACPI_DEBUG is not set

CONFIG_ACPI_PCI_SLOT=y

# CONFIG_ACPI_CONTAINER is not set

# CONFIG_ACPI_SBS is not set

# CONFIG_ACPI_HED is not set

# CONFIG_ACPI_APEI is not set

CONFIG_X86_ACPI_CPUFREQ=y

# CONFIG_HOTPLUG_PCI_ACPI is not set

CONFIG_PNPACPI=y

CONFIG_ATA_ACPI=y

insane log # uname -a

Linux insane 2.6.35-zen3+ #17 ZEN SMP PREEMPT Sun Oct 3 11:03:40 FNT 2010 x86_64 Intel(R) Core(TM)2 CPU E7400 @ 2.80GHz GenuineIntel GNU/Linux

thanks anyone who can help me out.

----------

## albright

what are the values of

/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

/sys/devices/system/cpu/cpu0/cpufreq/scaling_max[min]_freq

/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

I've found sometimes these are not properly setup

----------

## raphiusks

hi albright,

It seems i do not have those files.. 

insane log # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

cat: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: No such file or directory

insane log # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max[min]_freq 

cat: /sys/devices/system/cpu/cpu0/cpufreq/scaling_max[min]_freq: No such file or directory

insane log # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies 

cat: /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies: No such file or directory

Inside cpu0 folder i've got only:

insane log # ls /sys/devices/system/cpu/cpu0/                                      

cache  microcode  thermal_throttle  topology

that's gotta mean something.. and i feel its not good   :Crying or Very sad: 

----------

## albright

well ... it looks like cpufreqd is not running. Try /etc/init.d/cpufreqd start;

maybe there is a module problem. Is acpi-cpufreq loaded?

----------

## raphiusks

hi albright..

I never had cpufreqd installed and i could get cpu freq applet on gnome to work anyways

But to test it, i emerged it and tried to start but i got the following error:

insane raphael # /etc/init.d/cpufreqd start

 * Caching service dependencies ...                                                                                                                                        [ ok ]

 * cpufreqd requires the kernel to be configured with CONFIG_CPU_FREQ

 * Make sure that the appropiate kernel drivers for your CPU are

 * built-in or loaded.

 * ERROR: cpufreqd failed to start

But.. 

insane raphael # cat /usr/src/zen.git/.config | grep CONFIG_CPU_FREQ

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

# CONFIG_CPU_FREQ_DEBUG is not set

CONFIG_CPU_FREQ_STAT=y

# CONFIG_CPU_FREQ_STAT_DETAILS is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set

CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_POWERSAVE=y

CONFIG_CPU_FREQ_GOV_USERSPACE=y

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

So yeah, im lost. It seems i`ve built my kernel as its supposed to, but somehow it can`t detect that it does support cpu freq scaling...

I can modprobe acpi_cpufreq normally tho.

Thanks for helping out.

----------

## albright

this is getting confusing ... 

so *after* loading acpi-cpufreq module you still get the error

when you try to start cpurfreqd? What's the output of

uname -a?

----------

## raphiusks

hi albright,

sorry for not replying earlier but i had to travel for a few days.

yes, i could modprobe acpi-cpufreq normally without errors, but was unable to start cpufreqd.. now it changed

here is what i did to give it a try:

i completely removed cpufreq support on the kernel and used it for a while w/o it..

yesterday i recompiled it back with cpufreq support and now i get a new error message:

insane / # modprobe acpi-cpufreq

FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.35-zen3+/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko): No such device

althought:

insane / # ls /lib/modules/2.6.35-zen3+/kernel/arch/x86/kernel/cpu/cpufreq/

acpi-cpufreq.ko  mperf.ko  pcc-cpufreq.ko

of course when i try to start cpufreqd it gives me the same error:

insane / # /etc/init.d/cpufreqd start

 * cpufreqd requires the kernel to be configured with CONFIG_CPU_FREQ

 * Make sure that the appropiate kernel drivers for your CPU are

 * built-in or loaded.

 * ERROR: cpufreqd failed to start

this is the output:

insane / # uname -a

Linux insane 2.6.35-zen3+ #22 ZEN SMP PREEMPT Thu Oct 14 20:35:03 FNT 2010 x86_64 Intel(R) Core(TM)2 CPU E7400 @ 2.80GHz GenuineIntel GNU/Linux

let me know if you need extra infos.. thanks again

----------

## albright

it's weird; what is the output of

grep FREQ /usr/src/linux/.config

( mine is:

```

grep FREQ /usr/src/linux/.config

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

# CONFIG_CPU_FREQ_DEBUG is not set

CONFIG_CPU_FREQ_STAT=y

# CONFIG_CPU_FREQ_STAT_DETAILS is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set

CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_POWERSAVE=y

CONFIG_CPU_FREQ_GOV_USERSPACE=y

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

# CONFIG_X86_PCC_CPUFREQ is not set

CONFIG_X86_ACPI_CPUFREQ=m
```

----------

## raphiusks

insane raphael # grep FREQ /usr/src/linux/.config 

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

# CONFIG_CPU_FREQ_DEBUG is not set

CONFIG_CPU_FREQ_STAT=y

# CONFIG_CPU_FREQ_STAT_DETAILS is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set

CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_POWERSAVE=y

CONFIG_CPU_FREQ_GOV_USERSPACE=y

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

# CONFIG_X86_PCC_CPUFREQ is not set

CONFIG_X86_ACPI_CPUFREQ=y

trying a different kernel version now..

insane raphael # uname -a

Linux insane 2.6.35-gentoo-r10 #1 SMP PREEMPT Sat Oct 16 14:21:23 FNT 2010 x86_64 Intel(R) Core(TM)2 CPU E7400 @ 2.80GHz GenuineIntel GNU/Linux

i also found an error on my X log, about acpid.socket not opened.. i`ve added it to boot runlevel and the error is gone, tho im still unable to get cpufreq to work, keeps on complaining about kernel support..

insane raphael # /etc/init.d/cpufreqd start

 * cpufreqd requires the kernel to be configured with CONFIG_CPU_FREQ

 * Make sure that the appropiate kernel drivers for your CPU are

 * built-in or loaded.

 * ERROR: cpufreqd failed to start

i wish i could get it off my head and move on to another subject, but things not working pizz me off! specially when it really seems that i got everything configured the right way

----------

## ssteinberg

Do this:

gzip -dc /proc/config.gz | grep FREQ

----------

## albright

you have acpi-cpufreq built in - try to build it as

a module; you never know it might work this time  :Smile: 

----------

## raphiusks

 :Sad:   :Sad: 

insane ~ # modprobe acpi-cpufreq (after compiling as a module)

FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.35-gentoo-r10/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko): Invalid module format

insane ~ # gzip -dc /proc/config.gz | grep FREQ

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

# CONFIG_CPU_FREQ_DEBUG is not set

CONFIG_CPU_FREQ_STAT=y

# CONFIG_CPU_FREQ_STAT_DETAILS is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set

CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_POWERSAVE=y

CONFIG_CPU_FREQ_GOV_USERSPACE=y

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

# CONFIG_X86_PCC_CPUFREQ is not set

CONFIG_X86_ACPI_CPUFREQ=y

----------

## ssteinberg

Post full dmesg output please.

----------

## albright

something is messed up with the kernels your using;

notice that /proc/config.gz still thinks acpi-cpufreq is

built in, NOT a module. Looks like you're trying to insert

a module built for a different kernel than the one you're

running ... (or something like that)

----------

## albatroz

Hi, I'm have this same problem, have you found any solution?

All the issues you have discribed I'm also having.

```

# uname -a

Linux patoo 2.6.36-gentoo-r5 #1 SMP Tue Dec 14 22:15:50 CET 2010 x86_64 Intel(R) Core(TM)2 Quad CPU @ 2.40GHz GenuineIntel GNU/Linux

```

Have just build cpu_freq has a module and it fails when modprobe it.

```

# sudo modprobe acpi-cpufreq

FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.36-gentoo-r5/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko): No such device

# grep FREQ /usr/src/linux/.config

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

# CONFIG_CPU_FREQ_DEBUG is not set

CONFIG_CPU_FREQ_STAT=m

CONFIG_CPU_FREQ_STAT_DETAILS=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set

CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_POWERSAVE=m

CONFIG_CPU_FREQ_GOV_USERSPACE=m

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m

CONFIG_X86_PCC_CPUFREQ=m

CONFIG_X86_ACPI_CPUFREQ=m

```

I have a similar kernel config.

----------

## fidel

Has anybody found a solution to this yet? I as well get this error. I guess its a bug in this kernel version:

```
# uname -srvmpio

Linux 2.6.36-gentoo-r5 #1 SMP Sun Jan 16 08:36:08 CET 2011 x86_64 Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz GenuineIntel GNU/Linux

# zgrep -i freq /proc/config.gz 

# CPU Frequency scaling

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=m

# CONFIG_CPU_FREQ_DEBUG is not set

# CONFIG_CPU_FREQ_STAT is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set

CONFIG_CPU_FREQ_GOV_PERFORMANCE=m

CONFIG_CPU_FREQ_GOV_POWERSAVE=m

CONFIG_CPU_FREQ_GOV_USERSPACE=y

CONFIG_CPU_FREQ_GOV_ONDEMAND=m

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m

# CPUFreq processor drivers

CONFIG_X86_PCC_CPUFREQ=m

CONFIG_X86_ACPI_CPUFREQ=m

# modprobe acpi-cpufreq

FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.36-gentoo-r5/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko): No such device
```

 *albright wrote:*   

> something is messed up with the kernels your using

 

I don't think this is the problem, look at the error message, it doesn't tell that the insertion of the module is a problem - the module cannot find an appropriate device: "No such device". Either there is a module missing, the current acpi-cpufreq is broken or my processor doesn't support frequency scaling at all.

Anybody?

----------

## fidel

Ok, in my case the problem were the bios settings! Frequency scaling - Intel Enhanced Speedstep was disabled, so I needed to enable it and the device now appears. I now remember why having this set, enabling states (c2,c3...) at the same time causes the machine to suddenly power off. I didn't figure out that just enabling speedstep without enabling states seems to work fine, the machine hasn't powered off so far  :Smile: 

So everythings fine for me.

----------

## phd

I have similar problem, and similar options setup in the kernel. But in my case (Aptio Setup Utility 2007, Vaio VGN-SR29VN) there is no section in the bios I could switch on an Intel speedstep. In the bios the following sections are available only: Main - I can set up time and date only; Security - hard disk passwd, TPM state, clear fingerprint data; Boot; Exit.   

How can I force the bios in Vaio to control cpu speed?

----------

## fidel

Most probably (hopefully) your hardware has speedstepping already enabled. What exactly are the errors you get? Whereas raphiusks had a problem with the kernel(s), my problem was the bios settings. In order to find out, what your problem is, tell us, what 

```
# modprobe acpi-cpufreq
```

 and what 

```
# zgrep -i freq /proc/config.gz
```

 gives you.

----------

## phd

After loading acpi-cpufreq I had got 

zgrep -i freq /proc/config.gz

gzip: /proc/config.gz: No such file or directory

Fortunately, cpufreq-info gave

 *Quote:*   

> cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
> 
> Report errors and bugs to cpufreq@vger.kernel.org, please.
> 
> analyzing CPU 0:
> ...

 

which means that the problem was with not loaded acpi-cpufreq module. I must reread the Power Management Guide and set up some modules to default and batterry level. This was my mistake. Thank you for help.

----------

