You are not logged in.

#1 2009-08-20 08:58:39

blum
Member
From: Plovdiv, Bulgaria
Registered: 2004-04-05
Posts: 77
Website

cpufreq, ondemand governor problem

Hello,
I bought one old PC (dell gx260) with p4 CPU on 1.8 GHz and I wanted to do some frequency scaling on it mostly because it is idle most of the time. So I followed the cpufreq wiki (using p4_clockmod module), but in the end when I do:

# cpufreq-set -g ondemand

the output of

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

is:

performance

The cpufreq_ondemand and cpufreq_powersave module are loaded, but only 'performance' and 'powersave' actually work. My /etc/conf.d/cpufreq looks like this:

#configuration for cpufreq control

# valid governors:
#  ondemand, performance, powersave,
#  conservative, userspace
governor="ondemand"

# valid suffixes: Hz, kHz (default), MHz, GHz, THz
min_freq="900MHz"
max_freq="1.80GHz"

Any help?
Thank you.

//edit
I already saw http://bbs.archlinux.org/viewtopic.php?id=77233 already, but I wandered if there is any progress on this issue

Last edited by blum (2009-08-20 09:02:15)


..,

Offline

#2 2009-08-20 10:02:46

zukka
Member
From: Bologna Italy
Registered: 2006-06-27
Posts: 26

Re: cpufreq, ondemand governor problem

is ondemand in  /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors ?
I also have a p4 and I found this in dmesg:

ondemand governor failed, too long transition latency of HW, fallback to performance governor

This is true... with older kernel I had a script to set the performance governor (in work hours) because the system felt so "laggy" with the ondemand governor.

Last edited by zukka (2009-08-20 10:06:50)

Offline

#3 2009-08-20 18:08:19

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: cpufreq, ondemand governor problem

Try to comment min_freq and max_freq, that shouldn't be needed has the cpu frequency driver should be able to detect that.
I guess that probably it will not solve your problem but it's worth a try.

I have seen on another thread that someone needed to explicitly use an higher max_freq, otherwise the cpu would never get into the fastest speed supported with the ondemand governor. The cause was (as I could understand) a slightly faster cpu fsb. The fsb x multiplier yielded a slightly higher speed than the rated one and that was somehow causing the ondemand governor to go haywire.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2009-08-21 12:53:11

blum
Member
From: Plovdiv, Bulgaria
Registered: 2004-04-05
Posts: 77
Website

Re: cpufreq, ondemand governor problem

Hello,

is ondemand in  /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors ?

Yes, it is. And the error I get in dmesg is the same.

Try to comment min_freq and max_freq, that shouldn't be needed has the cpu frequency driver should be able to detect that. I guess that probably it will not solve your problem but it's worth a try.

I tried but it is the same, "ondemand" governor doesn't start.
I found this and it pretty much clears up the situation:

You should not use ondemand with clockmod. The clockmod module has a very high switching latency, that's why it's disabled in 2.6.30.

Thanks

//Addition:
This is also curious, according to: http://kerneltrap.org/mailarchive/linux … /2/1999844 and http://www.codemonkey.org.uk/2009/01/18 … 4clockmod/ there is no sense in using p4-clockmod... . Do we have some other driver that does scaling for Pentium 4?

Last edited by blum (2009-08-21 13:42:23)


..,

Offline

#5 2010-05-27 08:17:23

salinas_v
Member
From: México
Registered: 2007-12-20
Posts: 17
Website

Re: cpufreq, ondemand governor problem

It looks like it is related to p4-clockmod. I have the same issue and found this one.

http://notes.benv.junerules.com/tag/p4-clockmod/

Can Arch patch the kernel for me?

a reported working patch is here:
http://forum.sabayon.org/viewtopic.php?f=56&t=20313

Offline

#6 2010-10-05 12:20:46

factoryprime
Member
From: Minnesota
Registered: 2010-05-27
Posts: 8
Website

Re: cpufreq, ondemand governor problem

In case this helps anyone that doesn't want to use the patch, the powernowd daemon uses the p4-clockmod module perfectly well, and some actually like it better.  I use both the cpufreq native and the powernowd on separate arch machines, and from my standpoint the difference is nil.  I'm sure there is margin for debate on which is better, but for using on-demand with p4-clockmod, I can't see a better solution.  The wiki on using powernowd states the software is obsolete, which may be true, but I'd rather use a deamon than a patch.  Seems to be a simpler and less invasive approach.

It's in AUR, just search "powernowd" and you'll find it.

Offline

#7 2010-10-05 14:46:28

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: cpufreq, ondemand governor problem

I use this to change governors:

#!/bin/bash
# ~/.bin/gov
#

getgov=$(cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor)

case $1 in
  o|ondemand)     governor=ondemand;;
  p|performance) governor=performance;;
  powersave)     governor=powersave;;
  *)         echo $getgov
         exit;;
esac

for g in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo $governor > $g; done
echo $(cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor)

It's a primitive hack but it works for me.
"gov o" changes governor to ondemand, "gov p" to performance and "gov" just prints the current governor.


no place like /home
github

Offline

Board footer

Powered by FluxBB