# Problems getting AMD cool n' quiet (powernow) working

## Zyzzyva100

I have everything else on my system working, and this is the last piece that I need to get going.  Normally I wouldn't care, but since I am running a SFF shuttle SN95G5, it can get a bit toasty in there when the CPU is running at full speed all the time and doesn't need to be doing so.

I tried following the guide on the wiki, and it wouldn't work for me.  I statically compiled support as it said to:

```
[*] CPU Frequency scaling                                           

  │ │ [ ]   Enable CPUfreq debugging                                      

  │ │ <*>   CPU frequency translation statistics                    

  |  |  <*>   'conservative' cpufreq governor                               

  │ │ ---   CPUFreq processor drivers                              

  │ │ <*>   ACPI Processor P-States driver                      

  │ │ < >   AMD Mobile K6-2/K6-3 PowerNow!                 

  │ │ < >   AMD Mobile Athlon/Duron PowerNow!           

  │ │ <*>   AMD Opteron/Athlon64 PowerNow!    
```

And then I followed the rest of the instructions.  The conservative  governor showed up as an option, and I made that my choice, then I set it to autorun upon booting.  I get errors right before kdm starts saying that the powernow and conservative governor modules cannot be loaded.  Ok, well they are statically compiled (as the guide said), but I tried making them modules anyway.  

That just gave me a different set of errors, saying that the modules were busy and couldn't be used.

I have my cpu overclocked by fsb (200 mhz total, ram is running at 220 instead of 200), I thought this might be the problem, so I went back to stock speeds, but I still get the same errors in either configuration.

Do I need something else enabled?  Am I missing something here?  I followed the guide step by step and yet it didn't work at all.  Cool n' quiet does work under windows though, so this is deffinitely a software/driver problem here.

I am running 2.6.13-r3 btw.

EDIT:  also, is there anyway to control what speeds and voltages are used?  If I can't stay with the overclock, then fine, but my default vcore is 1.4v, and the governor will try to set it as 1.5 at the max speed if I get this working, which will just make my cpu run even warmer.

----------

## Zyzzyva100

Little help here?

----------

## mbar

dmesg | grep powernow

?

----------

## Zyzzyva100

I can post the exact output when I get home from work/school, but I know that it shows me a set of 5 (i think) voltages and frequencies, which correspond to my cpu.

I have a feeling that I am missing something power mangement or something with apci needs to be turned on, but I don't know what.

----------

## Zyzzyva100

Here it is:

```
tom@Zyzzyva ~ $ dmesg | grep powernow

powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.50.3)

powernow-k8:    0 : fid 0xe (2200 MHz), vid 0x2 (1500 mV)

powernow-k8:    1 : fid 0xc (2000 MHz), vid 0x6 (1400 mV)

powernow-k8:    2 : fid 0xa (1800 MHz), vid 0xa (1300 mV)

powernow-k8:    3 : fid 0x2 (1000 MHz), vid 0x12 (1100 mV)

```

and

```
tom@Zyzzyva ~ $  cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

conservative performance

```

As the guide shows, but when I put

```

# Enable CPU scaling

modprobe powernow-k8

modprobe cpufreq-conservative

echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
```

Into /etc/conf.d/local.start, I get an error saying the modules cannot be loaded (well of course they can't, the guide said to statically compile them into the kernel.  So, any ideas?

----------

## mbar

Yeah, on my AMD64 the only working governor is "ondemand", conservative is no go (hangs system). Maybe compile ondemand into your kernel. This is funny, because on my other computer (Athlon XP-M) ondemand isn't working, but conservative works great. And on my P-III laptop with SpeedStep I have to use cupfreqd, because only "performance" and "powersave" are working (I have to switch them dynamically, hence the deamon). I can't select any other...

----------

## Zyzzyva100

Alright, well I saw another guide for how to do it with the ondemand governor.  I guess I will have to try that.  I wonder if its because I have one of the rather early S939 boards.  (And since then shuttle has come out with 2 more revisions).  My box can't even support dual core cpu's because of a hardware issue, so I have a feeling this may fix it.

----------

## Zyzzyva100

Yep, the ondemand governor works like a champ.  I have a feeling this is because of have the original revision core of the S939 processors, and one of the original motherboards.

Now, the next question is, anybody know if its possible to manually define the power states?  (So I can set the vcore and speeds to my own liking)?

----------

## tnt

'ondemand' works great on both my AMD64 systems and 'conservative' works exactly the same as 'powersave' - CPU is @ min frew and there's no freq changes no metter how hard I stress the system 

 :Sad: 

----------

## Decibels

 *tnt wrote:*   

> '...  'conservative' works exactly the same as 'powersave' - CPU is @ min frew and there's no freq changes no metter how hard I stress the system  

 

I noticed that too, with conservative. I only have two states with my AMD64 (1800 and 1000, yes what is what 'dmesg | grep powernow' also states).

Some of the guides are a little confusing as to what you need and none seemed to match the 2.6.14 kernel. So was playing with it to see what worked.

That is where saw if put conservative it just stayed at 1000Mhz. At least cpudyn was switching between them. Well, going to play with the ondemand and see if can do away with cpudyn and userland apps. Though I do like the hardrive spindown (have win2k on older noisy drive. When it spins down, I think the computer shut off  :Smile:   Have to try hdparam spindown again.)

One thing about cpudyn, stating what govenor to use doesn't matter. It just switches between performance and powersave. I told it userland and conservative, but when go back and check secs later, it is on performance and powersave. Docs just haven't kept up with the kernel changes yet.

*Edit: Missed this in docs:  *Quote:*   

>  	 Unlike the ondemand governor, conversative doesn't jump to maximum frequency when CPU load is high, but increases the frequency step by step. Further tuning through files in /sys/devices/system/cpu/cpu0/cpufreq/ondemand/. Still requires userland tools (programs, scripts) if governor switching or similar is desired.

 

http://www.gentoo.org/doc/en/power-management-guide.xml

But still, I only have two steps and it never changed.

----------

