You are not logged in.

#1 2007-03-08 16:26:06

preethp
Member
Registered: 2007-03-07
Posts: 3

CPU Frequency Scaling in Arch Linux x86_64

Hi there
I am a relative newcomer to Linux, having started with Suse Linux a little more than a year ago.  I installed the x86_64 version of Arch Linux on my HP Pavilion dv5000 laptop a couple of months ago and am very pleased with the distribution so far.  I set up CPU Frequency Scaling using the Arch wiki.  I have tried both methods- using cpudyn and cpufrequtils.  In both cases,  while using "ON DEMAND" as the frequency Scaling Governor in KDE as well as in the command line, I find that the frequency frequently fluctuates between the minimum of 800 mhz and 2200 mhz even during normal activities.  Also the CPU Frequency Scaling Monitor shows the powersaving scheme fluctuating between Powersave and Performance even though I have chosen "ON DEMAND" as the governor.

Is this normal?  I find that with Ubuntu and Suse the CPU frequency scaling remains at a fairly stable 800 mhz for normal browsing whereas with Arch it seems to fluctuate more often.  Is there a fool-proof way of setting the scaling to be stable?  How do I verify if the Scaling is working correctly and not fluctuating randomly?  I am using the kernel26beyond for enabling hibernate and suspend functions.

Thanks to anyone who can help.
Regards
Preethp

Offline

#2 2007-03-08 19:30:37

Stalwart
Member
From: Latvia, Riga
Registered: 2005-10-18
Posts: 445
Website

Re: CPU Frequency Scaling in Arch Linux x86_64

I allow kernel to scale my CPU wink

Try adding this to /etc/rc.local:

echo -n ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

And turn off all cpu managing daemons. CPU should switch to higher frequency only in games and when compiling something


IRC: Stalwart @ FreeNode
Skype ID: thestalwart
WeeChat-devel nightly packages for i686

Offline

#3 2007-03-09 21:25:42

G_Syme
Member
Registered: 2007-01-04
Posts: 83

Re: CPU Frequency Scaling in Arch Linux x86_64

Hi preethp,

I haven't tried cpudyn yet because cpufrequtils has always worked out for me until now. If you want to give it another shot then start the cpufreq daemon again and try cpufreq-info. The output of my Turion X2 looks like this:

# cpufreq-info
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
  driver: powernow-k8
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 800 MHz - 1.60 GHz
  available frequency steps: 1.60 GHz, 800 MHz
  available cpufreq governors: ondemand, performance
  current policy: frequency should be within 800 MHz and 1.60 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
analyzing CPU 1:
  driver: powernow-k8
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 800 MHz - 1.60 GHz
  available frequency steps: 1.60 GHz, 800 MHz
  available cpufreq governors: ondemand, performance
  current policy: frequency should be within 800 MHz and 1.60 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).

Take a look at the "current policy" lines of your output to check if the ondemand-governor is really active and if the limits are set right.
Also you could post your /etc/conf.d/cpufreq and the output of "dmesg | grep powernow".


The courageous enter dark caves alone.
The clever send in the courageous first.
The cleverest wait behind the clever.

Offline

#4 2007-03-09 21:37:14

zack
Member
From: Portsmouth, UK
Registered: 2006-09-11
Posts: 32

Re: CPU Frequency Scaling in Arch Linux x86_64

I use powersaved, can suspend and hibernate too, integrated with gnomes shut down dialogue, too.

Offline

#5 2007-03-09 22:29:57

preethp
Member
Registered: 2007-03-07
Posts: 3

Re: CPU Frequency Scaling in Arch Linux x86_64

Thanks to everyone who answered, will try your suggestions and will reply soon as to what happens.
Regards
Preethp

Offline

#6 2007-03-10 12:58:30

zeus
Member
From: Korolev / Russia
Registered: 2006-09-19
Posts: 117
Website

Re: CPU Frequency Scaling in Arch Linux x86_64

[zeus@gefest ~]$ cat /etc/acpi/actions/lm_battery.sh
#!/bin/bash
if [ "$(cat /proc/acpi/ac_adapter/AC/state | grep on-line)" = "" ];
  then cpufreq-set -g ondemand
  else cpufreq-set -g performance
fi

Offline

Board footer

Powered by FluxBB