# cpufreq on asus b202

## therealjrd

I've been putting together a gentoo b202 box.  Atom N270 cpu.  It's meant to be an always-on server, so I'm trying to get the power down as much as feasible.  I configured up cpufreqd and assorted support stuff according to the docs I've found (and that I've used before on other boxes) but it seems like it's not behaving as expected.  When I  use cpufreqd to try to set conservative or ondemand, it falls back to performance.  Fiddling by hand, it appears that the only govenors it will accept are performance and powersave, neither of which allow me to auto-scale the cpu freq.

I dug around some, but didn't find anything definitive about which governors are expected to work on this cpu.  Does anybody have experience getting other govs to work?

Alternatively, is there a better solution that cpufreqd?  Perhaps some other tool that can play games with the userspace governor?

Any info appreciated.  Thanks in advance...

----------

## chithanh

Don't use cpufreqd unless you have a use case where it is required.

It should be enough to set the ondemand governor as default in menuconfig. Also make sure that the ACPI P-states driver is enabled.

----------

## therealjrd

 *chithanh wrote:*   

> Don't use cpufreqd unless you have a use case where it is required.

 

My use case is for an always-on server.  Load is quite bursty, with long idle periods.  I want to keep power to the minimum I can.  Also, this is a fanless unit, and esp when the ambient temp is warm, it overheats after a while running both cores flat out.  Experiments reveal that if I clock it back to 1g or 800mhz it will run all day without overheating, so I want software to manage that for me.

 *Quote:*   

> 
> 
> It should be enough to set the ondemand governor as default in menuconfig. Also make sure that the ACPI P-states driver is enabled.

 

```

kong2 ~ # grep ACPI_CPUFREQ /usr/src/linux/.config 

CONFIG_X86_ACPI_CPUFREQ=m

kong2 ~ # grep DEFAULT_GOV /usr/src/linux/.config 

# 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

kong2 ~ # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors 

conservative userspace ondemand performance 

kong2 ~ # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor            

performance

kong2 ~ # echo ondemand >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

kong2 ~ # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 

performance

```

Not sure what the deal is, but even though I have ondemand enabled and set as default, it refuses to accept it.

----------

## chithanh

If you want to limit maximum frequency then use the /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq control. It can be set persistenly via sysctl.conf. If you want to set the maximum frequency based on CPU temperature, then you indeed need something like cpufreqd.

----------

## therealjrd

 *chithanh wrote:*   

> If you want to limit maximum frequency then use the /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq control. It can be set persistenly via sysctl.conf. If you want to set the maximum frequency based on CPU temperature, then you indeed need something like cpufreqd.

 

Yes, understood.  Like I said, my goal is to accomodate burst load at the max available performance, while minimizing power at other times, and being sensitive to temp.  cpufreq would be the perfect tool for the job, IF there weren't this bug or feechur or whatever which prevents ondemand or conservative govs from being activated.

For the interim, I have a hacked-up version of powernowd, which does a cheesy version of what I'm after by using the userspace gov but it would work better if I could just use ondemand or conservative.

Anybody have hints about why it wouldn't accept those govs?

----------

