Powertop shows constant P-State 800Mhz usage.

Discussion in 'Linux' started by stokiematt, Feb 3, 2009.

  1. stokiematt

    stokiematt

    Joined:
    Dec 10, 2008
    Messages:
    2
    Likes Received:
    0
    When I use powertop it shows the processor P-State as being constantly set to run at 800Mhz. Does this seem like correct usage?

    I'm pretty sure it wasn't always set like this. I'm using Ubuntu 8.10 with the sickboy 0.2 kernel. I don't believe this causes the problem as booting with previous kernels shows the same usage. I've recently upgraded the bios to 3309. Has anyone seen this problem before?

    Thanks in advance.
     
    stokiematt, Feb 3, 2009
    #1
  2. stokiematt

    muon

    Joined:
    Dec 28, 2008
    Messages:
    1
    Likes Received:
    0
    Check to see if you have a service running called "cpuspeed". If so, disable it.
     
    muon, Feb 3, 2009
    #2
  3. stokiematt

    jango

    Joined:
    Aug 2, 2008
    Messages:
    307
    Likes Received:
    0
    I have the same problem....

    Where can we see if that "cpuspeed" is runing?

    Thanks
     
    jango, Feb 3, 2009
    #3
  4. stokiematt

    stokiematt

    Joined:
    Dec 10, 2008
    Messages:
    2
    Likes Received:
    0
    I don't have cpuspeed installed. I've narrowed the problem down to this entry in my /etc/rc.local file.

    Code:
    cat /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate_max > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
    Unfortunately, its a copy and paste so I'm unsure what the setting is trying to achieve. Anyone any ideas?

    Some else had the same problem with this setting as well.

    http://ubuntuforums.org/showthread.php?t=894852&page=3
     
    stokiematt, Feb 4, 2009
    #4
  5. stokiematt

    jango

    Joined:
    Aug 2, 2008
    Messages:
    307
    Likes Received:
    0
    Yeh you are right, i did the test, if you disable that line on your RC.LOCAL it works well... so, can we disable that???
     
    jango, Feb 4, 2009
    #5
  6. stokiematt

    mikespug

    Joined:
    Aug 21, 2008
    Messages:
    46
    Likes Received:
    0
    Get rid of that copy and paste code from linpus. It was put in linpus to correct a bug in an old kernel (look for it on lesswatts.org) You can manually set the max and min clock speeds that your processor uses with the following lines in your rc.local:

    echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
    echo 1600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    echo odemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

    You can edit the max and min values to reflect any of the capable processor clock speeds. You can determine what speeds your processor is capable of by opening a terminal and issuing the command:

    cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

    So...lets say you want your processor to only run at 800mhz....set the max and min to 800000.....or if you want your processor to go between it actually max and min use the above code....you can use any combination of the available frequency speeds. Just make sure your min is lower or equal to the max for obvious reasons. (The on demand setting is essentially a "speedstep" function that increases the clock speed of the processor to the defined max value under heavy load)

    Also...make sure you have cpufred and cpufrequtils installed. These tools are essential for even the cut and paste code to work and are not installed by default. Open a terminal and issue:

    sudo apt-get install cpufreqd cpufrequtils

    Hope that helps...
     
    mikespug, Feb 4, 2009
    #6
  7. stokiematt

    jango

    Joined:
    Aug 2, 2008
    Messages:
    307
    Likes Received:
    0
    when i did "sudo apt-get install cpufreqd cpufrequtils" it remove " powernowd"....???
    "powerowd" is the controler os cpu freq for kernel 2.6, i dont think is good ideia to remove that ???

    I think, just delete that line:

    and is ok...
     
    jango, Feb 4, 2009
    #7
  8. stokiematt

    jango

    Joined:
    Aug 2, 2008
    Messages:
    307
    Likes Received:
    0
    bump...
     
    jango, Feb 4, 2009
    #8
  9. stokiematt

    jango

    Joined:
    Aug 2, 2008
    Messages:
    307
    Likes Received:
    0
    WOW :shock: ...its much faster now :lol:
     
    jango, Feb 4, 2009
    #9
  10. stokiematt

    mikespug

    Joined:
    Aug 21, 2008
    Messages:
    46
    Likes Received:
    0
    powernowd is one controller for cpu freqeuncies...cpufreqd is another... you need to use cpufreqd if you want to use the code you are referring to from the cut and paste linpus rc.local...it will uninstall powernowd because you won't be using it anymore. If you find you don't like being able to set custom speeds for your cpu you can always...reinstall powernowd.
     
    mikespug, Feb 5, 2009
    #10
  11. stokiematt

    SlCKB0Y

    Joined:
    Sep 13, 2008
    Messages:
    165
    Likes Received:
    0
    Location:
    Sydney, Australia
    Congratulations, you just reduced your battery life for no performance gain.
     
    SlCKB0Y, Feb 5, 2009
    #11
  12. stokiematt

    mikespug

    Joined:
    Aug 21, 2008
    Messages:
    46
    Likes Received:
    0
    I love how you jump in with sarcastic remarks and offer no explanation for your response...

    You'll have to forgive Sickboy...he thinks that since he knows how to compile a kernel he is an authority within these forums....
     
    mikespug, Feb 5, 2009
    #12
  13. stokiematt

    SlCKB0Y

    Joined:
    Sep 13, 2008
    Messages:
    165
    Likes Received:
    0
    Location:
    Sydney, Australia
    Really Nice. It really saddens me for you to actually use the countless hours I spend doing these kernels as a reason to insult me.

    Explain it to me then? My assumption was that he was using the ondemand governor. If he sits there and watches powertop idle he won't get above 800mhz.
     
    SlCKB0Y, Feb 5, 2009
    #13
  14. stokiematt

    mikespug

    Joined:
    Aug 21, 2008
    Messages:
    46
    Likes Received:
    0
    What you do with spare time is your own concern...my point is that anyone who takes the time to do a little reading can compile a kernel...I'm certain you are providing a great service to those who are unwilling to learn themselves. The fact that you spend your time compiling these kernels isn't the reason I made the comment I did...In any case..

    By default powernowd on a fresh install sets the governor to stay at 1.33 ghz... from what I have witnessed...both in powertop and otherwise...it does not change from this setting. By installing cpufreqd and manually editing the max and min values you can change this, call it a bug if you will, and control what speeds the cpu will use. If you need proof fire up powertop and see what frequency it idles at by default...mine did not change from 1.33 ghz with all the tweaks supplied here and on the wiki. Now install cpufreqd and cpufrequtils...manually edit the max and min...rightclick on the gnome panel....select add to panel and add the "cpu frequency scaling monitor" to the panel and watch the frequency change dynamically.
     
    mikespug, Feb 5, 2009
    #14
  15. stokiematt

    jango

    Joined:
    Aug 2, 2008
    Messages:
    307
    Likes Received:
    0
    Come on guys, do not need to be angry..., then so what SICKBOY says is that the settings from the wiki are correct but only shows 800MHz, that is correct?... so we should leave that settings to improve battery life.

    thanks
     
    jango, Feb 5, 2009
    #15
  16. stokiematt

    SlCKB0Y

    Joined:
    Sep 13, 2008
    Messages:
    165
    Likes Received:
    0
    Location:
    Sydney, Australia
    And what i meant was that if he had applied the tweaks from the wiki, or was using my kernel which defaults to ondemand, wouldnt he just be seeing the 800mhz because his machine is relatively idle?
     
    SlCKB0Y, Feb 6, 2009
    #16
  17. stokiematt

    jango

    Joined:
    Aug 2, 2008
    Messages:
    307
    Likes Received:
    0
    HI
    I have applied all the tweaks from the wiki and i am using SICKBOY kernel (04) and my cpu frequency scaling monitor its only showing 800mhz...
     
    jango, Feb 6, 2009
    #17
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.