# cpufreq broken?

## genfive

After i upgraded to kernel 2.6.17-r4, the cpufreqd no longer works.  cpufreq-info gives the following:

```

cpufrequtils 001: cpufreq-info (C) Dominik Brodowski 2004-2006

Report errors and bugs to linux@brodo.de, please.

analyzing CPU 0:

  no or unknown cpufreq driver is active on this CPU

```

and cpufreqd gives the following error upon start up

```

 * cpufreqd requires the kernel to be configured with CONFIG_CPU_FREQ

```

but I do have the kernel configured correctly, and I have also re-emerged cpufreqd

```

 # grep -i "CPU_FREQ" .config

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_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

```

does anyone have a similar problem? My machine has a centrino.

----------

## Brainfart

I had that problem when I tried 2.6.16, but I've not tried 2.6.17 yet (went back to 2.6.15)

----------

## tylerwylie

I have this problem too, will probably jump back a kernel as well.

Bout to give it a go on the 2.6.16 kernel. Will update with results.

----------

## tylerwylie

2.6.16 works for me, tried all the governors and frequencies, and they all work.

----------

## genfive

i got 2.6.17 working. the support must be built in kernel, instead of compiled as modules.

----------

## nichocouk

mmmh, strange, I have the same problem that you describe in your first post - although I've just installed cpufreqd so I haven't tested it on other kernels - and I have support built in the kernel, not as modules.

----------

## madams

I stopped using the cpufreq daemon with the introduction of the  CONFIG_CPU_FREQ_GOV_CONSERVATIVE kernel options..  Adjustment of the CPU is handled within the kernel  (i.e. no need for the userspace daemon), unless of course you have some unusual needs that the 'conservative' governor doesn't satisfy..

I find the slew rates of the CPU freq. adjustments  on 'conservative' option to be quite suitable for most laptop usage..

http://www.thinkwiki.org/wiki/How_to_make_use_of_Dynamic_Frequency_Scaling

hope this helps..

this post is worth exactly $0.02

----------

## genfive

I tried the conservative governor as a module, but found the change rate to be too slow. the same with ondemand, which made my screen too flashy... But then again, I am not a republican...

----------

## madams

It is all configurable through the 'sysfs'.   i.e by 'cat'ing the appropriate values to files in /sys/devices/system/cpu/cpu0/cpufreq/conservative

there is quite a bit of lattitude in setting the 'throttling' characteristics. (i.e how quickly it reacts to cpu loads)

[excerpted from  /usr/src/linux-2.6.16-suspend2-r8/Documentation/cpu-freq/governors.txt]

 *Quote:*   

> The CPUfreq governor "conservative", much like the "ondemand"
> 
> governor, sets the CPU depending on the current usage.  It differs in
> 
> behaviour in that it gracefully increases and decreases the CPU speed
> ...

 

----------

## nichocouk

Thanks for the interesting HOWTO. Here is another one from the Gentoo Wiki. I've been reading through it very quickly but I was surprised to see that the author adds cpufrequtils to its runlevel rather than cpufreqd. What's the difference?

----------

## madams

 *Quote:*   

> nichocouk  	
> 
> PostPosted: Mon Jul 31, 2006 3:20 pm    Post subject:
> 
> Thanks for the interesting HOWTO. Here is another one from the Gentoo Wiki. I've been reading through it very quickly but I was surprised to see that the author adds cpufrequtils to its runlevel rather than cpufreqd. What's the difference?

 

It has been a while since I used any of the 'userspace' daemons (using the 'conservative' governor now), but as I recall there were actually quite a few daemons to choose from.  Personally, with the improved support within the kernel, I don't see the need for the userspace daemons anymore (i.e. cpufreqd, cpufrequtils, etc), unless I am missing something, I expect they will become depreacated in the future..

----------

## nichocouk

 *madams wrote:*   

> It has been a while since I used any of the 'userspace' daemons (using the 'conservative' governor now), but as I recall there were actually quite a few daemons to choose from.  Personally, with the improved support within the kernel, I don't see the need for the userspace daemons anymore (i.e. cpufreqd, cpufrequtils, etc), unless I am missing something, I expect they will become depreacated in the future..

 

I may consider this option as well.

But coming back to the error given above, the init file for cpufreqd says:

```
        if [[ ! -e /proc/cpufreq ]] && [[ ! -e /sys/devices/system/cpu/cpu0/cpufreq ]]; then

                eerror "cpufreqd requires the kernel to be configured with CONFIG_CPU_FREQ"

                return 1

        fi

```

Should these files have been created by the kernel, or what? Can/should we create them by hand? How?

Thanks for your help   :Smile: 

----------

## madams

Those files are created by the kernel, so no, creating them by hand will do nothing as the kernel won't read them..  either a) you don't have the kernel options configured (under cpu frequency scaling), or b) you have them configured as modules and the modules are not loaded (i.e. need to 'modprobe' them)..  

( I have heard that modules don't work, must be configured in the kernel itself).

dumb question, if you do in fact have them configured in the kernel..  did you remember to install the new kernel??      :Wink: 

----------

## nichocouk

```
$ grep CPU_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_USERSPACE=y

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

```

I'm pretty sure the kernel is installed, but it was worth asking!   :Wink: 

Could it be because the default_gov_userspace is set? Should I go back to default_gov_performance? mmm, that would not make sense to me anyway...

----------

## cradlebin

I solved this error by doing:

```

modprobe speedstep_centrino

```

You just have to find the right module to load for your system (one of the ones listed in the kernel config I suppose).

----------

## Belgabor

No, there's definately something broken. I just went from 2.6.17-rc5-mm1 to 2.6.18-rc2-mm1 using the same .config with 'make oldconfig' and /sys/.../cpufreq is gone (got a P4).

----------

## tobimat80

I experience the same problem. After doing a fresh 2006.1 install speedstepping with cpufreqd no longer works. I used a 2.6.16 and a 2.6.17 kernel. What is strange is the fact that cpufreqd worked before with the same 2.6.16 kernel ??

----------

## xathin

I am also having this problem.  I am using 2006.1, just installed, using suspend2-sources-2.6.17-r5 and am getting the same errors every time I try to start cpufreqd.  I have everything built-in except for ACPI Processor P-States driver, which cannot be selected to be built-in.  Simply using a governor would be fine, except for the fact that there is no /sys/devices/system/cpu/cpu0/cpufreq directory.  As this is supposed to get created by the kernel, that would imply that there is something wrong with the kernel, would it not?  Or at least those modules within the kernel.

Also, I noticed while building the kernel, I get the following warning:

```
WARNING: drivers/acpi/processor.o - Section mismatch: reference to .init.data: from .text between 'acpi_processor_power_init' (at offset 0xe64) and 'acpi_safe_halt'
```

Not sure if this is related.

----------

## Sachankara

 *madams wrote:*   

> It has been a while since I used any of the 'userspace' daemons (using the 'conservative' governor now), but as I recall there were actually quite a few daemons to choose from.  Personally, with the improved support within the kernel, I don't see the need for the userspace daemons anymore (i.e. cpufreqd, cpufrequtils, etc), unless I am missing something, I expect they will become depreacated in the future..

 Uhm, yeah, sure... Tell that to us who actually doesn't have hardware cpu scaling (everyone who has [have?] a CPU older than the latest of the latest). The kernel developers try to move as much as they can to user space, so I don't see them putting in software cpu scalers into the kernel anytime soon.

----------

## xathin

Ok...I got my suspend2-sources-2.6.17-r5 to work with cpufreqd.  I emerged the previous version (suspend2-sources-2.6.16-r12) and configured that as I normally would.  Tried running cpufreqd, and everything worked fine, as it always did.  I then copied the .config file into the other directory (2.6.17-r5) and ran "make oldconfig".  Chose mostly the default options for things that changed, and built the new kernel.  After booting into the new kernel, the file system for cpu scaling was there, and cpufreqd started without any problems.

I'm guessing there was an option that was changed from the previous version that caused this to happen.  Hope this helps everyone having similar problems.  I would assume that the same could be done with any of the sources available.  Now to just figure out how to get my wireless card working with the kernel native drivers, and I'll be set.   :Very Happy: 

----------

## noice

 *genfive wrote:*   

> After i upgraded to kernel 2.6.17-r4, the cpufreqd no longer works.  cpufreq-info gives the following:
> 
> ```
> 
> cpufrequtils 001: cpufreq-info (C) Dominik Brodowski 2004-2006
> ...

 

i have had same problem and i've compiled my kernel (2.6.17-r7) in this way

```
grep "CONFIG_CPU_FREQ" /usr/src/linux/.config

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

CONFIG_CPU_FREQ_DEBUG=y

CONFIG_CPU_FREQ_STAT=y

CONFIG_CPU_FREQ_STAT_DETAILS=y

CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE 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

```

and it works:D

----------

## tomatopi

I'm also having the problem of missing /sys/devices/system/cpu/cpu0/cpufreq.

grep CPU_FREQ .config:

```
CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

CONFIG_CPU_FREQ_DEBUG=y

CONFIG_CPU_FREQ_STAT=y

CONFIG_CPU_FREQ_STAT_DETAILS=y

CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE 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

```

grep SPEED .config:

```
CONFIG_X86_SPEEDSTEP_CENTRINO=y

CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y

# CONFIG_X86_SPEEDSTEP_ICH is not set

# CONFIG_X86_SPEEDSTEP_SMI is not set

# CONFIG_X86_SPEEDSTEP_LIB is not set

```

dmesg | grep CPU:

```

Initializing CPU#0

CPU 0 irqstacks, hard=c02fe000 soft=c02fd000

CPU: After generic identify, caps: afe9fbff 00100000 00000000 00000000 00000180 00000000 00000000

CPU: After vendor identify, caps: afe9fbff 00100000 00000000 00000000 00000180 00000000 00000000

CPU: L1 I cache: 32K, L1 D cache: 32K

CPU: L2 cache: 2048K

CPU: After all inits, caps: afe9fbff 00100000 00000000 00000040 00000180 00000000 00000000

Intel machine check reporting enabled on CPU#0.

CPU: Intel(R) Pentium(R) M processor 1.50GHz stepping 08

ACPI: CPU0 (power states: C1[C1] C2[C2] C3[C3])

ACPI: Processor [CPU] (supports 8 throttling states)

```

It's a new IBM X41 Tablet and I've tried kernel 2.6.17-gentoo-r7 and r8 with no differences. Am I missing something? I'd like to get power-saving working on this tablet but I'm having no luck at all.

Thanks

----------

## kamracik

i have problem with linux-2.6.18-gentoo just cant make scaling working.. https://forums.gentoo.org/viewtopic-t-504187-highlight-.html

with previous version everything just work fine and with even make oldconfig its fails

----------

