• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[GUIDE] [Osprey] Advanced Interactive Governor Tweaks

Search This thread

mihaum

Senior Member
Jun 6, 2012
484
110
@..::Matr!x::.., actually, that helped. Not sure whether it was pasting itself or space after last character.

Edit: Nope, it came back to default value.
 

..::Matr!x::..

Senior Member
Jul 15, 2013
421
174
@..::Matr!x::.., actually, that helped. Not sure whether it was pasting itself or space after last character.

Edit: Nope, it came back to default value.

not sure but it could be some apps that interfere during startup....
you must investigate which app it could be....
on my old xperia found that apps like titanium backup or helium backup interfere with some parts of my init.d script.... maibe could be also debug usb enebled in developer options....
actually i'm not using titanium backup anymore.... i absolutely love this tiny one for backup some apps >>> systemcleaner

try also to wipe cache and dalvik... with twrp
 

mihaum

Senior Member
Jun 6, 2012
484
110
I don't use any application of that type. However, I have Xposed and GravityBox installed, but I don't think this would be the issue.
I don't have USB debugging enabled, and I don't see how this could affect it.
 

TVD1903

Senior Member
Jan 9, 2016
81
23
Eindhoven
Thank you all for replying. Could you all say which SKU you have, 1GB or 2GB version, Xposed etc. I will then make a list for myself and check if I can spot any relations between your confiqs.
 

mihaum

Senior Member
Jun 6, 2012
484
110
1GB XT1541, running stock 5.1.1, version: 23.41.47 with Xposed, SuperSU.
Xposed modules:
BootManager, ChromePie GravityBox, Greenify, Moto CheckBox, Obb on SD, XPrivacy.
 

SirSoviet

Senior Member
Sep 1, 2015
573
286
Toronto
Working perfectly fine here with Resurrection Remix 5.6.2 default kernel by boswelja, no reverting issues or anything like that. Device seems to be a lot more smoother and cooler. Battery also has improved massively.

XT1541, 1GB, Android 6.0.1 with Xposed and SuperSU. Xposed modules are Greenify, MinMinGuard, Use USB for Marshmallow, and YouTube AdAway.
 

Tel864

Senior Member
Nov 22, 2011
3,012
1,096
Greenville
Thank you all for replying. Could you all say which SKU you have, 1GB or 2GB version, Xposed etc. I will then make a list for myself and check if I can spot any relations between your confiqs.

XT1540 1GB
Marshmallow /Stock Rom
Xposed
GravityBox
No memory managers installed.

---------- Post added at 10:02 AM ---------- Previous post was at 09:05 AM ----------

OK, my settings seem to be saving now. If someone else wants to verify part of what I did....here goes....
I wanted to try Ex Kernel Manager, a paid app so I had to install Busybox which is required for that app. I made the settings in Ex Kernel Manager and they seem to be saving, at least for the past hour which is longer than before.

Someone that's having the problem I'm having, try installing Busybox Free (go into the app and do the smart install after installing the app), then try the settings again in Kernel Adiutor. Maybe all that's need is Busybox. I would uninstall Ex and try Kernel Auiditor myself, but I'm traveling today and won't get the chance until later.
 
Last edited:

hekomat

Senior Member
Feb 4, 2012
233
72
Busybox is definately not the problem since you can't use kernel adiutor without it:)
 
Dec 12, 2014
36
11
XT1540 2GB
Marshmallow/Stock Rom
Squid Kernel
Xposed
GravityBox

I was having the target_loads issue as well when I was using Kernel Adiutor, though I haven't had this issue after uninstalling it and by making Tasker profiles that execute the kernel tweaks on boot.

But now I have a different issue altogether. Now go_hispeed_load won't stick. For some reason it always reverts to 10. I first noticed it when I tried using EX Kernel Manager as suggested by @Tel864. I uninstalled it, then reinstalled Kernel Adiutor to see if the issue persisted. It SEEMED to stick at 99 using Kernel Adiutor, but upon checking /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load using Root Explorer, it reports 10...Opened up Kernel Adiutor once more and it still reported 99...I don't know what to believe anymore lol. Can anyone confirm if this is an isolated issue on my part?
 

TVD1903

Senior Member
Jan 9, 2016
81
23
Eindhoven
Well. After all your replies have come to this conclusion (which isn't too hard): Kernel Adiutor does NOT work with the stock ROM. I will update the OP to include a warning to not use Kernel Adiutor in combination with the stock ROM. I am not sure which kernel manager to recommend now though. I have heard quite a bit about EX Kernel Manager around the forum, so I will add that as well.

XT1540 2GB
I was having the target_loads issue as well when I was using Kernel Adiutor, though I haven't had this issue after uninstalling it and by making Tasker profiles that execute the kernel tweaks on boot.

But now I have a different issue altogether. Now go_hispeed_load won't stick. For some reason it always reverts to 10. I first noticed it when I tried using EX Kernel Manager as suggested by @Tel864. I uninstalled it, then reinstalled Kernel Adiutor to see if the issue persisted. It SEEMED to stick at 99 using Kernel Adiutor, but upon checking /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load using Root Explorer, it reports 10...Opened up Kernel Adiutor once more and it still reported 99...I don't know what to believe anymore lol. Can anyone confirm if this is an isolated issue on my part?
Okay. We can be absolutely sure now that Kernel Adiutor doesn't work with stock. Could you try out EX Kernel Manager or even changing the values directly using Root Explorer? If it still doesn't work, you could change the go_hispeed_load to a very low value and set hispeed_freq to 400 MHz.

Working perfectly fine here with Resurrection Remix 5.6.2 default kernel by boswelja, no reverting issues or anything like that. Device seems to be a lot more smoother and cooler. Battery also has improved massively.
Awesome! You're very welcome ;)

Also, @Tel864, how do you feel about the tweaks so far? Does your phone feel smoother and/or more responsive? Let me know!
 
Last edited:
Dec 12, 2014
36
11
Well. After all your replies have come to this conclusion (which isn't too hard): Kernel Adiutor does NOT work with the stock ROM. I will update the OP to include a warning to not use Kernel Adiutor in combination with the stock ROM. I am not sure which kernel manager to recommend now though. I have heard quite a bit about EX Kernel Manager around the forum, so I will add that as well.


Okay. We can be absolutely sure now that Kernel Adiutor doesn't work with stock. Could you try out EX Kernel Manager or even changing the values directly using Root Explorer? If it still doesn't work, you could change the go_hispeed_load to a very low value and set hispeed_freq to 400 MHz.

Awesome! You're very welcome ;)

Also, @Tel864, how do you feel about the tweaks so far? Does your phone feel smoother and/or more responsive? Let me know!

I've tried changing the value of go_hispeed_load with EX Kernel Manager and manually using Root explorer, and still no change, unfortunately. I've also tried different values, like 90 or 95, and it always reverts back to 10 for some reason. Since I'm stuck with this value, will changing hispeed_freq to 400 MHz as you suggested be a viable alternative that will achieve similar results?

EDIT: Just wanted to provide a small update...it appears that hispeed_freq has the same issue. No matter what I set it to, it always reverts to the max frequency available in our phones. I suspect I didn't notice it before because Kernel Adiutor reported it to be whatever I had set it to, just like go_hispeed_load, even though the actual file says different using Root Explorer. In short, looks like these tweaks in general don't work too well on Stock :(
 
Last edited:

TVD1903

Senior Member
Jan 9, 2016
81
23
Eindhoven
I've tried changing the value of go_hispeed_load with EX Kernel Manager and manually using Root explorer, and still no change, unfortunately. I've also tried different values, like 90 or 95, and it always reverts back to 10 for some reason. Since I'm stuck with this value, will changing hispeed_freq to 400 MHz as you suggested be a viable alternative that will achieve similar results?
Yes. The hispeed_freq is intended as a 'boost' clock speed, to be boosted to upon detection of a load equal to or higher as the go_hispeed_load. If we change the hispeed_freq to our Idle frequency with a low go_hispeed_load, it will instead 'boost' to the Idle frequency. The governor will switch to the Idle frequency as much as possible however because of the changes to target_loads we made, so the hispeed_freq will mostly be ignored by the kernel.
Also, seen as we changed the final (1204something MHz) target_load to 95, it will boost to 1363 MHz anyways under the heavy load of 95% or more.
 
Dec 12, 2014
36
11
Yes. The hispeed_freq is intended as a 'boost' clock speed, to be boosted to upon detection of a load equal to or higher as the go_hispeed_load. If we change the hispeed_freq to our Idle frequency with a low go_hispeed_load, it will instead 'boost' to the Idle frequency. The governor will switch to the Idle frequency as much as possible however because of the changes to target_loads we made, so the hispeed_freq will mostly be ignored by the kernel.
Also, seen as we changed the final (1204something MHz) target_load to 95, it will boost to 1363 MHz anyways under the heavy load of 95% or more.

See my edit of my post above yours. Looks like hispeed_freq has the same issue where it reverts back to its default setting :(
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Any information in this thread is based on @soniCron's guide here. If anyone would like more information on how exactly this works, head over there.

    Introduction

    After having read through all of soniCron's posts, I was really impressed and I wanted to test if for myself, but I do not have either a Nexus 6P of a Nexus 5X. I do however have a Moto G 2015, and since instructions were provided to apply his technique on other devices, I decided to give it a go. So after quite a bit of testing and calculating, I have been able to come up with some tweaks for our little phone. Now, I have not yet fully tested the battery life with these tweaks. I feel like they will work though, and so far, performance has been better than before and according to some frequency tables, the frequencies are staying lower.

    Some more details
    These tweaks should work on any ROM and/or kernel. However, there seem to be issues with the stock ROM, where either the target_loads and/or the above_hispeed_delay are not sticking. Please test for yourself. For a list of confirmed working ROMs, check below.
    Your phone must be rooted. If you are not sure how to do this, check this guide.

    With this out of the way, we can finally start with some numbers. In accordance with soniCron's thread, I have started with calculating the nominal (minimum required to do anything smoothly) clock rates for scrolling, watching video and loading apps. These clock rates were calculated using the performance governor, limiting the maximum clock speeds while performing a given task. These are only my observations and yours may vary depending on your settings and how well you have optimised your system and browser etc. Be sure to check if the clock rates are similar to those that you need to run the given task smoothly, you should be good to go.
    For idle, I observed a nominal clock rate of 400000 MHz.
    For scrolling, I observed a nominal clock rate of 998400 MHz.
    For video watching, I observed a nominal clock rate of 1094400 MHz.
    And finally, for app loading, I observed a nominal clock rate of 1209600 MHz.
    With these values in mind, I then proceeded to calculating the maximum and minimum loads that were most efficient. (For more details, please see soniCron's thread)
    Here they are:
    • 200000:1
    • 400000:68
    • 533333:50
    • 800000:25
    • 998400:82
    • 1094400:86
    • 1152000:10
    • 1209600:80
    These values are essentially the target_loads the kernel looks for. I have also applied some other miscellaneous tweaks for the governor which all helped with performance while keeping battery life. Now, without further ado, I present you:

    What you need to do (on Custom ROMs)

    1) Make sure you are rooted and have Busybox installed.
    2) Download a kernel manager app. There are loads of these in the play store, but I personally recommend this one.
    3) Pop the following values in at the 'governor tunables' section, making sure you have the interactive governor selected.
    • above_hispeed_delay 20000 400000:60000 998400:30000
    • boostpulse_duration 80000
    • go_hispeed_load 99
    • hispeed_freq 1363200
    • max_freg_hysteresis 60000
    • min_sample_time 60000
    • target_loads 98 400000:68 533333:50 800000:25 998400:82 1094400:86 1152000:10 1209600:90
    • timer_rate 35000
    • timer_slack 80000
    • align_windows 1
    4) TURN OFF TOUCH BOOST
    5) (OPTIONAL) apply the other tweaks listed here
    6) Make sure it's working correctly. Check if everything keeps running smoothly. If it doesn't, optimize your device more, or increase the min_sample_time by increments of 5000. If your CPU is going over the Idle speed often, adjust the timer_rate upwards by increments of 5000. If it stays at the Idle speed too much, adjust it downwards by increments of 5000.
    7) ENJOY!


    What you need to do (on Stock ROM)[Hit or miss for some]

    1) Make sure you are rooted and have Busybox installed.
    2) Download a kernel manager app. There are loads of these in the play store, but I personally recommend this one.
    3) Pop the following values in at the 'governor tunables' section, making sure you have the interactive governor selected.
    • above_hispeed_delay 20000 400000:60000 998400:30000
    • boostpulse_duration 80000
    • go_hispeed_load 90
    • hispeed_freq 1363200
    • max_freg_hysteresis 60000
    • min_sample_time 60000
    • target_loads98 400000:68 533333:50 800000:25 998400:82 1094400:86 1152000:10 1209600:90 [These are not sticking for some, though we are looking for help as you read]
    • timer_rate 40000
    • timer_slack 80000
    • align_windows 1
    4) TURN OFF TOUCH BOOST
    5) (OPTIONAL) apply the other tweaks listed here
    6) Make sure it's working correctly. Check if everything keeps running smoothly. If it doesn't, optimize your device more, or increase the min_sample_time by increments of 5000. If your CPU is going over the Idle speed often, adjust the timer_rate upwards by increments of 10000. If it stays at the Idle speed too much, adjust it downwards by increments of 10000.
    7) ENJOY!


    Conclusion
    I have had lots of fun with observing and calculating the optimal speeds and settings. I hope these tweaks will help someone and if they do, please let everyone know by leaving a post in this thread. Good luck!

    Thanks to:
    @soniCron for making his amazing guide
    @squid2 for making the kernel that inspired me to make this guide
    @abhijeetc9762 for making the rooting guide
    @==vj== for making the other tweaks-guide
    @Tel864, @FalKoopa, @..::Matr!x::.. , @JackTheRipper1891, @hekomat, @mihaum and more for testing

    Tested working on
    Squid kernel
    • crDroid 6.0.1
    • DominionOS 6.0.1
    X-Infinity kernel
    • crDroid 6.0.1
    • DominionOS 6.0.1
    Stock kernel
    • crDroid 6.0.1
    • Resurrection Remix 6.0.1
    • DominionOS 6.0.1
    Optimus kernel
    • crDroid 6.0.1
    2
    Op finds discussions to be offensive. Hence deleted.
    2
    Haha yes probably :). Oh well, it was more of an experiment anyways and the timer_rate at 40000 instead of 35000 will not make a lot -if any- on most systems anyways, sooo...


    Great to see that your settings are sticking. No, the stock kernel does indeed not have the touchboost feature.


    Sweet. As I mentioned above, the 5000 difference in the timer_rate will most likely not make a big difference. It is curious that it does not work on both a custom ROM and Kernel though. I have not encountered any issues on crDroid.

    OK, I have a partial answer for the timer_rate setting. It will only take 10000 value increments. It will accept 30000 fine. Sooo, I'm wondering what would be best, 30000 or 40000.
    I've also discovered that go_hispeed_load will only take multiples of 10. I can use 90 or 100, but not 99.
    1
    Great to see they seem to be working for you! Could you please let me know which ROM and/or Kernel you're using? I could use that information to make a 'working' or 'tested' list.
    I'm using the stock 6.0 ROM with Squid's Kernel, revision 14b. If it also helps, I'm on the 1GB version of XT1540.
    1
    @TVD1903,
    thanks for the reply. I will test them later today and will give you some feedback ;)