# CPUFreq Not working, tried other solutions but still nothing

## J0KeRZ

Hello, well this is my first post ever in the Gentoo Forums  :Wink:  because I usually find the solutions here in these forums which has been a great help, and now it seems that I cant get help without posting my problem.  So here it is:

I cant get the cpufreq to detect my CPU Properly [ I have tried almost all of the solutions posted in these forums BTW, just to let you guys/girls know  :Very Happy:  ]

```
PHanTOM j0kerz # cpufreq-info

cpufrequtils 0.3: cpufreq-info (C) Dominik Brodowski 2004

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

analyzing CPU 0:

  no or unknown cpufreq driver is active on this CPU
```

-> I also notice that there is nothing in the cpu0 directory where all the governors should be.

```
PHanTOM j0kerz # cd /sys/devices/system/cpu/cpu0/

PHanTOM cpu0 # ls

PHanTOM cpu0 #

```

 ->Hitting the dmesg, it shows i have a speedfreq capable computer [ Intel Centrino ]

```
Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

CPU: Intel(R) Pentium(R) M processor 1.70GHz stepping 06

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

```

-> I am running a VGN-S360 Sony Vaio Laptop.

-> I have tried using the options from the kernel from the similar laptop, the sony vgn-s260 with no success at all

http://www.adventure-today.com/vaio/

-> Here is my kernel config options [ At least the important ones, I think ]

```
#

#

# ACPI (Advanced Configuration and Power Interface) Support

#

CONFIG_ACPI=y

CONFIG_ACPI_BOOT=y

CONFIG_ACPI_INTERPRETER=y

CONFIG_ACPI_SLEEP=y

CONFIG_ACPI_SLEEP_PROC_FS=y

CONFIG_ACPI_AC=y

CONFIG_ACPI_BATTERY=y

CONFIG_ACPI_BUTTON=m

CONFIG_ACPI_VIDEO=m

CONFIG_ACPI_FAN=m

CONFIG_ACPI_PROCESSOR=m

CONFIG_ACPI_THERMAL=m

# CONFIG_ACPI_ASUS is not set

# CONFIG_ACPI_IBM is not set

# CONFIG_ACPI_TOSHIBA is not set

CONFIG_ACPI_BLACKLIST_YEAR=0

# CONFIG_ACPI_DEBUG is not set

CONFIG_ACPI_BUS=y

CONFIG_ACPI_EC=y

CONFIG_ACPI_POWER=y

CONFIG_ACPI_PCI=y

CONFIG_ACPI_SYSTEM=y

# CONFIG_X86_PM_TIMER is not set

# CONFIG_ACPI_CONTAINER is not set

# 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=y

# 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=m

# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set

#

# CPUFreq processor drivers

#

CONFIG_X86_ACPI_CPUFREQ=m

# CONFIG_X86_POWERNOW_K6 is not set

# CONFIG_X86_POWERNOW_K7 is not set

# CONFIG_X86_POWERNOW_K8 is not set

# CONFIG_X86_GX_SUSPMOD is not set

CONFIG_X86_SPEEDSTEP_CENTRINO=m

CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y

CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y

CONFIG_X86_SPEEDSTEP_ICH=y

# CONFIG_X86_SPEEDSTEP_SMI is not set

# CONFIG_X86_P4_CLOCKMOD is not set

# CONFIG_X86_CPUFREQ_NFORCE2 is not set

# CONFIG_X86_LONGRUN is not set

# CONFIG_X86_LONGHAUL is not set
```

-> lspci gives the following

```
0000:00:00.0 Host bridge: Intel Corporation 82855PM Processor to I/O Controller (rev 03)

0000:00:01.0 PCI bridge: Intel Corporation 82855PM Processor to AGP Controller (rev 03)

0000:00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 03)

0000:00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 03)

0000:00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 03)

0000:00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03)

0000:00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 83)

0000:00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03)

0000:00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 03)

0000:00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)

0000:00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03)

0000:00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03)

0000:01:00.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]

0000:02:04.0 CardBus bridge: Texas Instruments PCI7420 CardBus Controller

0000:02:04.2 FireWire (IEEE 1394): Texas Instruments PCI7x20 1394a-2000 OHCI Two-Port PHY/Link-Layer Controller

0000:02:04.3 Unknown mass storage controller: Texas Instruments PCI7420/PCI7620 Dual Socket CardBus and Smart Card Cont. w/ 1394a-2000 OHCI Two-Port  PHY/Link-Layer Cont. an

0000:02:08.0 Ethernet controller: Intel Corporation 82801DB PRO/100 VE (MOB) Ethernet Controller (rev 83)

0000:02:0b.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05)
```

-> Relavent Stuff in the kernel config:

```

#

# Bus options (PCI, PCMCIA, EISA, MCA, ISA)

#

CONFIG_PCI=y

# CONFIG_PCI_GOBIOS is not set

# CONFIG_PCI_GOMMCONFIG is not set

# CONFIG_PCI_GODIRECT is not set

CONFIG_PCI_GOANY=y

CONFIG_PCI_BIOS=y

CONFIG_PCI_DIRECT=y

CONFIG_PCI_MMCONFIG=y

# CONFIG_PCIEPORTBUS is not set

CONFIG_PCI_LEGACY_PROC=y

CONFIG_PCI_NAMES=y

CONFIG_ISA_DMA_API=y

CONFIG_ISA=y

# CONFIG_EISA is not set

CONFIG_MCA=y

# CONFIG_MCA_LEGACY is not set

# CONFIG_SCx200 is not set

```

This is my first dive into gentoo, and with the help of the forums, I have most of my hardware set up, but without setting CPUFreq there is no point in having gentoo linux on my laptop.

Any help would be extremely appriated, and if there is any other additional information you need about my system, please ask, thanx again.  :Very Happy: 

----------

## ikaro

the 2.6.12 branch have a new governor called "conservative" specially for Laptops.

its like the ondemand but with some tweaks for laptops - faster reaction - more powersave.

----------

## elestedt

 *J0KeRZ wrote:*   

> Hello, well this is my first post ever in the Gentoo Forums  because I usually find the solutions here in these forums which has been a great help, and now it seems that I cant get help without posting my problem.  So here it is:
> 
> I cant get the cpufreq to detect my CPU Properly [ I have tried almost all of the solutions posted in these forums BTW, just to let you guys/girls know  ]
> 
> ```
> ...

 

I just have to check: have you loaded the required modules? I noticed that you compiled everything as modules...

----------

## kare

J0KeRZ, did you solve your problem?

Try this:

```
modprobe acpi-cpufreq

modprobe speedstep-lib
```

Put the modules into /etc/modules.autoload.d/kernel-2.6

----------

## dgaffuri

That should definitely be CONFIG_X86_SPEEDSTEP_CENTRINO. Enable CONFIG_CPU_FREQ_DEBUG=y and look at dmesg for speedstep-centrino messages.

----------

## J0KeRZ

Thanx for the replies everyone, it seems like it is working right now, im gonna keep tabs on it see how it works out.

Here is the relavent kernel config:

```
#

# CPU Frequency scaling

#

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

#

# CPUFreq processor drivers

#

CONFIG_X86_ACPI_CPUFREQ=m

# CONFIG_X86_POWERNOW_K6 is not set

# CONFIG_X86_POWERNOW_K7 is not set

# CONFIG_X86_POWERNOW_K8 is not set

# CONFIG_X86_GX_SUSPMOD is not set

CONFIG_X86_SPEEDSTEP_CENTRINO=y

CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y

CONFIG_X86_SPEEDSTEP_ICH=y

# CONFIG_X86_SPEEDSTEP_SMI is not set

# CONFIG_X86_P4_CLOCKMOD is not set

# CONFIG_X86_CPUFREQ_NFORCE2 is not set

# CONFIG_X86_LONGRUN is not set

# CONFIG_X86_LONGHAUL is not set

```

Well many thanks to the suggestions:  :Smile:   I really appriciate, and hopefully i dont have to post any more problems in the future, YET Again, forums saved me!

----------

## CRIdpath

I'm have the same problem with my cpufreq.  My /sys/devices/system/cpu/cpu0 folder is empty.  Why is the directory empty.  I have all the modules built into the kernel.  Help...

----------

## elestedt

 *CRIdpath wrote:*   

> I'm have the same problem with my cpufreq.  My /sys/devices/system/cpu/cpu0 folder is empty.  Why is the directory empty.  I have all the modules built into the kernel.  Help...

 

Have you compiled everyting into the kernel? If not - are you sure that you selected the correct driver?

----------

## CRIdpath

I'm sure I compiled everything into the kernel correctly.  If you would like to make sure, after setting the options to built in. I "make && make modules_install".  That should have done it.  Which drivers are you talking about.  I'm sure the drivers are in correctly as well.  I have and ASUS laptop with AMD Turion 64.  Still need help with this empty cpu0 directory.  Without it, I can't use any of my power saving capabilities...

----------

## dgaffuri

 *CRIdpath wrote:*   

> I'm sure I compiled everything into the kernel correctly.  If you would like to make sure, after setting the options to built in. I "make && make modules_install".  That should have done it.  Which drivers are you talking about.  I'm sure the drivers are in correctly as well.  I have and ASUS laptop with AMD Turion 64.  Still need help with this empty cpu0 directory.  Without it, I can't use any of my power saving capabilities...

 

Did you install your kernel too? Just to be sure.

----------

## J0KeRZ

Yo CRIdpath,

Try using kare's solution, i think thats what ended up solving my problem, because im sure my settings were correct also, and now i notice acpi-cpufreq loading up at boot as a module, and everything works like a charm now [ just modprobe'ing speedstep-lib didnt do anything  :Question:  ] .  Try that,  :Very Happy: 

Ohh and thanx kare.

----------

## coolsnowmen

I solved your problem on a Turion Amd64 modile on an asus board.

*warning* this involves editing kernel code:

By enabling the cpufreq.debug=4

I noticed 

```

powernow-k8: maxvid exceeded with pstate 2

```

This is found in the "check_pst_table" function from

    /usr/src/linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c

```

                if (pst[j].vid < maxvid + data->rvo) {  /* vid + rvo >= maxvid */

                        printk(KERN_ERR BFX "maxvid exceeded with pstate %d\n", j);

                        return -ENODEV;

                }

```

I simply commented it out:  (make sure to remove the author's comment or the compiler may get very confused  :Exclamation: 

/*                if (pst[j].vid < maxvid + data->rvo) { 

                        printk(KERN_ERR BFX "maxvid exceeded with pstate %d\n", j);

                        return -ENODEV;

                }

*/

This appears to be a check on the values the bios poll returns.  The code doesn't actually DO anything.  Being as the author of the powernow-k8 code  worked for AMD  and I trust asus boards, I decided to try it and cross my fingers.

After a 

```
 make mrproper 
```

 (we dont want any old object files laying around)

recompile the kernel and boot.

From this: http://gentoo-wiki.com/HOWTO_PowerNow!

I got the "ondemand" governor working. (conservative never seemed to activate)

Happy kernel hacking  :Cool: 

----------

## Phlogiston

hi   :Very Happy: 

did you report this to kernel devs?

Or do you think that meanwhile this problem has been solved?

Greets

----------

## coolsnowmen

 *Quote:*   

> did you report this to kernel devs?
> 
> Or do you think that meanwhile this problem has been solved? 

 

No, and probably not.

In short, i know enough to be dangerous, and I understand C, but I dont really know what that check was for.  I do know it wasnt working due to that check, it looked like it might still work with out it, and that now that AMD Turion 64 I was working on saves power after my *patch*.  But knowing that code was NOT written by some talentless hack, Im sure its there for a reason.

I guess I really dont know where the line is between when my solution to a problem should be looked at by dev's, or when it is just a kluge i can use as a workaround.

PS, if you really want, i can install the newest kernel sources and check if the problem has been solved, but I cannot do that for another 2 weeks as that laptop is not in my possession. From my little experiance, new hardware support can take anywhere from a week to 1.5 years.  And this laptop was NEW, so I wasnt going to complain...linux being FREE and all...

----------

## allan

JOKeRZ and CRIpath:  I had the same problem with /sys/devices/system/cpu/cpu0 being empty when I upgraded from kernel 2.6.11 to kernel 2.6.12.

I didn't figure it out until I did a diff of their .configs last night.  In 2.6.12 SMP is turned on by default and apparently that broke cpufreq on my single CPU system.

CONFIG_SMP is the .config entry you need to unset.

If you use menuconfig: Processor Type and Features-->Symmetric multi-processing support, set it to no (unchecked).

My guess is that with CONFIG_SMP set to Y, the cpufreqency code is expecting more than one CPU and fails if it only finds one.

----------

