1. Download our Official Android App: Forums for Android!

Root Redux CPU Clock Speed Issue

Discussion in 'Android Devices' started by Chilly McFreeze, Sep 8, 2011.

  1. Chilly McFreeze

    Chilly McFreeze Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    63
    Posts:
    166
    Joined:
    Aug 30, 2010

    Aug 30, 2010
    166
    35
    63
    Oracle Developer
    I have a strange issue relating to clock speeds on my phone. I'm running Redux v1.2 (with the Manu kernal) and setCPU. Within setCPUI have the sliders set to 1190400 max and 128000 min. Set on Boot is checked and profiles are disabled.

    Everyone now and then (maybe twice a day) my phone slows down, and if I go into setCPU the green text indicates that the min and max have both changed to 248 (even though the sliders are still set to my desired values).

    I thought it might be a conflict with Redux's CPU settings, but looking at it I can't see a conflict:

    Powersave mode: off
    Screenstate Scaling: on
    Governor: ONDEMAND
    Minimum Frequency: 128MHZ
    Maximum Frequency: 1190MHZ
    Set on Boot: Off

    Any ideas what else might be choking my CPU?
     

    Advertisement

  2. SUroot

    SUroot Extreme Android User
    Rank:
    None
    Points:
    1,123
    Posts:
    23,916
    Joined:
    May 25, 2010

    May 25, 2010
    23,916
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    Set CPU and Redux CPU settings both change the same settings, its just 2 different GUI's to access it so no conflict can happen.

    Set CPU, what governor? Do you have any profiles?

    Have you ever Menu>Device Selection>Autodetect settings?
     
  3. Chilly McFreeze

    Chilly McFreeze Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    63
    Posts:
    166
    Joined:
    Aug 30, 2010

    Aug 30, 2010
    166
    35
    63
    Oracle Developer
    Governor in Set CPU is ONDEMAND, I have some profiles but they aren't enabled.

    I have auto detected the settings but I have done it since installing the custom kernal, so maybe that's worth a try?
     
  4. SUroot

    SUroot Extreme Android User
    Rank:
    None
    Points:
    1,123
    Posts:
    23,916
    Joined:
    May 25, 2010

    May 25, 2010
    23,916
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    You need to do it after every kernel install
     
  5. Chilly McFreeze

    Chilly McFreeze Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    63
    Posts:
    166
    Joined:
    Aug 30, 2010

    Aug 30, 2010
    166
    35
    63
    Oracle Developer
    OK thanks, I've just done it so I'll keep an eye on it for a couple of days to see if it improves.
     
  6. SUroot

    SUroot Extreme Android User
    Rank:
    None
    Points:
    1,123
    Posts:
    23,916
    Joined:
    May 25, 2010

    May 25, 2010
    23,916
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    Lemme know :)
     
  7. Chilly McFreeze

    Chilly McFreeze Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    63
    Posts:
    166
    Joined:
    Aug 30, 2010

    Aug 30, 2010
    166
    35
    63
    Oracle Developer
    Unfortunately it's still doing it, any other ideas what might be causing it? Will the OS throttle the CPU if it overheats or anything?
     
  8. SUroot

    SUroot Extreme Android User
    Rank:
    None
    Points:
    1,123
    Posts:
    23,916
    Joined:
    May 25, 2010

    May 25, 2010
    23,916
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    No, the phone will reboot. Try reflash the kernel? Wipe data on setCPU too. Failing that wipe and reflash everything.
     
  9. Chilly McFreeze

    Chilly McFreeze Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    63
    Posts:
    166
    Joined:
    Aug 30, 2010

    Aug 30, 2010
    166
    35
    63
    Oracle Developer
    I think it may have been caused by the Screen State Scaling option. I turned that off and replaced it with a profile in setCPU and the issue hasn't recurred (touch wood). I don't know why this is and can't really be bothered to investigate now it's working, but I have a suspicion it might be a combination of that option and Widgetlocker not setting the CPU back to it's previous value when the screen comes back on.
     
    adskankster likes this.
  10. adskankster

    adskankster Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    142
    Joined:
    Aug 25, 2011

    Aug 25, 2011
    142
    21
    38
    IT
    Sheffield
    Didn't register this before but I may have had the same issue. Last Sunday I received a phone call while the screen had been off in my pocket for a while. I took it out and it was stuck on the slider screen. The phone was totally unresponsive until the call ended. I was using widgetlocker (but had the code lock on as well) and Redux 2 with CPU scaling. I forget whether I had Screen State Scaling option checked but it is highly likely.

    I'm on dGB now and use just Set CPU so can't test, but it sounds like the same issue.
     
  11. Chilly McFreeze

    Chilly McFreeze Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    63
    Posts:
    166
    Joined:
    Aug 30, 2010

    Aug 30, 2010
    166
    35
    63
    Oracle Developer
    I think I can say with confidence now that it was something to do with the Screenstate Scaling option, as it's been 10 days without a recurrence now. I'd advise if anyone else suffers from this problem that they disable this option and if they still need the functionality replace it with a setCPU profile.
     
    SUroot, Rastaman-FB and adskankster like this.
  12. Rastaman-FB

    Rastaman-FB Extreme Android User
    Rank:
    None
    Points:
    313
    Posts:
    6,113
    Joined:
    Sep 11, 2009

    Sep 11, 2009
    6,113
    1,010
    313
    UK
    go to know to help other people

    thanks for keeping us updated
     
  13. madhatter1689

    madhatter1689 Android Enthusiast
    Rank:
    None
    Points:
    68
    Posts:
    568
    Joined:
    Apr 21, 2010

    Apr 21, 2010
    568
    37
    68
    Church Minister
    Belfast
    adskankster - I had the same problem and the problem was because I had the settings in setcpu wrong. I had a profile for when screen was off and the settings were 128 low/245 max. I had to change the low one to 245 and the max to the next level up and it worked fine after that.
     
    adskankster likes this.
  14. adskankster

    adskankster Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    142
    Joined:
    Aug 25, 2011

    Aug 25, 2011
    142
    21
    38
    IT
    Sheffield
    I wasn't using SetCPU at the time, but the built-in Redux settings. I was keeping clear of 128 as well and had 245 as the min - as I do now using dGB and SetCPU.

    Thanks though, always good to have the extra info.
     
  15. SUroot

    SUroot Extreme Android User
    Rank:
    None
    Points:
    1,123
    Posts:
    23,916
    Joined:
    May 25, 2010

    May 25, 2010
    23,916
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    SetCPU and Redux CPU settings are both just a GUI interface into the same Kernel settings. A change in one is shown in the other.

    I personally find 245 as a max is fine for me. 128 is definitely too low. But it also depends on the governor. The only governor I use without issue is Ondemand, twhich is the default.

    Other things to look out for are having different governors for Screen on and screen off as a latency is realised switching between governors (i.e when changing state with the screen on) causing wake-up delays
     
  16. Chilly McFreeze

    Chilly McFreeze Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    63
    Posts:
    166
    Joined:
    Aug 30, 2010

    Aug 30, 2010
    166
    35
    63
    Oracle Developer
    I know Redux CPU settings and setCPU are GUIs for the same setting, but screen state scaling doesn't have an equivalent in setCPU. I'm guessing it's the equivalent of a setCPU profile, but does anyone know exactly what it does? Obviously it lowers the CPU frequency (to what?), but does it do anything else, like maybe change the governor? I'm guessing it must do to cause this issue that a setCPU profile doesn't cause.
     
    Paul8944 likes this.
  17. SUroot

    SUroot Extreme Android User
    Rank:
    None
    Points:
    1,123
    Posts:
    23,916
    Joined:
    May 25, 2010

    May 25, 2010
    23,916
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    I edited my previous post to avoid confusion
     
  18. Chilly McFreeze

    Chilly McFreeze Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    63
    Posts:
    166
    Joined:
    Aug 30, 2010

    Aug 30, 2010
    166
    35
    63
    Oracle Developer
    I know your post wasn't aimed at me SUroot , but it does raise an interesting question as to what that setting is actually doing, as it doesn't have an analogous setting in setCPU.
     
  19. SUroot

    SUroot Extreme Android User
    Rank:
    None
    Points:
    1,123
    Posts:
    23,916
    Joined:
    May 25, 2010

    May 25, 2010
    23,916
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    I'll have to download redux on my device. Ill do so and let you know what I find.
     
  20. SUroot

    SUroot Extreme Android User
    Rank:
    None
    Points:
    1,123
    Posts:
    23,916
    Joined:
    May 25, 2010

    May 25, 2010
    23,916
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    Hmm In january, Ihlades said screenstate scaling was in an init.d script, but looking at the scripts in /system/etc/init.d of teh downloaded rom, its not there. Maybe it is created after flash?

    Basically I dont know. I see references in the source:

    CPUSettings.java
    CPUHelper.java
    CPUReceiver.java
    CPUService.java

    But unlike powersave, nothing that shows exactly what it does.
     
    Chilly McFreeze likes this.
  21. adskankster

    adskankster Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    142
    Joined:
    Aug 25, 2011

    Aug 25, 2011
    142
    21
    38
    IT
    Sheffield
    Fairly sure my issue was similar to Chilly McFreeze's. I was very likely using the mystery setting. Would be interesting to see what it does - esp. in Redux 2.

    EDIT:

    From a quick look at the code, I would say that screen state scaling does the same as the powersave setting in that it sets the maximum cpu frequency the same as the minimum frequency. The max frequency is reset once the screen comes on.

    I haven't yet looked at cpuhelper in detail, so there may be more to it than that.

    EDIT2:

    Yup that *looks* to be it. The difference between the two settings is that both react to screen on/off and only powersave reacts to powersave mode being activated (whenever that is).

    I suppose there may be an issue is a lot of events are being triggered where the screen on event gets delayed so the cpu scaling is delayed and the phone is trying to deal with lots of activity on minimum speed (or 245 which is the default minimum).

    I might still be missing something though.
     
    Chilly McFreeze likes this.
  22. SUroot

    SUroot Extreme Android User
    Rank:
    None
    Points:
    1,123
    Posts:
    23,916
    Joined:
    May 25, 2010

    May 25, 2010
    23,916
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    Have a read of the java files above. With your scripting language knowledge, maybe you can decifer them better than I
     
  23. adskankster

    adskankster Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    142
    Joined:
    Aug 25, 2011

    Aug 25, 2011
    142
    21
    38
    IT
    Sheffield
    Sorry - I edited my post - to keep the information tidy.
     
  24. SUroot

    SUroot Extreme Android User
    Rank:
    None
    Points:
    1,123
    Posts:
    23,916
    Joined:
    May 25, 2010

    May 25, 2010
    23,916
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    What do you mean exactly?

    Code (Text):
    1. mPowersaveFreq = "729600";
     
  25. adskankster

    adskankster Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    142
    Joined:
    Aug 25, 2011

    Aug 25, 2011
    142
    21
    38
    IT
    Sheffield
    Actually, there's a bit more to this than I originally said with regards to powersave, but scree state scaling looks simple enough. Also, the code depends on SetCPU not being active.

    Code (Text):
    1.  
    2. public void onReceive(Context context, Intent intent) {
    3.                     String action = intent.getAction();
    4.                     if (action.equals(Intent.ACTION_SCREEN_ON) &&
    5.                                 (mScreenstateScaling || mPowersave) &&
    6.                                 !isSetCpuRunning()) {
    7.                         onScreenOn();
    8.                         if (mPowersave) {
    9.                             // not robust enough:
    10.                             CPUHelper.setMaxFreq (mPowersaveFreq);
    11.                             CPUHelper.setGovernor (mPowersaveGov);
    12.                         }
    13.                     } else if (action.equals(Intent.ACTION_SCREEN_OFF) &&
    14.                                (mScreenstateScaling || mPowersave) &&
    15.                                !isSetCpuRunning()) {
    16.                         onScreenOff();
    17.                     }
    18.                 }
    19.  
    20.  
    21.  
    Code (Text):
    1.  
    2.        
    3.     private void onScreenOff() {
    4.         CPUHelper.setMinFreq (minFreq);
    5.         CPUHelper.setMaxFreq (minFreq);
    6.     }
    7.  
    8.  
     
    Chilly McFreeze likes this.
Tags:

Share This Page

Loading...