SetCPU Basics

Discussion in 'Bugless' started by Chris.Go, Jun 17, 2010.

  1. Chris.Go
    Offline

    Chris.Go New Member

    Joined:
    May 4, 2010
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    Is SetCPU really required or can the stock BB 1.1 or even .21 just perform better on it's own? The program is a pain in the ass and the widget is goofy. So it comes down to this Yes or No? If you install a 1250 ROM do you need SetCPU to actually benefit?
  2. kskwerl
    Offline

    kskwerl New Member

    Joined:
    Mar 26, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Idk, I installed a 1100 kernal with BB1.1 and I went into SetCPU and it was still at my previous settings of 800 and not 1100, but it SetCPU I could only get it up to 1000. :/
  3. BigMcGuire
    Offline

    BigMcGuire New Member

    Joined:
    Dec 13, 2009
    Messages:
    1,040
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    Los Angeles, California
    According to the notes in the last BB Froyo version - Pete sets it so that it will use the highest CPU slot available. The first version didn't do this so if you put a custom kernel on, you had to use SetCPU to use that extra CPU over 800Mhz. You just reposition the CPU bar back and forth and you'll be able to use all the CPU in that kernel. Version 0.2 fixes this. So you don't NEED SetCPU.

    I use it because I overclock to 1.2Ghz and it is nice having a failsafe. SetCPU will clock down my phone's processor if the temperatures get too hot.

    I've also noticed that while charging Froyo uses a lot of CPU. So I downclock it while it is charging via the profiles automatically.


    I don't think you're going to "perform better" with or without SetCPU. Because 1.2Ghz is the same with or without SetCPU. You just have more control/options with SetCPU that you may or may not need.
  4. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    Yes, this is exactly correct.

    But in Froyo kernels, the phone's processor temperature sensor doesn't work, yet, so that may be a moot point.

    A lot like, always > 500Mhz? If that's all, that's not a Froyo thing. Somewhere built-into the droid is a hard-limit. When it is plugged into AC, the CPU will not go lower than 500Mhz, even if you set it manually with SetCPU or directly manipulating the values in /sys. If you charge via USB, however, it will go wherever you tell it to.

    Exactly. If you want profiles to automatically set your maximum/minimum in different circumstances, use SetCPU. If you just want to set the max speed to be the max supported speed for the kernel, just use stock BB. If you want to pick your own max/min speed and governor on command, but otherwise leave it alone, I wrote a script to make that easier. In all three of those cases, the frequency will scale based on usage (it's not going to stick on at full speed)
  5. Skull One
    Offline

    Skull One New Member

    Joined:
    Mar 11, 2010
    Messages:
    760
    Likes Received:
    6
    Trophy Points:
    0

    I suggest you read two things:

    http://www.droidforums.net/forum/hacking-faqs/47871-overclocking-101-a.html

    And my post in response to SetCPU and Peter's claims.

    http://www.droidforums.net/forum/bugless/47575-setcpu-vs-petes-v1-1-cpu-script-7.html#post512512
  6. Phxphenom
    Offline

    Phxphenom New Member

    Joined:
    May 12, 2010
    Messages:
    287
    Likes Received:
    0
    Trophy Points:
    0
  7. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    Your comments are out of date, now. For previous version of BB, you were correct - the maximum CPU scaling speed was hard-coded into the /system/xbin/pete script. Customized copies of that script were distributed with the bekit kernels recommended with BB. That's why ONLY the recommended kernels went the right speed. But again, this is no longer the case as of BB 0.2.

    BB 0.2 Froyo uses /system/etc/install-recovery.sh as a startup script. Inside the startup script it sets the scaling_max_freq value (in the /sys virtual filesystem). It sets it to the value found in cpuinfo_max_freq (also found in the /sys virtual filesystem).

    What this means is that on boot, it DOES set the speed to the maximum value supported by your kernel on boot - regardless of what kernel you have! The /sys virtual filesystem is like a window into the kernel. Some of the virtual files in there are designed for reading values from, some are designed for writing values, and some can do both. In this case, you are reading the maximum supported cpu speed in the cpuinfo_max_freq file and writing that to the scaling_max_freq file to select that speed. Without having to modify that startup script, you can flash a new kernel and rest assured that when you boot back up, you will be running at your new maximum speed!

    NOTE: There IS still a problem! Your MINIMUM speed is still being hard-coded to 250Mhz. If you install a kernel that does not have a 250Mhz slot, all bets are off as to what your minimum speed will be set to.

    I wrote a setspeed script to allow simple modification of speed both immediately and persistent between reboots, compatible with the latest releases of BB Froyo (0.1, 0.2 and 0.2.1). See it in another thread in this subforum.
  8. Skull One
    Offline

    Skull One New Member

    Joined:
    Mar 11, 2010
    Messages:
    760
    Likes Received:
    6
    Trophy Points:
    0
    The point of my argument wasn't the fact that the overclocking was hard coded instead of reading the files to set low and high.

    My point was SetCPU can be used to protect the CPU overheating under 2.1 and below rom sets.

    And once 2.2 kernels get CPU temp code built in, then we can add that to the list as well.
  9. czerdrill
    Offline

    czerdrill New Member

    Joined:
    Jan 2, 2010
    Messages:
    4,828
    Likes Received:
    12
    Trophy Points:
    0
    Agreed, it goes back to why you want to use setCPU. No script in the world will be able to dynamically monitor temps and adjust kernel speeds accordingly. Same with reading battery states. Whether or not pete allows you to use any kernel in the world is cool, but it doesn't solve the problem of having profiles and it never will without a setCPU or setCPU like application.
  10. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    Ahh, oops - I misread your point, then. The over-simplified bullet point in the release notes for BB that says "removed need for SetCPU" doesn't really explain how there are other features that SetCPU offers that BB just doesn't - like the profiles and temperature monitoring.

    Yeah, BB does NOTHING to prevent overheating due to overclocking - but it also doesn't have anything active in memory to do the overclock like SetCPU does. So it's a tradeoff - the risk of overheating vs the battery life reduction of having a resident app in a polling loop reading sensors.
  11. czerdrill
    Offline

    czerdrill New Member

    Joined:
    Jan 2, 2010
    Messages:
    4,828
    Likes Received:
    12
    Trophy Points:
    0
    Yep, and that's where the argument will never end haha...i for one think its a no-brainer. and honestly are people really getting dramatically reduced battery life or performance because setCPU is installed? i get 24+ hrs on my Froyo ROM with setCPU and profiles and have been getting comparable battery life in previous android versions as well...
  12. Skull One
    Offline

    Skull One New Member

    Joined:
    Mar 11, 2010
    Messages:
    760
    Likes Received:
    6
    Trophy Points:
    0
    The amount of battery SetCPU uses over 24 hours when properly installed and setup, based on my testing, is less than .01%.

    A simple live wallpaper can use 100 times that much power in the same time frame.
Search tags for this page

android cpuinfo max freq

,
android scaling max freq permission denied
,
cpuinfo max freq android
,
cpuinfo max freq android 4.4 location
,
edit scaling max freq android
,

scaling max freq android

,
scaling max freq locked
,
setcpu basics
,
setcpu scaling max freq android