Wow guys thanks for all of the replies. I wrote this months ago and totally forgot all about this thread and just found it again. If anyone has any improvements or suggestions I will be happy to add them.
Wow guys thanks for all of the replies. I wrote this months ago and totally forgot all about this thread and just found it again. If anyone has any improvements or suggestions I will be happy to add them.
Thanks for guide worked great.
To op: Heres a simple script that allows one to select the modes without the manual hassle of cat <governor> /sys/.... for each core or without having to go overkill and use kpowersave. n00b scripting but it gets the job done =)
To lutra: yes, for C2D/Q all cores have to be set to the same governor to be in effect. Think the upcoming Phenoms from AMD will allow seperate core speeds.
Download link
Code:#!/bin/bash # cpu_speed.sh # Last edit: 2008-02-28 if [ $1 = auto ] ; then MODE=ondemand elif [ $1 = max ] ; then MODE=performance elif [ $1 = min ] ; then MODE=powersave elif [ $1 = user ] ; then MODE=userspace elif [ $1 = laptop ] ; then MODE=conservative # Said to only work on laptop processors. else echo "No mode selected" exit fi CORES=$(ls /sys/devices/system/cpu | grep cpu | wc -l) # Outputs number of cores let CORES=CORES-1 # Core adjustment for further use COUNTER=0 while [ $COUNTER -le $CORES ]; do echo $MODE | sudo tee /sys/devices/system/cpu/cpu$COUNTER/cpufreq/scaling_governor > /dev/null # Confused?. Tee reads std.out and writes that into file and std.out, that # part we don't need so the black hole /dev/null can eat that part echo Core $COUNTER mode: $MODE let COUNTER=COUNTER+1 done
Last edited by Bad_Byte; February 28th, 2008 at 12:11 PM.
The sentence below this one is true.
The sentence above this one is false.
For the XFCE4 people:
and a thread:Code:sudo apt-get install xfce4-cpu-freq-plugin xfce4-governor-plugin
http://ubuntuforums.org/showthread.php?t=516383
Great guide - thanks for this. Should now be able to extend my hp laptop's battery life a little bit more.
Ian
http://lidd.net
After all the praise on this HowTo, a slightly more negative note: on my Feisty system (Sony Vaio) the very 1st command fails with:
gijs@gijs:~$ ls /sys/devices/system/cpu/cpu0/cpufreq
ls: /sys/devices/system/cpu/cpu0/cpufreq: No such file or directory
Now what I do to reduce the heat my laptop is emitting?
anybody please help me
i have changed the setting to performance ,
and when just restarted my laptop its unable to start
its making teet teet sound and then no display
my laptop is hp dv2000 and its configuration is
intel core 2 duo 1.83 ghz
1gm ram and 128 mb nvidia graphic card
Sorry to break it to you, but ondemand is superior to conservative on intel chipsets. Intel's own kernel developer explains why:
http://www.bughost.org/pipermail/pow...ay/000166.html
http://www.bughost.org/pipermail/pow...ay/000073.html
http://www.bughost.org/pipermail/pow...ay/000071.html
The basic idea is this: Since you always have to keep the northbridge running, power usages scale slower than cpu speed increases. This means it is faster to jump to the highest speed and then back down to idle, because it takes longer to perform the same operations at a slower speed.
Last edited by InfinityCircuit; August 9th, 2008 at 04:24 AM.
Bookmarks