You are not logged in.

#1 2007-10-31 04:16:33

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Frequency scaling governors ignored

Hello all,

I am having trouble with frequency scaling on my Pentium M laptop (Dell Inspiron 9300.) It seems that there is something overriding the governors that I set. This happens to me while using cpufrequtils and laptop-mode-tools. Generally, when I boot up, things are fine, but when I switch governors, either by hand (cpufreq-set -g), or through one of the tools mentioned above, the CPU will get pinned at the maximum frequency a few seconds after the change in governor, even if my machine is idling!

Here's an example. I shut down cpufreq and laptop-mode-tools and switched from the ondemand governor, which was working correctly) to the powersave governor. For about five seconds, everything is OK, but after that, my CPU gets pinned at the max frequency. What's even odder is the output of cpufreq-info:

# cpufreq-info
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 800 MHz - 1.87 GHz
  available frequency steps: 1.87 GHz, 1.60 GHz, 1.33 GHz, 1.07 GHz, 800 MHz
  available cpufreq governors: powersave, conservative, ondemand, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.87 GHz (asserted by call to hardware).

My processor is running at 1.87 GHz even though it should be limited to 800MHz! When I switch back to the ondemand governor, the same thing happens, the frequency goes to 800 MHz for a few seconds and then ramps up to the maximum frequency.

Does anyone have any suggestions on getting this working? Please? I've read all the related wikis and haven't found anything pertinent. All my configurations are basically default and I have no patches on either my kernel or any of the related software. I am running the following:

* kernel26 2.6.23.1-6
* cpufrequtils 002-1
* laptop-mode-tools 1.34-3

I'd appreciate any ideas on this, as it is one of the last problems standing between me and my perfect Arch system.

Thanks and regards.

Offline

#2 2007-10-31 12:38:56

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: Frequency scaling governors ignored

Yes, I know something you might try!  Check out my post:  http://bbs.archlinux.org/viewtopic.php?id=39034.

It seems that the "rule" for watching a video get in the way.  I commented out the "cpu_interval" line.  Here is what I have for the "Movie Watcher" rule in my cpufreq.conf:

# use performance mode if I'm watching a movie
# I don't care for batteries! 
# But don't heat too much.
[Rule]
name=Movie Watcher
programs=xine,mplayer,gmplayer
battery_interval=0-100
acpi_temperature=0-60
#cpu_interval=70-100
profile=Performance High
[/Rule]

Matt

"It is very difficult to educate the educated."

Offline

#3 2007-10-31 20:31:42

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: Frequency scaling governors ignored

Right now I am not using cpufreqd. I was using cpufrequtils and then switched to laptop-mode-tools to get additional powersaving benefits. The frequency scaling has not worked with either of these. In my example I shut down all CPU frequency tools, and yet something was causing my CPU to go to max frequency while idle. I noticed that the performance governor is compiled into the kernel and is the default, so perhaps it is becoming active somehow.

Something else interesting I found was that the output of /usr/sbin/laptop_mode status is not always reliable. When I was using the ondemand governor, it reported my CPU was at max frequency. However, when I did cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq directly, it reports my current frequency is 800MHz, which is the correct behavior. This is odd since all the script does is cat that same file. I guess it is possible that the other work that the script does causes the processor to get maxed out, though getting that status is just catting a bunch of /sys files, so it shouldn't max out the processor. This means that the ondemand governor seems to be working correctly.

Unfortunately I tried this same test with the powersave and conservative governors but for those laptop_mode status output matched with cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq. The processor really seemed to be maxed out in powersave mode while my machine was idling.

Anyway, I'll keep trying some things here. Perhaps if nothing works I'll have to abandon using laptop-mode-tools for frequency scaling and try cpufreqd.

Thanks and regards.

Offline

#4 2007-10-31 21:13:57

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

Re: Frequency scaling governors ignored

This bothers me:

  driver: acpi-cpufreq

Are you sure you don't have a real hardware module for this?

Offline

#5 2007-11-01 08:07:35

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: Frequency scaling governors ignored

My laptop has a Pentium M (Dothan) and there is the SpeedStep Centrino driver, but I was under the impression that acpi-cpufreq was going to supersede the specific modules. If I recall correctly, the kernel documentation for acpi-cpufreq even mentions that it can take the place of the SpeedStep drivers.

I also took a look at my old openSUSE setup. It was using the acpi-cpufreq driver and the frequency scaling was working there. However, I was using kpowersave and I know the openSUSE people do a lot of tuning, so maybe a stock kernel would not have worked.

Also, as a quick test, I removed the acpi-cpufreq modules and tried to insert the speedstep-centrino and speedstep-ich modules. For both of these I got the result:

# modprobe speedstep-centrino
FATAL: Error inserting speedstep_centrino (/lib/modules/2.6.23-ARCH/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.ko): No such device

I kind of expected this for the speedstep-ich modules since it document says it only covers up to ICH-4 chipsets and my machine has an ICH-6 chipset. I'm not quite sure why I couldn't insert speedstep-centrino. I'll try blacklisting acpi-cpufreq and force speedstep-centrino to load and see what happens.

By the way, Arch is a great distro - simple, light and very moldable. I appreciate all of the work you have put into it. I think the fact that I'm moving from openSUSE to Arch says a lot about its quality. Thanks for your time, both on this problem and in general.

Update: I've got a couple new pieces of information. First, I blacklisted acpi-cpufreq and tried loading speedstep-centrino via rc.conf. The speedstep modules still cannot be loaded. It looks like I may have to build a kernel after all. Second, I noticed that the ondemand governor actually does seem to work. The only oddity is that every several seconds the frequency will jump to the max and then go back down. Both the powersave and conservative governors have the max frequency problem.

Regards.

Last edited by jbromley (2007-11-01 09:03:19)

Offline

#6 2007-11-03 04:54:57

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: Frequency scaling governors ignored

Well, it turns out that my problem isn't limited to Arch Linux. Out of curiosity I updated my other Linux partition to openSUSE 10.3 and kpowersave has the same problem. I think something in the kernel has recently broken CPU frequency scaling for me. I know at some point this worked, since when I loaded openSUSE 10.2 on machine it was working. That was back around kernel 2.6.15, I believe. Anyway, I am currently building and testing older kernels to see if I can get the functionality back.

Thanks for the help.

Offline

#7 2007-11-04 04:47:16

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: Frequency scaling governors ignored

phrakture wrote:

This bothers me:

  driver: acpi-cpufreq

Are you sure you don't have a real hardware module for this?

What do you mean by this?  I have the same thing in my output as well.  I have an HP DV9000 with a Centrino Duo.  Maybe I've missed something, but should I be doing something different?


Matt

"It is very difficult to educate the educated."

Offline

#8 2007-11-04 04:57:36

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Frequency scaling governors ignored

phrakture wrote:

This bothers me:

  driver: acpi-cpufreq

Are you sure you don't have a real hardware module for this?

If I'm correct the frequency scaling architecture is all being migrated to use the acpi-cpufreq driver. I know my Core 2 Duo uses it wink.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#9 2007-11-04 06:20:05

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: Frequency scaling governors ignored

mrunion, B -

This should be OK, if I recall correctly, acpi-cpufreq is to be the generic interface to frequency scaling. The other, processor-specific drivers will eventually be deprecated. I believe most new chips will run with acpi-cpufreq.

In other news, I made some updates to my computer (added memory and swapped for a larger hard drive) and now frequency scaling seems to be working! When switching to battery and either the powersave or conservative governor I still get a blip with the processor running at maximum frequency, but after a few seconds it settles back to the lowest frequency. Weird.

Regards.

Offline

Board footer

Powered by FluxBB