You are not logged in.

#1 2007-05-19 07:38:59

somedrew
Member
From: Canada
Registered: 2007-05-14
Posts: 140

Unable to get conservative scaling governor to load on boot

Hi all,

I'm trying to use the kernelspace 'conservative' scaling governor while having powersave running (needed powersave to fix suspend-to-ram, and couldn't find a way to get powersave to use the conservative governor) and am running into problems.

I _think_ I've disabled the powersave daemon from messing around with CPU frequency scaling by editing /etc/powersave/cpufreq:

# If set to "no", the powersave daemon will not touch any cpufrequency
# settings of the system. This might be helpful to avoid messages in
# syslog if a machine does not support cpu frequency scaling or one
# likes to use another cpufreq daemon.
CPUFREQ_ENABLED="no"

To let the kernel manage CPU scalling, I've added the following to /etc/rc.local:

echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "conservative" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

I've set /etc/rc.conf to automagically load acpi_cpufreq & cpufreq_conservative

Problem is that after a boot, the ondemand governor is always being used. I can manually use the conservative governor via:

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

Wondering if anyone may be able to lend some hints on how to have my system use the conservative governor on boot?
Thanks for any help!

Offline

#2 2007-05-19 13:29:05

Damnshock
Member
From: Barcelona
Registered: 2006-09-13
Posts: 414

Re: Unable to get conservative scaling governor to load on boot

As I said you in irc, you could add those commands to /etc/rc.local to run them on boot up or recompile your kernel and select a default governor.

Damnshock


My blog: blog.marcdeop.com
Jabber ID: damnshock@jabber.org

Offline

#3 2007-05-20 05:46:46

somedrew
Member
From: Canada
Registered: 2007-05-14
Posts: 140

Re: Unable to get conservative scaling governor to load on boot

Damnshock wrote:

As I said you in irc, you could add those commands to /etc/rc.local to run them on boot up or recompile your kernel and select a default governor.

Damnshock

Thanks for the help!

For anyone who may be experiencing the same issue:

I had entered the commands into rc.local, but found out that I also needed to blacklist the ondemand kernelspace governor for it to work. Not really sure why that was needed...looks like some setting somewhere was trying to override with ondemand.

Offline

#4 2007-05-20 18:06:32

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Unable to get conservative scaling governor to load on boot

Have you tried editing "/etc/conf.d/cpufreq"?  You can set the default governor there and some other settings (if you're only using cpufreq and no powersaved) - and the default setting there is "ondemand" if I remember correctly.

Offline

#5 2007-05-23 03:11:31

somedrew
Member
From: Canada
Registered: 2007-05-14
Posts: 140

Re: Unable to get conservative scaling governor to load on boot

fwojciec wrote:

Have you tried editing "/etc/conf.d/cpufreq"?  You can set the default governor there and some other settings (if you're only using cpufreq and no powersaved) - and the default setting there is "ondemand" if I remember correctly.

Thanks for the reply. I tried using cpufreq with the conservative gov as the default but with loading all the governors, ondemand took precedence. Now that I've set just the conservative gov to load, it does so automagically. Thanks again.

Offline

#6 2007-05-23 03:51:09

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Unable to get conservative scaling governor to load on boot

just curious, why are you using conservative instead of ondemand?

Offline

#7 2007-05-23 05:21:52

somedrew
Member
From: Canada
Registered: 2007-05-14
Posts: 140

Re: Unable to get conservative scaling governor to load on boot

iphitus wrote:

just curious, why are you using conservative instead of ondemand?

Running on a notebook. Thought conservative may yeild a slight power consumption advantage over ondemand.

Linux Kernel Documentation wrote:

The CPUfreq governor "conservative", much like the "ondemand"
governor, sets the CPU depending on the current usage.  It differs in
behaviour in that it gracefully increases and decreases the CPU speed
rather than jumping to max speed the moment there is any load on the
CPU.  This behaviour more suitable in a battery powered environment.
The governor is tweaked in the same manner as the "ondemand" governor
through sysfs with the addition of:

freq_step: this describes what percentage steps the cpu freq should be
increased and decreased smoothly by.  By default the cpu frequency will
increase in 5% chunks of your maximum cpu frequency.  You can change this
value to anywhere between 0 and 100 where '0' will effectively lock your
CPU at a speed regardless of its load whilst '100' will, in theory, make
it behave identically to the "ondemand" governor.

down_threshold: same as the 'up_threshold' found for the "ondemand"
governor but for the opposite direction.  For example when set to its
default value of '20' it means that if the CPU usage needs to be below
20% between samples to have the frequency decreased.

Offline

Board footer

Powered by FluxBB