kpowersave

Noah Dain noahdain at gmail.com
Sun Nov 19 05:32:11 UTC 2006


On 11/18/06, Paul Kaplan <pkaplan1 at comcast.net> wrote:
> kpowersave in Edgy is reporting that my processor is running at 1/2 speed
> (800MHz) even when the Thinkpad T43 is plugged in.  I'm pretty certain that
> it's actually running at full speed.  Is this a bug?  Is there a way to alter
> this config setting?
> Paul

There's probably nothing wrong.

The 'ondemand' governor sets you cpu to the lowest speed, but ramps it
up quickly.  You can also tweak the sensitivity of it.

Here's an ugly little script i wrote some time ago to get and set some
cpufreq settings quickly.  Run it and it will tell you your current
cpu governor, current cpu speed, and currently supported governors.
Give it a governor as an argument to change to that governor.  Also,
when you run it while the system is under load, the current speed
should be reported as higher.


#!/bin/sh
# file: cpu-throttle

GOVPATH="/sys/devices/system/cpu/cpu0/cpufreq"
GOVERNOR="${GOVPATH}/scaling_governor"
GOVSTAT=`cat ${GOVPATH}/scaling_governor`
GOVAVAIL=`cat ${GOVPATH}/scaling_available_governors`
FREQAVAIL=`cat ${GOVPATH}/scaling_available_frequencies`

case "$1" in
        performance)
                echo $1 > $GOVERNOR
                echo "setting cpu governor to: `cat
${GOVPATH}/scaling_governor`"
                ;;
        powersave)
                echo $1 > $GOVERNOR
                echo "setting cpu governor to: `cat
${GOVPATH}/scaling_governor`"
                ;;
        ondemand)
                echo $1 > $GOVERNOR
                echo "setting cpu governor to: `cat
${GOVPATH}/scaling_governor`"
                ;;
        userspace)
                echo $1 > $GOVERNOR
                echo "setting cpu governor to: `cat
${GOVPATH}/scaling_governor`"
                ;;
        *)
                echo need option of: ${GOVAVAIL}
                echo
                echo current governor is: `cat ${GOVPATH}/scaling_governor`
                #echo current speed is: `cat ${GOVPATH}/cpuinfo_cur_freq`
                echo current speed is: `cat ${GOVPATH}/scaling_cur_freq`
                echo supported frequencies: ${FREQAVAIL}
                ;;
esac

# end of cpu-throttle

-- 
Noah Dain
"I don't want to make toys, I want to be a dentist!"




More information about the ubuntu-users mailing list