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

Root [FIX] for CPU governors not sticking!!!

PlayfulGod

Extreme Android User
Now mtmichealson found this and I am just posting it for those who dont want to flash a new ROM etc.

Now if you use Root Explorer (or the likes) n nav to system/etc and look for a file named 'init.qcom.post_boot.sh, and open that up in the text editor in RE or you can adb pull it, edit n then push it back to the phone. Look for these 2 lines:
Code:
 echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
 echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
And delete them, save & exit.

if you want to use adb to type the follow in cmd or konsole:

To pull it from the phone:
Code:
adb pull /system/etc/init.qcom.post_boot.sh
To push back to the phone:
Code:
adb remount
Code:
adb push init.qcom.post_boot.sh /system/etc/
And that should fix you up ;)

GSE-C's next update will have this fix in it
 
Now mtmichealson found this and I am just posting it for those who dont want to flash a new ROM etc.

Now if you use Root Explorer (or the likes) n nav to system/etc and look for a file named 'init.qcom.post_boot.sh, and open that up in the text editor in RE or you can adb pull it, edit n then push it back to the phone. Look for these 2 lines:
Code:
 echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
 echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
And delete them, save & exit.

if you want to use adb to type the follow in cmd or konsole:

To pull it from the phone:
Code:
adb pull /system/etc/init.qcom.post_boot.sh
To push back to the phone:
Code:
adb remount
Code:
adb push init.qcom.post_boot.sh /system/etc/
And that should fix you up ;)

GSE-C's next update will have this fix in it


Is this for the stock governer settings within the ROM? I had the same problem of them not sticking when I was using Antutu but when I switched to setCPU I haven't had the problem. :D
 
Is this for the stock governer settings within the ROM? I had the same problem of them not sticking when I was using Antutu but when I switched to setCPU I haven't had the problem. :D
well I've had em stick n not stick lol. I think the cpu apps fights it n keep resetting when that setting sets it to ondemand.

But since I deleted those lines its not reverted once.
 
This didnt work for me. The only way it sticks for me prior nd after deleting those lines is to open setcpu, set the governor and instead of backing out i hit home.
 
Works perfect for me, governor is sticky like Crazy Glue after two reboots. Thanx again PG and MT.

EDIT: The only governor sticking is ondemand, others wont.
 
I got rid off the three lines and its still not sticking. If it does stick after a reboot it goes down to a max of 1200MHz as default.
 
Do you have setcpu (or app of choice) set to set on boot?

I will make a CWM flashable zip with this when I get a few minutes. My original actually has some other lines out of it also.
 
Do you have setcpu (or app of choice) set to set on boot?

I will make a CWM flashable zip with this when I get a few minutes. My original actually has some other lines out of it also.

I have setcpu, and I've tried both set on boot checked and unchecked!
 
I have used a few of the free overclocking apps and none of them stick. And CPU tuner was defaulting to 2016MHz min and max.
 
well I've had em stick n not stick lol. I think the cpu apps fights it n keep resetting when that setting sets it to ondemand.

But since I deleted those lines its not reverted once.

From what I notice, it almost happens like clockwork in 60 second intervals.
If I open a terminal and su, then
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
this second line is b.s lol, we only have one cpu. ;)
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor


then if you cat interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
a few times, some seconds apart. You'll see interactive there for a while, then all of the sudden it's ondemand.

If there's no cpu setting apps changing your governor on you, that tells me it's either a script that loops from time to time, or some app doing it within the stock rom's apk's, possibly even the system_server, or a driver?

the only thing I can think of that *might* work is this:
at boot, set the governor to whatever you want in a script.
chmod that file so that it's read only for everyone including root. Then whatever program tries to change it will just get an access denied, and hopefully logged so we can catch it.
 
From what I notice, it almost happens like clockwork in 60 second intervals.
If I open a terminal and su, then
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
this second line is b.s lol, we only have one cpu. ;)
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor


then if you cat interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
a few times, some seconds apart. You'll see interactive there for a while, then all of the sudden it's ondemand.

If there's no cpu setting apps changing your governor on you, that tells me it's either a script that loops from time to time, or some app doing it within the stock rom's apk's, possibly even the system_server, or a driver?

the only thing I can think of that *might* work is this:
at boot, set the governor to whatever you want in a script.
chmod that file so that it's read only for everyone including root. Then whatever program tries to change it will just get an access denied, and hopefully logged so we can catch it.
then nothing will be able to set it ;), might be sumtin in the ramdisk setting it at boot too.
 
Now mtmichealson found this and I am just posting it for those who dont want to flash a new ROM etc.

Now if you use Root Explorer (or the likes) n nav to system/etc and look for a file named 'init.qcom.post_boot.sh, and open that up in the text editor in RE or you can adb pull it, edit n then push it back to the phone. Look for these 2 lines:
Code:
 echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
 echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
And delete them, save & exit.

if you want to use adb to type the follow in cmd or konsole:

To pull it from the phone:
Code:
adb pull /system/etc/init.qcom.post_boot.sh
To push back to the phone:
Code:
adb remount
Code:
adb push init.qcom.post_boot.sh /system/etc/
And that should fix you up ;)

GSE-C's next update will have this fix in it


Hey PG or anyone else with experience... I am using Rom Toolbox Pro and I have tried to change the Kernel tweaks i.e. cache pressure down and I can't get it to stick. It doesn't matter which rom or kernel I use... right now I'm using #2 Rom with Plauged kernel. Actually I don't think I have ever come back to those settings and seen them stay the way I left them.

And my profiles don't automatically change when I plug in my phone. I have the CPU overclocked max when plugged up and I always have to go in and uncheck profiles and recheck it then it ramps up.

Cool ok then hope the doctors can diagnose and remedy this confounded issue along with the symtoms.......:rolleyes:
 
But on every reboot i have to repeat the steps

Still, it is an improvement and I'm grateful for it. I'm sticking with Number 2 for now, but it's nice to know that we've had progress on this issue. Thank you PG.
 
Hey,
Newbie here...
Could someone point out where in the file " echo "ondemand" /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor " is located? What are the lines just before and after it??

I've been looking for it and haven't been able to track it down. I know I'm in the right file but I'm just not sure if I'm overlooking it or if it just isn't there...??
 
Now mtmichealson found this and I am just posting it for those who dont want to flash a new ROM etc.

Now if you use Root Explorer (or the likes) n nav to system/etc and look for a file named 'init.qcom.post_boot.sh, and open that up in the text editor in RE or you can adb pull it, edit n then push it back to the phone. Look for these 2 lines:
Code:
 echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
 echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
And delete them, save & exit.

if you want to use adb to type the follow in cmd or konsole:

To pull it from the phone:
Code:
adb pull /system/etc/init.qcom.post_boot.sh
To push back to the phone:
Code:
adb remount
Code:
adb push init.qcom.post_boot.sh /system/etc/
And that should fix you up ;)

GSE-C's next update will have this fix in it

So, found this while digging around the root file system. Can I just delete "ondemand" in the available governors list?
ECRvHXR.jpg
 
Back
Top Bottom