[mythtv-users] Cool'n'Quiet setup help
Allen Edwards
allen.p.edwards at gmail.com
Mon Feb 9 22:43:38 UTC 2009
On Mon, Feb 9, 2009 at 1:35 AM, John Finlay <finlay at moeraki.com> wrote:
> Allen Edwards wrote:
>
>>
>>
>> On Mon, Feb 9, 2009 at 12:44 AM, John Finlay <finlay at moeraki.com <mailto:
>> finlay at moeraki.com>> wrote:
>>
>> Allen Edwards wrote:
>>
>>
>>
>> On Sun, Feb 8, 2009 at 5:03 PM, John Finlay
>> <finlay at moeraki.com <mailto:finlay at moeraki.com>
>> <mailto:finlay at moeraki.com <mailto:finlay at moeraki.com>>> wrote:
>>
>> Allen Edwards wrote:
>>
>> I have an AMD 5400+ running Mythbuntu 8.10. I would
>> like to
>> run cool'n'quiet to cut the cpu temp and power. I
>> enabled it
>> in the BIOS and the results were unsatisfactory. The
>> program
>> would stutter. I could see that the cpu was running at
>> 1GHz
>> during program mode and that wasn't enough.
>>
>> What I want to do is have the CPU at a low clock
>> frequency but
>> when there is basically any activity at all, have it go to
>> 100% clock. For example, right now the CPU is at .6%. It
>> would be nice if the clock was at a minimum. But if
>> the cpu
>> goes above, say 2%?, I want the CPU to go to max clock
>> so it
>> wont stutter.
>>
>> I see instructions on the net how to do this but they are 3
>> years old and experience has thought me that following
>> instructions like this causes a half day work getting the
>> system working again because the instructions were for an
>> older system.
>>
>> So, can anyone with a system like mine who has enabled
>> cool'n'quiet and understands what I am saying help me out?
>>
>> Allen
>>
>> This uses the cpufreq module which uses the threshold (%
>> cpu) in:
>>
>> /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
>>
>> As root you can change this e.g.:
>>
>> echo -n 10 >
>> /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
>>
>> Other params in /sys/devices/system/cpu/cpu0/cpufreq can be
>> changed as well:
>>
>> scaling_max_freq
>> scaling_min_freq
>> ondemand/ignore_nice_load
>>
>> If using Ubuntu you can set params on boot in the
>> /etc/init.d/powernowd file. Add in the use_ondemand() function
>> something like:
>>
>> if [ -f $x"cpufreq/ondemand/up_threshold" ]; then
>> echo -n 20 > $x"cpufreq/ondemand/up_threshold"
>> fi
>>
>>
>> If using Fedora the /etc/sysconfig/cpuspeed file allows you to
>> tweak things.
>>
>> John
>>
>>
>> I apologize if this is a stupid question but I don't have a
>> file called up_threshold on my system. I do have powernowd
>> but not cpufreq. I can find online docs for powernowd but
>> again they are many years old and I have to assume out of date.
>>
>> Allen
>>
>>
>> Sounds like you are not loading the kernel module that provides
>> cpufreq.
>>
>> Install the powernowd package if it isn't already there (I think
>> it's there by default). On my systems the powernowd rc links load
>> the required modules but don't start the powernowd daemon. Check
>> to see that both the powernod and powernod.early rc links are setup.
>>
>> Here's the way to do it without the powernowd package:
>>
>> http://ubuntuforums.org/showthread.php?t=248867)
>>
>> A quick test is to:
>>
>> lsmod | grep powernow-k8
>> lsmod|grep cpufreq
>>
>> to check if the modules are loaded. If not you can :
>>
>> modprobe powernow-k8
>> modprobe cpufreq_ondemand
>>
>> to load them. Then the /sys/devices/system/cpu/cpu0/cpufreq
>> directory should exist.
>>
>> John
>>
>>
>>
>> Here is what I got (although cool'n'quiet is not presently enabled in the
>> bios if that makes a difference):
>>
>> dad at myth_desktop:~$ lsmod | grep powernow-k8
>> dad at myth_desktop:~$ lsmod|grep cpufreq
>> cpufreq_ondemand 9740 0
>> cpufreq_conservative 8712 0
>> cpufreq_stats 7104 0
>> freq_table 5536 2 cpufreq_ondemand,cpufreq_stats
>> cpufreq_powersave 2688 0
>> cpufreq_userspace 5284 0
>> dad at myth_desktop:~$
>>
>> As far as what is loaded, it is stock Mythbuntu so whatever gets loaded
>> with that is what I have.
>>
>> cool'n'quiet works when I enable it in the bios. I just don't like the
>> set points and it doesn't seem to be ondemand in that there are 3 levels of
>> frequency selected vs cpu load. Does that fact give a clue as to what my
>> correct setup should be?
>>
>> Allen
>>
>>
>> You need to have C&Q enabled in the BIOS. Then cd to the
> /sys/devices/system/cpu/cpu0/cpufreq directory and cat the scaling_governor
> - it should be ondemand. The levels available are listed by
>
> cat scaling_available_frequencies
>
> John
>
Thanks for this help. I enabled C&Q and like you said things started to
show up. Here are some things you expect:
dad at myth_desktop:~$ cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
dad at myth_desktop:~$ cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
2800000 2600000 2400000 2200000 2000000 1800000 1000000
dad at myth_desktop:~$ cat
/sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
80
and one you may not have:
dad at myth_desktop:~$ sudo echo -n 10 >
/sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
-bash: /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold:
Permission denied
I used nano to write "10" into this file and it still reads 80 when read.
The file time stamp changes but not the content. Strange.
I looked at what the system is doing under different loads and it is giving
me three levels that I noticed, 1.0, 1.8, and 2.8. It goes to 1.0 even
while decoding HD content, which is not what I want.
Interesting, the power in normal without C&Q enabled is 95 watts and when
running at 1GHz it is 85 Watts. I guess I am dong this for $13 a year.
More important, I would like to get the CPU temperature down and that has
gone from 55 degrees C to 45 degrees C and that should double the life of
the CPU.
So, I have C&Q working and can see all the files you said I should but I
still don't know how to change the settings yet.
Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090209/e2779ada/attachment.htm>
More information about the mythtv-users
mailing list