You are not logged in.

#1 2005-12-04 18:33:17

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

PowerNowd, cpufreq, cpudyn...?

I think I might need a little assistance here: I want to silence my laptop. Under Windows I have a program called Speedswitch installed, where one can adjust the cpu load according to one's requirements (high speed? low power?), so I know the hardware is capable.
I've looked around for something under Linux, and it seems that powernowd and cpudyn are frequently recommended, but also cpufreq is mentioned, and some utils call for a recompilation of the kernel, and I don't think I'm ready to go there yet...
So what do I do?
Here's what I have:

HP compaq nx5000, centrino processor
Arch 0.7, current kernel (2.6.13, I believe)

Cpufreq - seems to be built into the kernel, according to the website - how do I check that? If it is, is there anything else I need to do, or is that taken care of automatically?
Powernowd - a daemon, I guess. So I should add it to the daemon list in /etc/rc.conf, right? Anything else I need to do?
Are powernowd and cpudyn equivalent? Can they be used at the same time, or do I have to choose? If my main objective is a silent computer, which one is the best choice?

Sorry if these questions are banal - I'm learning, sometimes the hard way, but preferrably with some help...

Offline

#2 2005-12-04 19:08:27

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: PowerNowd, cpufreq, cpudyn...?

I tried all three and I'm still using powernowd. Just ended up being the easiest to setup and does the job nicely.

I can't even recall what I did to install it. I know I followed some instructions from the forums after a search for powernowd though.

Good luck!

Offline

#3 2005-12-04 21:10:40

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: PowerNowd, cpufreq, cpudyn...?

I may be biased, but I would recommend the cpufrequtils package from [community] - it contains small utils which access sysfs settings for cpufreq, and also contains a rc.d script to setup cpufreq settings on startup.

In my opinion, the kernel governors are much better than the userspace ones (cpufreqd, cpudynd, powernowd).

As for setup, you need to load your proper cpufreq module (I use p4_clockmod) for your processor, then, if you are using one of the userspace governers, you need to modprobe "cpufreq_userspace" to enable userspace applications to control the frequency.

Personally, I've had very good results with the "ondemand" governor (cpufreq_ondemand), and laptop-mode-tools for harddisk spin down and things like that.

Offline

#4 2005-12-04 21:48:48

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: PowerNowd, cpufreq, cpudyn...?

phrakture wrote:

I may be biased, but I would recommend the cpufrequtils package from [community] - it contains small utils which access sysfs settings for cpufreq, and also contains a rc.d script to setup cpufreq settings on startup.

In my opinion, the kernel governors are much better than the userspace ones (cpufreqd, cpudynd, powernowd).

This is mostly greek to me, but I'll try it out...

As for setup, you need to load your proper cpufreq module (I use p4_clockmod) for your processor,

So as I understand it, cpufreq is the basis, whatever utility I use? So first of all I need to get that setup properly.
How do I determine which cpufreq module is the proper one for a Centrino processor? How do I find the available ones?
I've also tried some other FAQs and instructions, but with little luck. In the FAQ for sysfreq, it says

3. How do I know that cpufreq is enabled in the kernel?"
Check that one of the following files or directory exist and return values with a cat:

   1. /proc/cpufreq (2.4 with new API or 2.5 with "old API enabled") and/or
   2. cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor (new API in 2.6, see also #20)

Check also that you have enabled powersave and performance governor in the kernel. If they are enabled, you should see:

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
powersave userspace performance

Now, I don't have any of that in any of those places.
Somewhere else, it was said that one should modprobe powernow-k7, to which I got an error message, which was understandable in the light of the output from dmesg |grep power:

# modprobe powernow-k7 FATAL: Error inserting powernow_k7 (/lib/modules/2.6.14-ARCH/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k7.ko): No such device
# dmesg |grep power
ACPI: CPU0 (power states: C1[C1] C2[C2] C3[C3])
powernow: This module only works with AMD K7 CPUs

I guess this indicates the level I'm at - fairly new to all this, a couple of months ago I had no idea what /etc/rc.conf was, but eager to learn (which is the great thing with Arch: it takes a while to get things running, but once the printer is working, I know why).
So bear with me if my questions are stupid.

Offline

#5 2005-12-04 23:47:11

sh__
Member
Registered: 2005-07-19
Posts: 272

Re: PowerNowd, cpufreq, cpudyn...?

For centrino CPU you would probably want to modprobe "speedstep_centrino".
For the governors, modprobe "cpufreq_userspace", "cpufreq_ondemand" etc.

You can switch to a different governor with

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

where governor can be "userspace" or "ondemand" or any other governor you want to use.

Offline

#6 2005-12-05 01:36:15

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: PowerNowd, cpufreq, cpudyn...?

sh__ wrote:

You can switch to a different governor with

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

where governor can be "userspace" or "ondemand" or any other governor you want to use.

Or use "cpufreq-set -g ondemand" from the cpufrequtils in community.

Offline

#7 2005-12-05 07:01:53

Stanislav
Member
Registered: 2004-10-16
Posts: 82

Re: PowerNowd, cpufreq, cpudyn...?

i have a Pentium-M and in the beginning my system didn't want to load the module "speedstep_centrino". If your notebook is new , that might be the case for you too. There is a Dothan patch for the kernel wich enables loading the "speedstep_centrino" module. 

Then i use cpufreqd with the GNOME cpufreq applet. it works pretty well.

good luck!


[URL=http://imageshack.us][img]http://img360.imageshack.us/img360/481/imbulgarian6ph.gif[/img][/URL]

Offline

#8 2005-12-05 12:33:16

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: PowerNowd, cpufreq, cpudyn...?

OK. Thanks to everyone of you. I am now some steps closer to an understanding of this. I have added speedstep-centrino and cpufreq-userspace to the modules in rc.conf, and powernowd to the daemons. There are no complaints at startup as far as I can see, so it seems to be running.
The fans also set in a lot less now than before, but other than that, it doesn't seem to be doing anything. The cpu frequence is still constantly on 1500 MHz - I thought it was supposed to go up and down...? Is there some configuring I haven't done that I should?

Offline

#9 2005-12-05 16:20:00

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: PowerNowd, cpufreq, cpudyn...?

eyolf wrote:

The fans also set in a lot less now than before, but other than that, it doesn't seem to be doing anything. The cpu frequence is still constantly on 1500 MHz - I thought it was supposed to go up and down...? Is there some configuring I haven't done that I should?

Probably... but I should probably point out that the userspace governers suck.  There is a noticable time lag to reach max speed compared to the in-kernel governors.

Here's a nice comparission of the kernel ones:
http://www.ovro.caltech.edu/~abeard/FC3 … rnors.html

I've done a fair amount of research on this topic, and I must say that the combo of raw cpufreq_* governors and laptop-mode-tools make for some of the best power savings/noise control.

Offline

#10 2005-12-05 17:49:40

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: PowerNowd, cpufreq, cpudyn...?

I have now tried out some different governors (modprobe cpufreq_ondemand, modprobe cpufreq_powersave, and modprobe cpufreq_userspace, then change them with cpufreq-set -g, as you suggested). I tried ondemand, but then fan activity seemed to rise, as compared to userspace. But with powersave, I haven't heard the fan for half an hour (and just because I wrote that, the fan started, as I'm writing, of course...).
I'm happy with that, even though the machine is probably working slower. I assume, though, that ondemand is really what I want, so that if I open a huge document in Writer, it won't slow down unbearably on me, right?

One slight wonder: I have set up some monitors in the KDE System Guard, for the temperatures, the clock and the processor load. And whereas the temperature measurers seem to work fine - at least they go up and down, even though they are mostly stable on 40-45 degrees - the cpu frequency shows a constant rate of 1500 MHz. But if I look in /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq, it says 600000, which I take to mean 600 MHz. Am I looking in the wrong places, or is this some mistake?

Offline

#11 2005-12-12 21:02:40

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: PowerNowd, cpufreq, cpudyn...?

One week later:
I've now been enjoying - tremendously - a completely silent computer for a week. Brings me back to the days when I switched from a very noisy P4 which was driving me crazy, to my current centrino, and installed SpeedSwitch (under Windows). I would turn on the computer just to sit there and listen to the silence...
I have one or two problems left, though. As it is, I have to run it with the powersave governor - with ondemand, the fan sets in more often than I care for. So my question is: is there a way to adjust the way it functions? I see from the man page of cpufreq-set that I can specify a max and min frequency, but ideally, I would like to stay at 600 MHz (or at least a level where the fan stays still) for ordinary use, and only go to fan-requiring levels for the most resource-greedy programs. Can that be done?
My second question is a newbie one: how do I set it to start in powersave mode on startup? Can I include "cpufreq-set -g powersave" in rc.local, e.g.? I have added the cpufreq-powersave module to the modules list in rc.conf, so it's only a matter of typing in the above in a terminal, but it would be nice it that happened automatically, but it defaults to "performance" when I start.

Offline

#12 2005-12-12 22:46:20

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: PowerNowd, cpufreq, cpudyn...?

eyolf wrote:

how do I set it to start in powersave mode on startup? Can I include "cpufreq-set -g powersave" in rc.local, e.g.? I have added the cpufreq-powersave module to the modules list in rc.conf, so it's only a matter of typing in the above in a terminal, but it would be nice it that happened automatically, but it defaults to "performance" when I start.

I believe you need to take a look at /etc/rc.d/cpufreq (not cpufreqd) and add it to DAEMONS array in /etc/rc.conf. Configuration is in /etc/conf.d/cpufreq.

Offline

#13 2005-12-12 22:57:13

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: PowerNowd, cpufreq, cpudyn...?

I've also been debating adding some hooks into the laptop-mode-tools package with relation to cpufrequtils - hooks that will allow it to switch to "powersave" when unplugged, and back to the default when plugged back in - probably should be hard.

Offline

#14 2005-12-12 23:42:15

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: PowerNowd, cpufreq, cpudyn...?

I have not tried that myself yet but I think acpid can do something like this too.

Offline

#15 2005-12-13 00:12:38

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: PowerNowd, cpufreq, cpudyn...?

lanrat wrote:

I have not tried that myself yet but I think acpid can do something like this too.

Oh my god, I was thinking acpid but wrote laptop-mode-tools....

Offline

#16 2005-12-13 00:19:08

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: PowerNowd, cpufreq, cpudyn...?

Yes, I've tried to activate that, but I've run into the problem described in this thread. Since the last post was by phrakture, I probably don't need to quote it :-)
Moderator Note: Fixed URL

Offline

Board footer

Powered by FluxBB