Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I'm running on battery even with "performance" frequency scaling governor, something regularly lowers CPU speed to it's lowest value. I don't really want that, my AC strip usually in another room so I don't really need to save power. How can I find what service doing that?

laptop_mode is disabled so that's not it.

Update: Looks like CPU being scaled down only if it is under load. If it is more or less idle, it could stay on any frequency pretty much forever, but once it gets loaded, it quickly jumps to it's lowest frequency.

Another update: Something sets maximum frequency CPU can have.

Ubuntu launchpad bug 242006

share|improve this question
    
Curious to ask - why do you want to want to keep your CPU at its max speed all the time? When the system detects that it is under load, the CPU speed will boost up anyway. –  caliban Sep 5 '09 at 13:48
    
Because it just doesn't :) It works when laptop is connected to AC but when it is not pretty much opposite is happening. –  vava Sep 5 '09 at 13:54

5 Answers 5

up vote 0 down vote accepted

Turns out there was a setting in a BIOS I set and completely forgot about. It is called "SpeedStep management" or something similar, and it was set to "Optimize Battery" when on battery. Switching it to automatic completely cured the problem.

share|improve this answer

Afaik, the Gnome applet uses cpufreq-selector. I think this is the command being executed under the hood when you use the applet:

sudo cpufreq-selector --governor=performance --freq=2000

You can run the command directly and see if you see any difference in behaviour.

The cpufrequtils package provides utilities to help you manipulate the CPU scaling behaviour. Install the package and check your CPU options via cpufreq-info.

$ cpufreq-info 
cpufrequtils 004: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to cpufreq@lists.linux.org.uk, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 1000 MHz - 1.67 GHz
  available frequency steps: 1.67 GHz, 1.33 GHz, 1000 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 1000 MHz and 1.67 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz.
  cpufreq stats: 1.67 GHz:0.00%, 1.33 GHz:0.00%, 1000 MHz:0.01%  (3526)
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 1
  hardware limits: 1000 MHz - 1.67 GHz
  available frequency steps: 1.67 GHz, 1.33 GHz, 1000 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 1000 MHz and 1.67 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz.
  cpufreq stats: 1.67 GHz:0.00%, 1.33 GHz:0.00%, 1000 MHz:0.01%  (3737)

Next, try to set the minimum frequency a governor can use with the cpufreq-set command. This will hopefully stick better than the cpufreq-selector command.

NAME
       cpufreq-set - A small tool which allows to modify cpufreq settings.

SYNTAX
       cpufreq-set [options]

DESCRIPTION
       cpufreq-set   allows  you  to  modify  cpufreq  settings  without  having  to  type  e.g.
       "/sys/devices/system/cpu/cpu0/cpufreq/scaling_set_speed" all the time.

OPTIONS
       -c --cpu <CPU>
              number of CPU where cpufreq settings shall be modified.

       -d --min <FREQ>
              new minimum CPU frequency the governor may select.

       -u --max <FREQ>
              new maximum CPU frequency the governor may select.

       -g --governor <GOV>
              new cpufreq governor.

       -f --freq <FREQ>
              specific frequency to be set. Requires userspace  governor  to  be  available  and
              loaded.

Note that I have no idea of the downsides of doing this. You may well be shortening your CPU life dramatically by having it constantly operate at the max frequency.

share|improve this answer
1  
Ok, this is progress. I found out that something just sets maximum limit to 800Mhz on battery. –  vava Sep 5 '09 at 14:36
    
If you're unable to find the process that sets the max limit, or can't modify that process, you could use the approach in this answer to check the min & max freq settings when laptop is on battery power, and override it to your settings: superuser.com/questions/31446/…. A bit of a hack, but should work as a last resort. –  nagul Sep 5 '09 at 15:47
    
No, it doesn't. Turns out it is a kernel bug, overriding does nothing. –  vava Sep 6 '09 at 2:13

The services relating to power management (including but not limited to CPU throttling) are

APMD - the Advance Power Management daemon
ACPID - the Advanced Configuration and Power Interface daemon

Also, your CPU might be hardware controlled - try finding out if your BIOS has settings for disabling CPU throttling (on a notebook, it might be impossible).

P.S Don't do it - you run the risk of frying your notebook. Install the CPU Frequency Scaling Gnome applet and control it manually.

share|improve this answer
    
Also, try injecting this in the command line (without disabling ACPID) echo -n 0 > /proc/acpi/processor/CPU0/throttling it sets throttling to 0 - which is equivalent to 100% of your processor speed. –  caliban Sep 5 '09 at 13:43
    
Thanks, but I do have Gnome applet. It works but something else keep pushing freq down. Looks like it does it under load for some reason. –  vava Sep 5 '09 at 13:44
    
try killing the above-mentioned services then. However, I highly suspect it's hardware controlled. –  caliban Sep 5 '09 at 13:47
    
Live is too scary without ACPI :) I'd rather keep it connected to AC all the time or just don't do anything CPU intensive on battery power. But there should be a way to investigate what's happening... –  vava Sep 5 '09 at 13:56

Is it Intel Centrino based laptop? It could be "SpeedStep" at work! In any case, you can check out EmiFreq-applet to control/set CPU frequency.
http://zzrough.free.fr/emifreq.php

share|improve this answer
    
yes, of course it is centrino based :) But as far as I know SpeedStep doesn't work all by itself, OS pretty much controls it. And I already have Gnome applet, I can set freq for whatever value I like but only for 10 seconds :) –  vava Sep 5 '09 at 13:46

Try and add the applet "CPU Frequency Scaling Monitor" to your gnome-bar. From there, you might be able to set the frequency manually, instead of relying on a governor.

share|improve this answer
    
I have it but even if I set freq to 2Mhz in it, it gets back to 800Mhz after 10 seconds or so. Something scaling CPU down and I'd like to find out what. –  vava Sep 5 '09 at 13:35
    
Do you mean 2GHz? Because 2MHz wouldn't really be a realistic value... And the cpu will only go at particular speed. –  Mike Cooper Sep 5 '09 at 14:02
    
Yeah, I'm sorry, it's late into the night in Australia –  vava Sep 5 '09 at 14:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.