You are not logged in.

#1 2011-04-07 02:33:17

jlacroix
Member
Registered: 2009-08-16
Posts: 576

[SOLVED] Problem with getting cpufreq to automatically load

I tried to set up cpufreq on my desktop, never got around to it until now. I installed the cpufrequtils package, and then I put the necessary items in the modules array in rc.conf:

MODULES=(!snd_pcsp powernow-k8 cpufreq_ondemand acpi-cpufreq vboxdrv)

I entered the appropriate items in my daemons array:

DAEMONS=(syslog-ng dbus !network netfs crond sshd rpcbind nfs-common nfs-server wicd @acpid @samba @cpufreqd @alsa @cups kdm @mediatomb)

And I also edited the /etc/conf.d/cpufreq file to look like the following:

#configuration for cpufreq control

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

# limit frequency range (optional)
# valid suffixes: Hz, kHz (default), MHz, GHz, THz
#min_freq="2.25GHz"
#max_freq="3GHz"

# use freq to set up the exact cpu frequency using it with userspace governor
#freq=

But when I run:

watch grep \"cpu MHz\" /proc/cpuinfo

It shows that my processor is running @ the full 2600mhz at all times.

If I run:

sudo cpufreq-set -g ondemand

Both cores drop to 1000mhz almost instantly and from that point on, will increase or decrease as needed. However, I have to run that command every time I boot. Is there something I've done wrong for it to not set the governer every time I boot?

Last edited by jlacroix (2011-04-07 13:49:15)

Offline

#2 2011-04-07 03:31:51

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [SOLVED] Problem with getting cpufreq to automatically load

can you post the output of cpufreq-info  ??

[rant] m ==> milli   ; M ==> Mega.   Hertz is a proper noun.  Therefore:   mhz is wrong,  mHz is really slow (1 cycle every 1000 seconds), MHz = 1,000,000 cycles /second [/rant]


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2011-04-07 03:34:46

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [SOLVED] Problem with getting cpufreq to automatically load

Actually, I looked at my system.  I remembered I put this :

cpufreq-set -c0 -g ondemand
cpufreq-set -c1 -g ondemand

into /etc/rc.local


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2011-04-07 07:07:15

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

Re: [SOLVED] Problem with getting cpufreq to automatically load

First of all you should decide what make of processor you have, since powernow-k8 is for AMD,  acpi-cpufreq is for Intel. You shouldn't load both.
Then edit your /etc/conf.d/cpufreq file and add the line:

governor="ondemand"

This way your cpu will be scaled by ondemand.

PS: acpid daemon is called automatically by udev, you don't need to include it in your daemons array.

Offline

#5 2011-04-07 07:16:00

the sad clown
Member
From: 192.168.0.X
Registered: 2011-03-20
Posts: 837

Re: [SOLVED] Problem with getting cpufreq to automatically load

Why don't you try uncommenting the min/max values in your cpufreq file, and editing the values appropriate for your cpu into them?  The wiki says scaling will occur automatically, but since that isn't happening in your case, you might try and see if it makes a difference.

Edit: ah, nevermind, siriusb has your solution.  You shouldn't load both of those modules, you'll have to pick the one that is appropriate for your cpu and remove the other.

Last edited by the sad clown (2011-04-07 07:18:41)


I laugh, yet the joke is on me

Offline

#6 2011-04-07 07:57:09

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: [SOLVED] Problem with getting cpufreq to automatically load

siriusb wrote:

PS: acpid daemon is called automatically by udev, you don't need to include it in your daemons array.

I thought it was called automatically by hal? Is it called by udev also?

Offline

#7 2011-04-07 09:41:15

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

Re: [SOLVED] Problem with getting cpufreq to automatically load

@stlarch,

Thanks for correcting me, you are right.

Offline

#8 2011-04-07 13:48:46

jlacroix
Member
Registered: 2009-08-16
Posts: 576

Re: [SOLVED] Problem with getting cpufreq to automatically load

Thanks everyone. I removed acpi-cpufreq and kept just the powernow-k8 (I have an AMD processor) but that had no effect. I already had governor="ondemand" in /etc/conf.d/cpufreq, that wasn't working either. Ewaller's solution in post #3 worked for me.

Thanks everyone! smile

Offline

Board footer

Powered by FluxBB