• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Redux CPU Clock Speed Issue

Chilly McFreeze

Well-Known Member
Aug 30, 2010
166
35
43
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?
 
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.
 
  • Like
Reactions: adskankster
Upvote 0
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.

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.
 
Upvote 0
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.
 
Upvote 0
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.
go to know to help other people

thanks for keeping us updated
 
Upvote 0
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.

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.
 
Upvote 0
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.

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
 
Upvote 0
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.
 
  • Like
Reactions: Paul8944
Upvote 0
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.
 
  • Like
Reactions: Chilly McFreeze
Upvote 0
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.
 
  • Like
Reactions: Chilly McFreeze
Upvote 0
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:
public void onReceive(Context context, Intent intent) {
                    String action = intent.getAction();
                    if (action.equals(Intent.ACTION_SCREEN_ON) &&
                                (mScreenstateScaling || mPowersave) &&
                                !isSetCpuRunning()) {
                        onScreenOn();
                        if (mPowersave) {
                            // not robust enough:
                            CPUHelper.setMaxFreq (mPowersaveFreq);
                            CPUHelper.setGovernor (mPowersaveGov);
                        }
                    } else if (action.equals(Intent.ACTION_SCREEN_OFF) &&
                               (mScreenstateScaling || mPowersave) &&
                               !isSetCpuRunning()) {
                        onScreenOff();
                    }
                }

Code:
	private void onScreenOff() {
		CPUHelper.setMinFreq (minFreq);
		CPUHelper.setMaxFreq (minFreq);
	}
 
  • Like
Reactions: Chilly McFreeze
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones