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

[GUIDE] [Osprey] Advanced Interactive Governor Tweaks

Search This thread

TVD1903

Senior Member
Jan 9, 2016
81
23
Eindhoven
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
 
Last edited:

sticktornado

Senior Member
Aug 25, 2015
177
73
Trying out these settings for a while, but it definitely seems more responsive. Maybe that's just a placebo, though.
 

Tel864

Senior Member
Nov 22, 2011
3,012
1,096
Greenville
With my XT1540 1gb on 6.0 and the stock kernel, the responsiveness seems better. I'm going to run it a day to check battery and if that's ok, I'll apply these settings on boot.

One question...on the target load settings I'm seeing a space between 400000: and 68. All the other values don't have a space after the colon so I assumed this one shouldn't either.
 
Last edited:

..::Matr!x::..

Senior Member
Jul 15, 2013
421
174
me also testing.... xt1541 2gb with stock 5.1.1 rom and squid kernel
for now with those settings and intelligplug enabled (hotplug driver) everything seems little bit smoother than before ... now testing battery....
from what i can see in kernel adiutor>>frequencies tab: some intermediate frequencies are disabled/unused....(533mhz, 800mhz, 1152mhz)... before only 200mhz was unused 'cause min freq was set to 400mhz....

---------- Post added at 02:51 PM ---------- Previous post was at 02:43 PM ----------

With my XT1540 1gb on 6.0 and the stock kernel, the responsiveness seems better. I'm going to run it a day to check battery and if that's ok, I'll apply these settings on boot.

One question...on the target load settings I'm seeing a space between 400000: and 68. All the other values don't have a space after the colon so I assumed this one shouldn't either.
no space between 400000:68
 

TVD1903

Senior Member
Jan 9, 2016
81
23
Eindhoven
One question...on the target load settings I'm seeing a space between 400000: and 68. All the other values don't have a space after the colon so I assumed this one shouldn't either.
Oh shoot! You're right on that, it's just a typo. Thanks for letting me know!

me also testing.... xt1541 2gb with stock 5.1.1 rom and squid kernel
for now with those settings and intelligplug enabled (hotplug driver) everything seems little bit smoother than before ... now testing battery....
from what i can see in kernel adiutor>>frequencies tab: some intermediate frequencies are disabled/unused....(533mhz, 800mhz, 1152mhz)... before only 200mhz was unused 'cause min freq was set to 400mhz....
Yes, that is exactly the behavior we want to see. We don't like those frequencies because they are not the most efficient to be running at. The governor is now set to quickly scale up to the frequency we need to do a certain thing (browsing, app loading etc.). If you wanted to be running at those frequencies more, you could up the target_loads on them, but I do not recommend that.
 
  • Like
Reactions: ..::Matr!x::..

Tel864

Senior Member
Nov 22, 2011
3,012
1,096
Greenville
Ok, this is strange, my target load settings aren't sticking. I've put them in twice and after a few minutes, that setting reverts back to 80. I can put them in, exit Kernel Adiutor and come right back and they're there. If I wait a little while and go back, they're gone.
XT1540 1gb
Stock rom
Marshmallow 6.0

Sent from my SM-T530NU using Tapatalk
 

TVD1903

Senior Member
Jan 9, 2016
81
23
Eindhoven
Ok, this is strange, my target load settings aren't sticking. I've put them in twice and after a few minutes, that setting reverts back to 80. I can put them in, exit Kernel Adiutor and come right back and they're there. If I wait a little while and go back, they're gone.
XT1540 1gb
Stock rom
Marshmallow 6.0

Sent from my SM-T530NU using Tapatalk
Hmm that is odd indeed. Could you flash a custom kernel and try again?
 

Tel864

Senior Member
Nov 22, 2011
3,012
1,096
Greenville
Hmm that is odd indeed. Could you flash a custom kernel and try again?
I'm going to have to wait on that, I'm on a soak test for a couple of apps so I need to stay stock kernel for now. For grins, I'm going to try another kernel app though I doubt that's it.

I just noticed that Greenify was closing Kernel Adiutor in the background. Although that wasn't affecting the other settings, I'm going to stop that and see if it works.
 
Last edited:

hekomat

Senior Member
Feb 4, 2012
233
72
My target load settings aren't sticking either, I'm on stock 5.1.1. rom, stock kernel, also using Kernel Adiutor.
 

TVD1903

Senior Member
Jan 9, 2016
81
23
Eindhoven
Okay. Thank you all for testing. I will add a message to the OP saying it doesn't work with the combination of stock Moto kernel and ROM. I'm not entirely sure why this is happening, but I feel it might be because of the hotplug. We can be sure that it is not due to the stock ROM, right? Someone's tested it on stock with Squid Kernel.
 
Last edited:

TVD1903

Senior Member
Jan 9, 2016
81
23
Eindhoven
Welp. There must be something with the Stock ROM that's preventing us from changing the governor settings. It does work here, on crDroid. I do not have the technological knowledge to fix this issue to be fair. If there is any dev reading this, could you please let us know what the problem is?
 

..::Matr!x::..

Senior Member
Jul 15, 2013
421
174
here with stock 5.1.1 rom, squid kernel and kernel adiutor app everything working....
1.png 2.png
 

mihaum

Senior Member
Jun 6, 2012
484
110
I have checked apply at boot, nevertheless taget_loads won't be saved. What is your device (i.e. XT1541)?
 

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 ;)