[GUIDE] Advanced Interactive Governor Tweaks; Buttery smooth and insane battery life!

Search This thread

/root

Senior Member
Jul 17, 2010
175
47
[*]LoG - @RogerF81's Swansong in the SD808 world. A fresh take on the Interactive governor based on reported power consumption of the CPU at different frequencies. Well received and converted for N5X use by @LazerL0rd.
[/LIST]

Please contact ME with questions or feedback concerning the profiles above; not soniCron. Mention me in the post using the @ symbol or message me privately.
Thank you for the scripts.
The link to LoG is dead.
 

/root

Senior Member
Jul 17, 2010
175
47
Oh boy. Yeah... The Magisk Module Download is dead but the bash script download isn't. Download the Bash Script, run it as root, and save the settings that it applied in whatever kernel manager you use. Then make sure they're set to apply on boot. Should work the same.

Thanks your for updating, I am not sure if the bash script was there the last time I checked. Maybe I missed it.
 

Ulqiorra

Senior Member
Oct 24, 2010
89
11
32
Kyiv
Can someone recommend a good profile for Nexus 5X ? Battery life is a focus, but without compromising on performance. Currently using Ghostpepper + ElementalX kernel
 

Mr.trololol

Senior Member
Aug 24, 2012
117
19
Lagos
Xiaomi Mi 4
Xiaomi Poco F1
How to calculate this?

"For the maximal efficient load, we want to correlate a load value no higher than 90% of a given clock rate before it would be more efficient to jump to the next clock rate–to avoid overwhelming a particular rate while avoiding premature jumps to the next. For this value, we calculate it as:

(clock rate * 0.9) / next highest clock rate

For example, the maximal efficient load for 600Mhz on the Nexus 5X would be caluclated as:

(600000 * 0.9) / 672000 = 80.36% (rounded and normalized: 80)

For the minimal efficient load, we want to correlate a load value at which anything higher would be better served by a higher clock rate. To calculate this:

(1 - next highest clock rate / clock rate) * -1

For example, the minimal efficient load for 600Mhz on the Nexus 5X would be calculated as:

(1 - 672000 / 600000) * -1 = 12.00% (rounded and normalized: 12)

For the Nexus 5X, the maximal efficient loads of CPU 1 are:

  • 384000:75
  • 460000:69
  • 600000:80
  • 672000:76
  • 787000:81
  • 864000:81
  • 960000:69
  • 1248000:78

For the Nexus 5X, the minimal efficient loads of CPU 1 are:

  • 384000:0
  • 460000:19
  • 600000:30
  • 672000:12
  • 787000:17
  • 864000:9
  • 960000:11
  • 1248000:30
  • 1440000:15"

sir how to calculate this ?

(1 - 672000 / 600000) * -1 = 12.00%

i dont get 12 as result using normal calculator


tanks for guide
 
Last edited:
  • Like
Reactions: akhilkgeorge93

lapist

Senior Member
Hello,
Can anyone please help me to port HawkTail 1.2 9or any other balanced governor) settings to Nubia Z17 Lite (Snapdragon 653)?

I mainly don't know how to build target_loads for little and big CPUs - whether all available frequencies should be there, or just some, and how to calculate respective loads for them - it seems it is using a different formula than (clock rate * 0.9) / next highest clock rate, which is mentioned in the first thread).

From what I found in the kernel sources, frequency tables are the following:
CPU frequency tables:
qcom,cpufreq-table-0 =
< 400000 >,
< 691200 >,
< 806400 >,
< 1017600 >,
< 1190400 >,
< 1305600 >,
< 1382400 >,
< 1401600 >,
< 1440000 >;
qcom,cpufreq-table-4 =
< 400000 >,
< 883200 >,
< 940800 >,
< 998400 >,
< 1056000 >,
< 1113600 >,
< 1190400 >,
< 1248000 >,
< 1305600 >,
< 1382400 >,
< 1612800 >,
< 1747200 >,
< 1804800 >,
< 1958400 >;

Voltages are available probably in https://github.com/ztemt/NX591J_N_k...arch/arm/boot/dts/qcom/msm8976-regulator.dtsi , but I don't understand how to read voltage for specific frequencies from there.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 275
    (If you own a Nexus 5X or 6P and you are too lazy to read the philosophy of this technique, head on down to the 2nd post and pop those values into your kernel manager and be happy. If you own a different device, please read this post in full.)

    The Introduction

    I'm about to tell you how to get buttery smooth, lag free performance with insanely good battery life, using an old school governor featured in practically every kernel... This tweak is applicable to every phone with any ROM or kernel--stock or custom--that provides the Interactive Governor. :good:

    Yeah, yeah... everyone promises good battery with great performance, but who actually delivers? Maybe it isn't as smooth as you want, or maybe it requires something your kernel or ROM don't support. Or maybe the battery life promises just aren't what you expected. There's always some awful compromise. Not here!

    This isn't a guide to get 36 hour battery life... provided you never use your phone. That's deep sleep optimization, which is lovely and all, but what good is the phone if you can never use it?! And with the new Marshmallow Doze feature, this strategy is becoming a think of the past. What I'm talking about is 7-14 hour screen on, actual hands-on usage times! Without compromising anything, you can get 7-8 hour screen on usage with regular, no-compromise usage habits: daytime visible screen brightness, both radios on, sync on, network location on, all the regular usage features, the whole kit and kaboodle... all smooth as a baby's butt and snappy as a Slim Jim! (Up to 14+ hours if you can stand minimum brightness and WiFi-only with a custom ROM and other stuff turned off! And this is with stock voltages and full frequency range--you'll likely get even more if you choose to optimize those as well!)

    However, it should be noted that this does not apply to gaming, heavy camera use, etc. Anything that is an automatic battery killer in and of itself. There's nothing that can be done about anything that forces the phone to utilize its maximum resources all the time. But you should know that by now. Further, this guide is about optimizing the CPU as much as possible. It does not cover things like eliminating wakelocks so your phone sleeps well, removing unnecessary and battery draining stock apps, keeping your screen brightness down*, and all that stuff that's been covered in other posts ad infinitum. Those optimizations are up to you.

    *At least on the Nexus 5X, you shouldn't be turning your screen brightness above about 60%. It should be more than viewable in sunlight at that brightness, and keep in mind that the brightness power requirements increase exponentially, so a 100% bright LCD screen will use about 3.5-4.5x more power than a 60% bright screen. I don't see that fact brought up often, so I thought I'd mention it here.

    After a bit of tweaking and experimenting, I developed some settings that provide absolutely incredible battery life, buttery smooth performance, and a lag free experience. And you don't need a fancy governor, or a custom kernel, custom clock rates, or even a Nexus 5X. This will work on any ROOTed phone with the Interactive governor!

    So, after writing a (nearly identical) guide for the EvoLTE folks over a year ago, I'm now back to update this information to provide strategies for multi-CPU devices, as well as specific settings for the Nexus 5X you can use right away.

    Enough long winded preamble! Let's get down to...


    The Nitty Gritty

    Before I lay out all the settings so you can blindly enter them into your governor control, I should to explain some of the principals I employed to get the results I did. The primary thing to understand before I do is: little might you know, the settings in the Interactive governor can be tweaked on a clock range basis. That is to say, you can finely control how the governor responds at a variety of clock rates, thus better dictating how it should operate under various loads. This is integral to the configuration, because it means the difference between jumping from the slowest speed to the highest speed under load and sustaining lower clock speeds for tasks that don't really require higher clock speeds.

    By default, the Interactive governor will jump from lowest speed to a "nominal" speed under load, and then scale up from that speed as load is sustained. That is lovely, but still too twitchy to provide serious efficiency and power savings. It spends most of its time at 2 or 3 clock speeds and barely hits other clock speeds that are ideal for other tasks or usage patterns.

    Instead, what we want to do is configure it to handle different types of loads in different ways. A load suited for scrolling through a webpage is not the same as a load suited for downloading/processing streaming video is not the same as a load suited for snappy loading of an app is not the same as a load suited for high performance gaming. Every kind of load has different tolerances at which their minimal speed is indistinguishable from their maximal speed.

    To understand what's best under a variety of tasks, we have to identify two types of load profiles: nominal clock rates and efficient clock rates.


    Nominal Clock Rates

    Nominal clock rates are the minimum CPU clock rates that perform a given task smoothly and without stuttering or lag. To find the nominal clock rate for a given task, turn on only the first CPU using the Performance governor and turn them both down incrementally until you find the minimum clock rate that works best for what you're trying to do, without introducing hiccups. (If you have a CPU or kernel that hotplugs individual cores, multiply that clock speed by your number of cores.) Keep the 2nd CPU on the Powersave governor with the lowest frequency your kernel supports. (Or turn it off completely if hotplugging allows.)

    (Note: If your device supports per-core hotplugging, you might be better off using the old guide to determine your nominal clock rates. The Nexus 5X and all current kernels only support hotplugging entire CPUs, so your results may vary if you use any other device.)

    For example, on my Nexus 5X, scrolling (not loading, simply scrolling) through a large webpage smoothly will occur when the first CPU clock rates are no less than 460Mhz. (This is on mine without background tasks taking any CPU. Yours may be different depending on services running, the browser you use, your ROM, kernel, etc.) Thus, the nominal clock rate for scrolling a webpage on my Nexus 5X is 460Mhz.


    Efficient Clock Rates

    Efficient clock rates are CPU clock rates that are unique in that they are the most optimal frequency given the range of voltage requirements. If you map out the frequency jump and the voltage requirement jump between each of the available clock rates, you will find that occasionally the voltage requirement will jump significantly without the frequency jumping proportionally to the previous differentials. For example, using stock voltages, the EvoLTE's msm8960 chipset clock/voltage ratios jump significantly higher from 702Mhz to 810Mhz than the ratios from 594Mhz to 702Mhz.

    Because I cannot find the stock voltages of the Nexus 5X clock speeds, this section is INCOMPLETE! If you know the voltages, please post and I can update this guide to include the 5X's Efficient Clock Rates.


    Clock Rate Biases

    Using the information provided above, figure out both your nominal clock rates for the tasks you perform most often and your efficient clock rates depending on your kernel/custom voltage settings. For me, since I cannot determine the efficient clock rates, I use the nominal clock rates listed above. For the tasks I generally perform on my phone, my nominal clock rates are as follows:

    • Idle - 384Mhz
    • Page Scrolling - 600Mhz
    • Video - 787Mhz
    • App Loading - 960Mhz
    • High Load Processing - 1440Mhz
    (Note that you must calculate the values that are optimal for your phone for best battery and performance! Each phone is different because of the ROM, kernel, background tasks, etc!)

    With this done, you will want to start the fine tuning phase! Correlate the efficient clock rates with their closest nominal clock rates, similar to below:

    (This section of the guide is INCOMPLETE because I do not know the clock rate voltages for the Nexus 5X. If you know these, please post in the comments and I will update the guide!)

    • Idle - ???Mhz efficient / 384Mhz nominal
    • Page Scrolling - ???Mhz efficient / 600Mhz nominal
    • Video - ???Mhz efficient / 787Mhz nominal
    • App Loading - ???Mhz efficient / 960Mhz nominal
    • High Load - ???Mhz efficient / 1440Mhz nominal
    Keep these handy, as they're going to be necessary for...


    The Set Up

    Now that we know what are the most efficient nominal clock rates we want to focus on and what the most optimal are for what we want to do, we will start low and scale up as necessary. It's always better to begin with underperforming and tweak the settings upward until we're satisfied with the performance of our target tasks.

    In its default state, the Interactive governor has a hair trigger that will raise and lower the clock rates, which means it spends too much time at unnecessary clock speeds, wasting power, and scales down too quickly, leading to stuttering performance. We will take advantage of a seldom used feature of the Interactive governor. Specifically, that with which it determines when it is okay to scale up to each higher clock rate, on a frequency by frequency basis.

    We have two primary goals: respond as quickly as possible to each load request for a lag free experience and exceed the desired clock rate for a given task as little as possible. To do this, we will instruct the Interactive governor to trigger certain clock rates in different ways depending on our expected load.

    I won't explain all of the settings of the Interactive governor--there are plenty of summaries all around. (Go search now if you don't know what any of the settings for Interactive governor do. I'll wait here.) However, I will explain an incredibly powerful feature of the Interactive governor that is rarely included in those summaries: multiple frequency adjustments.

    The above_highspeed_delay setting, for example, defines how long the governor should wait before escalating the clock rate beyond what's set in highspeed_freq. However, you can define multiple different delays that the governor should use for any specified frequency.

    For example, we want the above_highspeed_delay as low as possible to get the CPU out of the idle state as quickly as possible when a significant load is applied. However, we don't want it to jump immediately to the fastest clock rate once it's gotten out of idle, as that may be overkill for the current task. Our target trigger (which you will later adjust to suit your system and usage profile), will begin at 20000μs. That means 20,000μs (or 20ms) after our idle max load has been reached, we want to assume idle has been broken and we want to perform an actual task. (We want this value as low as possible without false positives, because it is one of a few factors that determine how snappy and lag free the CPU's response is.)

    But at this point we're not ready to take on a full processing load. We may just be briefly scrolling a webpage and don't need the full power of the CPU now that we've allowed it to break out of idle. So we need it to reach a particular frequency and then hold it there again until we're sure the load is justified before we allow it to push the frequency even higher. To do that, rather than just setting

    above_highspeed_delay - 20000

    we will instead use the format "frequency:delay" to set

    above_highspeed_delay - 20000 460000:60000 600000:20000

    "Waaaait... What does that do?!"

    This tells the Interactive governor to hold out 20ms after our target load when it's at our highspeed_freq (which we're actually using as our idle frequency--not a burst frequency as originally intended), but then it tells the governor to hold for 60ms after it's reached 460Mhz. Once it has exceeded 460Mhz, it then has free reign to scale up without limitation. (This will be optimized with the target_loads setting in a minute. And if you don't know what I'm talking about when I say "highspeed_freq" then you didn't go search for the basic Interactive governor settings and read about it! Go do that before you read any further, because I will not explain the basics of this governor!)

    These settings are among the most important, because they limit the phone's clock rates when you are not interacting with it. If it needs to do something in the background, chances are it does not need to run full throttle! Background and idle tasks should be limited to the lowest reasonable clock rate. Generally speaking, if you're just looking at your phone (to read something, for example), you want the phone to use as little CPU power as possible. This includes checking in with Google to report your location or fetching some pull data or... whatever. Things that you don't need performance for.

    So now that we know how to specify different settings for different frequency ranges, let's finish it all up with...


    The Money Shot

    If you've made it this far, you're ready to put these strategies into play! If you have not read the previous sections, DO NOT COMPLAIN IF THE DEFAULT SETTINGS DON'T PROVIDE WHAT YOU'RE LOOKING FOR!! These settings are templates only and these need to be adjusted for each case based on your system and usage patterns! IF YOU ARE NOT GETTING THE PERFORMANCE OR BATTERY LIFE PROMISED, ***READ THE SECTIONS ABOVE!!!***

    With that out of the way... let's rock!

    If you are using a Nexus 5X, use the following Interactive governor settings for CPU 1 ("little"–the one with 4 cores) and then tweak with the instructions below:
    (If you are using a phone other than a Nexus 5X, you must read the above sections and replace the frequencies with your own efficient clock rates!)
    • above_highspeed_delay - 20000 460000:60000 600000:20000
    • boost - 0
    • boostpulse_duration - 80000
    • go_highspeed_load - 99
    • hispeed_freq - 600000
    • min_sample_time - 30000
    • target_loads - 98 460000:19 600000:80 672000:12 787000:81 864000:9 960000:69 1248000:95 1440000:95
    • timer_rate - 20000
    • timer_slack - 80000
    These defaults work fine for me, but I have otherwise optimized my system fully, so they are at the minimal adequate values. If you have background tasks that consume any somewhat significant amount of CPU on a constant basis, you will most likely see awful, stuttery performance and poor battery life! So you must adjust them to suit your system before you see results!!! Anything more than about 15-20% idle CPU use at any given time will negatively affect the results you see without further tweaking!


    Optimize Idle Frequency

    Now that you've got the base configuration, we need to tweak it so that the CPU stays at your efficient idle frequency (384Mhz in this case) without spontaneously jumping when your phone is actually idle. To do this, open a CPU monitor that displays the current core frequencies (I like CoolTool, but you can use what you like as long as it doesn't significantly impact the CPU use--you're best off using a passive monitor and checking the results after 30-60 seconds of no activity), watch the frequencies and see how often they go above your efficient idle frequency when you're not doing anything at all, and adjust the following:

    • timer_rate - If your idle frequency is not being exceeded much, adjust this downward in increments of 5000 until it is, then increase it by 5000. If your idle frequency is being exceeded often, adjust this upward in increments of 5000 until your CPU primarily stays at or below your desired idle frequency.
    • above_highspeed_delay - Only if your timer_rate has matched or exceeded 50000 and still won't stay at or below your desired idle frequency most of the time, set timer_rate to 50000 and adjust the "20000" portion of the value upwards in increments of 5000 until the idle frequency has stabilized.
    The lower these two values are, the more snappy/lag free your system will be. So try to get them as low as possible without the idle frequency being exceeded too much, as this inversely affects the snappiness and efficiency of your phone when you're not doing anything. Lower = snappier but uses more CPU when you're not doing anything (such as reading a webpage); higher = less snappy but stays in a power saving state more often reducing CPU use when you're not interacting with the device. These are the most critical in determining your idle power savings, so keep that in mind if you want the most battery life!


    Enhance Task Responsiveness

    Now use the efficiency and nominal clock rate correlations you made for your master clock rate list in the section above and adjust your frequencies to suit your usage patterns. For example, I had web page scrolling as my 600Mhz rate, so I will open a web page and scroll and see how everything feels. If it feels sluggish, I will increase all the references to "600000" in both above_highspeed_delay and target_loads upwards to the next available clock rate until that task is smooth. What you are looking for is constant poor/sluggish performance when the task you're testing for is using its highest CPU use. If the task becomes sluggish/stuttery as it winds down (such as a scrolling webpage slowing to a stop), we will address that next, so do not take that behavior into consideration as you adjust these values! If the task is smooth until (or after) it slows down, then you have reached your optimal clock rate and can move on.


    Find Optimal Loads

    Now here's where we get a little math-heavy to determine what the optimal target_load frequencies are for each clock rate. (Might want to bust out a spreadsheet to do the math for you if you're not using a Nexus 5X.)

    We want to determine 2 values for every available clock rate: the maximal efficient load and the minimal efficient load. To make this determination, we need to bust out our calculators. (Or spreadsheets!)

    For the maximal efficient load, we want to correlate a load value no higher than 90% of a given clock rate before it would be more efficient to jump to the next clock rate–to avoid overwhelming a particular rate while avoiding premature jumps to the next. For this value, we calculate it as:

    (clock rate * 0.9) / next highest clock rate

    For example, the maximal efficient load for 600Mhz on the Nexus 5X would be caluclated as:

    (600000 * 0.9) / 672000 = 80.36% (rounded and normalized: 80)

    For the minimal efficient load, we want to correlate a load value at which anything higher would be better served by a higher clock rate. To calculate this:

    (1 - next highest clock rate / clock rate) * -1

    For example, the minimal efficient load for 600Mhz on the Nexus 5X would be calculated as:

    (1 - 672000 / 600000) * -1 = 12.00% (rounded and normalized: 12)

    For the Nexus 5X, the maximal efficient loads of CPU 1 are:

    • 384000:75
    • 460000:69
    • 600000:80
    • 672000:76
    • 787000:81
    • 864000:81
    • 960000:69
    • 1248000:78

    For the Nexus 5X, the minimal efficient loads of CPU 1 are:

    • 384000:0
    • 460000:19
    • 600000:30
    • 672000:12
    • 787000:17
    • 864000:9
    • 960000:11
    • 1248000:30
    • 1440000:15

    For the Nexus 5X, the maximal efficient loads of CPU 2 are:

    • 384000:72
    • 480000:68
    • 633000:74
    • 768000:80
    • 864000:81
    • 960000:69
    • 1248000:83
    • 1344000:84
    • 1440000:84
    • 1536000:84
    • 1632000:86
      1689000:83

    For the Nexus 5X, the minimal efficient loads of CPU 2 are:

    • 384000:0
    • 480000:25
    • 633000:32
    • 768000:21
    • 864000:13
    • 960000:11
    • 1248000:30
    • 1344000:8
    • 1440000:7
    • 1536000:7
    • 1632000:6
    • 1689000:3
    • 1824000:8


    Using Optimal Loads

    Now, you might be asking, "Why the heck did I do all this math?! WHAT IS IT GOOD FORRRR????!!!!"

    Well, we had put some values into target_loads earlier, but those values weren't arbitrary. See, for all of our nominal clock rates, we want the CPU to hang out on them for as long as possible, provided they're doing the job. For each frequency tagged as our nominal clock rate, we want to use the maximal efficient load in target_loads. For every other frequency, we want to use our minimal efficient load value.

    We don't care about those other frequencies. We don't want the CPU to hang out in those states for very long, because it just encourages the device to be reluctant to jump to a higher nominal frequency and causes stuttering. We eliminate the desire for the governor to select those frequencies unless it is absolutely efficient to do so. For all the nominal clock rates, we want the CPU to hang out there... but not for too long! So we set those values to the maximal efficient load, so they can escape to the next nominal frequency before they overwhelm the current frequency.

    All said and done, this reduces jitter and lag in the device while providing optimal frequency selection for our day-to-day tasks.


    Fix Stuttering

    Now that you have adjusted your frequencies for optimal high CPU use in each given task, you may notice some stuttering as the task winds down. (Such as a scrolling webpage slowing to a stop.) If this bothers you, you can tweak this at the expense of some (minor) battery life by adjusting min_sample_time up in increments of 5000 until you are satisfied.

    If you have exceeded a value of 100000 for the min_sample_time setting and still are not satisfied, change it back to 40000 and increase (and re-optimize) your idle frequency by one step. This will impact battery life more, but less than if you were to keep increasing the value of min_sample_time.

    However, this step should not be necessary if you properly calibrated your maximal and minimal efficient loads!


    But What About That 2nd CPU?!

    So we've all but ignored the 2nd CPU. The reason? It's a horribly inefficient processor designed for high load tasks that generally don't come into play during normal usage patterns. It's good for gaming and image processing, but not for most moderate tasks a user might employ.

    But it is good for one thing that all users do pretty frequently... loading and switching apps.

    Fortunately, at least for the Nexus 5X, the system is pretty smart about when to employ the power of this inefficient 2nd CPU. So it's generally kept at bay most of the time. What we want is to configure it to be our burst processor–we want it to come into play spontaneously and quickly during tasks that necessitate immediate high loads, like loading and switching apps. To do this, we will ignore all but 3 frequencies:

    • 384Mhz
    • 1248Mhz
    • 1824Mhz

    In this case, we configure it just as we did with CPU 1, but only worry about keeping it idle as much as possible, allow it to jump to 1824Mhz immediately when needed, and encourage it to fall back to 1248Mhz if a sustained load is needed.

    These values are ideal for the Nexus 5X, so if you have a different phone, choose the lowest clock rate, highest clock rate, and median efficient clock rate, using the instructions previously.

    For the Nexus 5X, we'll jump straight to...


    The Money Shot: Part Deux

    If you are using a Nexus 5X, use the following Interactive governor settings for CPU 2. ("big"–the one with 2 cores)
    (If you are using a phone other than a Nexus 5X, you must read the above sections and replace the frequencies with your own efficient clock rates!)
    • above_highspeed_delay - 20000
    • boost - 0
    • boostpulse_duration - 80000
    • go_highspeed_load - 99
    • hispeed_freq - 1824000
    • min_sample_time - 20000
    • target_loads - 98 480000:25 633000:32 768000:21 864000:13 960000:11 1248000:95 1344000:8 1440000:7 1536000:7 1632000:6 1689000:3 1824000:95
    • timer_rate - 20000
    • timer_slack - 80000

    What About Bob Touchboost?

    Touchboost is a nifty feature in a lot of kernels (including stock on Nexus 5X) that jumps up the frequency so that you experience minimal lag. However, with all the above settings, touchboost is usally detrimental to the efficiency of the device!

    We generally want to keep the CPU on the lowest possible frequency as much as possible, and touchboost interferes with that. Further, because we've set up the maximal and minimal efficient clock rates, as well as burst processing from the 2nd CPU core, we don't need touchboost!

    If your kernel allows you to shut it off, try to do so and see if the responsiveness of your device is acceptable. On the Nexus 5X, touchboost adds no perceptual performance gain and only hurts efficiency and battery life. If your kernel doesn't allow you to turn off touchboost, try another one, like the excellent ElementalX.

    Your battery life will thank you!


    The Conclusion

    I have achieved unprecedented performance, smoothness, snappiness, and battery life with the default settings I outlined above. However, your mileage may vary, as every phone, ROM, kernel, installed applications, etc are different. This is a very sensitive governor profile and must be tweaked to just meet the requirements of your system and your usage patterns!

    If it is not optimally tuned, performance and battery life will suffer! If you're not seeing buttery smooth, snappy performance, you have not correctly tuned it for your system!! However, if you do have superb performance (and you tweaked the values conservatively and not in large steps), then you will also get the aforementioned battery life.

    I will be happy to answer any questions, or provide any guidance I can. However:

    • You must otherwise optimize your phone first! This will not "fix" a poorly optimized system and will, in fact, reduce performance and battery life without further optimization and proper tweaking.
    • I will not answer questions about "what is a governor?" There are plenty of resources available already, so search for them.
    • I will not answer questions about "how can I tweak [some other] governor?" This is about the Interactive governor only.
    • I will not respond to "nuh uh! show proof!" posts. The fact that I spent 12 hours writing this up should be proof enough that I am satisfied with the results. You can take it or leave it; makes no difference to me. The default settings should work with any fully optimized Nexus 5X running ElementalX Kernel, so just try them on your own. If you're not absolutely satisfied (and trust me, either it'll work out-of-the-box with flying colors and you'll know it works for your system, or it'll be an awful experience which means you must tweak it), then you haven't adequately adjusted the settings to suit your system.
    Lemme know what you think, and good luck! :eek:
    214
    "I'm Too Lazy To Read All That! WHAT DO I NEED TO DO?!?!"

    If you own a Nexus 5X or 6P, install the ElementalX Kernel and the EX Kernel Manager. (Yes, it works in other kernels, but you're on your own regarding how to set the values. Other kernel editors, such as Kernel Adiutor, are currently buggy and problematic, so your mileage may vary. And if you have another device, you must follow the instructions in this post to derive your own values.)

    UPDATE: EX Kernel Manager now supports governor profiles and most currently published profiles are distributed with the manager. To access: EXKM> CPU> Governor options> Load, then select the profile you wish to try! Many thanks to @flar2 for providing native support!

    In the "CPU" section, turn off "Touchboost". (This is crucial!! YOU MUST TURN OFF TOUCHBOOST OR ELSE YOU WILL NOT SEE ANY BATTERY SAVINGS!!!) Make sure the "Max CPU Frequency" is set to the maximum possible value for each CPU. Make sure the "Min CPU Frequency" is set to the minimum possible value for each CPU. Then set the following values for each CPU under "Governor options" for each CPU respectively:

    CURRENT STABLE – Version 2.0
    Nexus 5X - The "Easy Way" Setup - For ElementalX Kernel

    CPU #1 (aka "little", aka "has 4 cores", aka "maxes out at 1440Mhz")


    • target_loads - 75 460000:69 600000:80 672000:76 787000:81 864000:81 960000:69 1248000:78
    • timer_slack - -1
    • hispeed_freq - 460Mhz
    • timer_rate - 20000
    • above_hispeed_delay - 30000 600000:20000 672000:10000
    • go_hispeed_load - 75
    • min_sample_time - 60000
    CPU #2 (aka "big", aka "has 2 cores", aka "maxes out at 1824Mhz")


    • target_loads - 72 480000:68 633000:74 768000:80 864000:81 960000:69 1248000:83 1344000:84 1440000:84 1536000:84 1632000:86 1689000:83
    • timer_slack - 80000
    • hispeed_freq - 633Mhz
    • timer_rate - 10000
    • above_hispeed_delay - 10000
    • go_hispeed_load - 72
    • min_sample_time - 100000
    Under "CPU Boost", set "input boost milliseconds" to "0".

    Nexus 6P - The "Easy Way" Setup - For ElementalX Kernel

    CPU #1 (aka "little", aka "low", aka "maxes out at 1555Mhz")


    • target_loads - 75 460000:69 600000:80 672000:79 768000:80 864000:81 960000:69 1248000:84 1344000:82 1478000:86
    • timer_slack - -1
    • hispeed_freq - 460Mhz
    • timer_rate - 20000
    • above_hispeed_delay - 30000 600000:20000 672000:10000
    • go_hispeed_load - 75
    • min_sample_time - 60000
    CPU #2 (aka "big", aka "fast", aka "maxes out at 1948Mhz")


    • target_loads - 72 480000:68 633000:74 768000:80 864000:81 960000:69 1248000:84 1344000:84 1440000:84 1536000:85 1632000:85 1728000:85 1824000:84
    • timer_slack - 80000
    • hispeed_freq - 768mhz
    • timer_rate - 10000
    • above_hispeed_delay - 10000
    • go_hispeed_load - 72
    • min_sample_time - 100000
    Under "CPU Boost", set "input boost milliseconds" to "0".

    (Having trouble applying these? Check out these great scripts from @Alcolawl PLEASE NOTE THAT THESE ARE OFFICIALLY UNSUPPORTED–direct your queries to Alcolawl so he might provide assistance.)

    ALPHAS – USE AT YOUR OWN RISK!! (Actually, we really like "GostPepper". Try it out. It's spicy! And don't worry–it won't break anything!)
    NEW! GlassFish (For most devices!) - High battery savings with buttery smooth interface!
    NEW! HawkTail (6P) - An advanced, modern profile that is both battery efficient and highly performant! All users are urged to check out HawkTail!
    Butterfly - A culmination of all strategies, provides smoothest performance of all currently published settings, though battery savings are a little more modest. Excellent for light and moderate users; heavy/marathon users might want to check out a different setting profile.
    GhostPepper (6P) - Uses a quantized, frequency-aligned parametric curve to influence low core clock rates while providing extremely smooth transitions from each clock rate and exceptional battery life. The current favorite, albeit not very well tested so far. HIGHLY RECOMMENDED
    SilverFish - Effectively eliminates "hispeed_freq" so perceptive scrolling performance is increased, giving the illusion of excellent performance while providing great battery life. Some users experience problems with performance while multitasking--NOT RECOMMENDED FOR EVERYONE. Light users should enjoy this very much, however.
    MadDog - The first major departure from the core strategy. Very well tested, extremely stable, and HIGHLY RECOMMENDED if you aren't fully satisfied with v2.0 settings. This is on the table to be the next stable v3.0, so rest assured you can't go wrong with this one!

    ARCHIVE
    v1.0
    Nexus 5X - The "Easy Way" Setup - For ElementalX Kernel

    CPU #1 (aka "little", aka "has 4 cores", aka "maxes out at 1440Mhz")


    • target_loads - 98 600000:80 787000:81 960000:69 1248000:85 1440000:90
    • timer_slack - 80000
    • hispeed_freq - 600Mhz
    • timer_rate - 20000
    • above_hispeed_delay - 10000
    • go_hispeed_load - 64
    • min_sample_time - 80000
    CPU #2 (aka "big", aka "has 2 cores", aka "maxes out at 1824Mhz")


    • target_loads - 90 633000:74 768000:80 960000:69 1248000:83 1536000:84 1689000:90
    • timer_slack - 80000
    • hispeed_freq - 1248Mhz
    • timer_rate - 10000
    • above_hispeed_delay - 10000
    • go_hispeed_load - 90
    • min_sample_time - 80000
    Under "CPU Boost", set "input boost milliseconds" to "0".

    Nexus 6P - The "Easy Way" Setup - For ElementalX Kernel

    CPU #1 (aka "little", aka "low", aka "maxes out at 1555Mhz")


    • target_loads - 98 600000:80 768000:80 960000:69 1248000:84 1478000:85 1555000:90
    • timer_slack - 80000
    • hispeed_freq - 600Mhz
    • timer_rate - 20000
    • above_hispeed_delay - 10000
    • go_hispeed_load - 64
    • min_sample_time - 80000
    CPU #2 (aka "big", aka "fast", aka "maxes out at 1948Mhz")


    • target_loads - 90 633000:74 768000:80 960000:69 1248000:83 1536000:84 1632000:85 1824000:90
    • timer_slack - 80000
    • hispeed_freq - 633mhz
    • timer_rate - 10000
    • above_hispeed_delay - 10000
    • go_hispeed_load - 90
    • min_sample_time - 80000
    Under "CPU Boost", set "input boost milliseconds" to "0".


    Changelog:
    8/23/16 - Added GlassFish profile
    8/16/16 - Added HawkTail profile
    1/24/16 - Added instructions to use EXKM's native profiles
    1/4/16 - Archived v1.0; elevated "crazy alpha 2" to v2.0 and posted; added links to other alpha settings
    12/27/15 - Updated for better performance on 5X and 6P
    12/25/15 - Updated to improve battery use on 6P and somewhat on 5X
    12/23/15 - Made the beta #2 settings the default; added settings for 6P
    187
    [PROFILE] Easier way to apply settings

    I've converted the scripts that were previously posted here to Profiles that can be used in the EX Kernel Manager app. It is now easier than ever to apply and share the settings discussed in this thread. HUGE thanks to @flar2 for the kickass app and recent update that makes this all possible. And, of course, another HUGE thanks to @soniCron for these settings and starting this entire discussion.

    Instructions
    1. Download and install the EX Kernel Manager app
    2. Download the file for the settings you'd like to apply. Descriptions of the different settings are located at the bottom of this post:
      NEXUS 5X
      Google Sheets Download Table
      NEXUS 6P
      Google Sheets Download Table
    3. Delete the file extension / Rename the file extension from ".txt" to nothing. (without the quotes, obviously... AFH won't let me host files without a file extension)
    4. Place the file in this directory:
      Code:
      /storage/emulated/0/ElementalX/gov_profiles
      or simply navigate to your sd card and find the ElementalX folder and place the file in the gov_profile subdirectory.
    5. You're done! You can now load the profile in EX Kernel Manager by navigating to Governor Options section of the CPU settings.

    If you're using the bash scripts follow these installation directions:

    1. Download the script of your choice
    2. Rename the file extension from .pdf to .sh
    3. Run in Terminal as SU OR run in a File Explorer app with Root Privileges and set permissions to 755 (Scripts must be run after every reboot).
    4. You're done!


    Source: https://github.com/Alcolawl/Interactive-Governor-Tweaks

    Profile Update Log - Used to make sure scripts are kept up to date with settings posted in the thread.
    Code:
    February 1st, 2017
    -Modified all non-retired su.d scripts with asynchronous execution code as suggested and demonstrated by [user=7836278]@LazerL0rd[/user]
    -Introduced su.d scripts for Glassfish 1.2, Kestrel 1.1, and KestrelOC 1.1
    -Modified DrunkSauce to use the Interactive governor on the Big cluster, as most CAF updates have been applied to the Interactive governor on custom kernels anyway.
    
    November 17th, 2016
    -Added Download links for DrunkSauce Nexus 6P adapted profile and scripts. Thanks [mention]shadowstep[/mention].
    
    November 16th, 2016
    -Released DrunkSauce for the Nexus 5X!
    
    September 25th, 2016
    -Released XAP 4 for the Nexus 5X!
    -Added Download links for XAP 4 Nexus 6P adapted profile. Thanks [mention]shadowstep[/mention].
    
    September 1st, 2016
    -Updated Kestrel and KestrelOC to version 1.1 for the Nexus 5X. This version should result in better battery without a performance hit.
    
    August 30th, 2016
    -Added FairPark and FairParkHE profiles, bash scripts and init.d scripts for the Nexus 5X
    
    August 23rd, 2016
    -Added GlassFish for Nexus 5X and any other big.LITTLE CPU phone!
    -Updated HawkTail to version 1.1 for the Nexus 5X
    
    August 17th, 2016
    -Added the HawkTail profile for both the Nexus 5X and Nexus 6P!
    
    July 18th, 2016
    -Released Kestrel and KestrelOC for the Nexus 5X
    
    May 9th, 2016
    -Released BlueJay RACER and Revived RedHawk for the Nexus 5X!
    
    May 5th, 2016
    -Updated BlueJay to version 1.1 for the Nexus 5X
    
    May 2nd, 2016
    -Added DarkSide Download Links and description.
    
    April 8th, 2016
    -Changed download links to Google Spreadsheets for better legibility.
    
    March 31st 2016,
    -Added BlueJay Profile for Nexus 6P
    
    March 28th, 2016
    -Added BlueJay Profile for Nexus 5X
    -Added instructions for bash script installation
    
    March 14th, 2016
    -Removed Gyrfalcon and DarkSpice Profiles
    -Added Eclipse for Nexus 5X and Nexus 6P
    
    March 3rd, 2016
    -Added Gyrfalcon v0.1 for Nexus 5X and Nexus 6P
    
    February 18th, 2016
    -Updated RedHawk to Version 3 for Nexus 5X and Nexus 6P
    
    February 16th, 2016
    -Added Links for DarkSpice for Nexus 6P
    
    February 12th, 2016
    -Added Links for DarkSpice for Nexus 5X
    
    February 7th, 2016
    -Updated .Zip packages for Nexus 5X and Nexus 6P
    
    January 27th, 2016
    -Fix RedHawk Profiles
    
    January 25th, 2016
    -Revert ButterFly profiles for Nexus 5X and Nexus 6P from v1.1 to v1.0
    
    January 24th, 2016
    -Converted the Scripts to Profiles for use in EX Kernel Manager.
    
    January 18th, 2016
    -Update RedHawk to v2.1 for Nexus 5X
    -Introduce Sidious v1.2 tweaks to Nexus 5X and Nexus 6P. 
    
    January 12th, 2016
    -Corrected the RedHawk v2.0 sync_freq value for Nexus 5X and Nexus 6P
    -Corrected frequency value discrepancies for ALL Nexus 6P scripts
    
    January 11th, 2016 - Second Update
    -Released RedHawk v2.0 for the Nexus 5X and Nexus 6P
    
    January 11th, 2016
    -Released GhostPepper v1.1 for the Nexus 6P
    -Released ButterFly for the Nexus 6P
    -Updated GhostPepper v1.1 with the correct Minimum Frequencies for Nexus 5X 
    
    January 9th, 2016
    -Released GhostPepper v1.1
    -Released ButterFly
    -Updated RedHawk with correct Sync_Freq value for both devices
    
    January 7th, 2016
    -Released SilverFish v2.1 and MadDog for the Nexus 6P
    
    January 6th, 2016
    -Disabled Aggressive Thermal Hotplugging for better sustained performance under heavy loads
    -Disabled TouchBoost by default
    -Cleaned up and documented the scripts for both devices
    -Discontinued support for SilverFish on the Nexus 5X
    
    January 5th, 2016
    - Tweaked GhostPepper and Stable scripts for Nexus 6P
    
    January 4th, 2016
    - Added Nexus 6P Section
    - Official Stable Script updated to Version 2.0
    - Initial Post.

    Brief Settings Descriptions - Please see Post #2 for more detailed and technical explanations

    • Retired Profiles

      • SilverFish - Designed with smoothness in mind at the slight cost of battery life when compared to MadDog or Stable settings. Intended for light usage, performs underwhelmingly when multitasking
      • MadDog - Using a different approach, it shares workload between the two clusters evenly. Drops CPU frequencies as quickly as possible in all circumstances. Performs quite well albeit inconsistently at times.
      • GhostPepper - A medley of Silverfish, MadDog and the Stable settings with a few additional but crucial tweaks aimed at giving extremely smooth performance in all situations, even while multitasking, without sacrificing the battery life as experienced with MadDog.
      • ButterFly - A culmination of all strategies mentioned above. Specifically tuned for extreme smoothness, light and moderate users will likely see the same battery life as other published settings. Heavy users can expect about 6-7 hours SOT. More aggressive than GhostPepper.
      • RedHawk - A mixture of GhostPepper and ButterFly, with a twist. GhostPepper settings applied to the IntelliActive governor on the LITTLE cluster for extra smoothness. ButterFly settings applied to the Big Cluster. Extremely robust operation with respectable snappiness. Battery Life seems to be on par with GhostPepper, which is very good.
      • BlueJay - A tweak that marries the Impulse governor on the LITTLE cluster and the Interactive governor on the Big cluster. CPU activity is more deliberate but steady instead of jumpy or hectic, using all of the frequencies at its disposal, not just the highest or lowest ones. This ensures the CPU is not overreacting, while still getting the job done in a timely manner. Decent fluidity (due to the lack of Input Boost), great battery life.
      • XAP 4 - Experimental Advanced Profile v4 - A new methodology utilizing the big cluster more while purposely capping the LITTLE cluster. The LITTLE cluster is inefficient at higher frequencies so the workload is instead passed off to the big cluster. A work in progress, employing new scripting techniques than cannot be used in a normal EXKM compatible profile. Butter smooth UI and multitasking with great battery life. This does, however, result in higher CPU temps and can lead to the CPU getting throttled / hotplugged faster.
    • Kestrel - An Interactive Governor based profile that combines the smooth and efficient behavior of BlueJay with Input Boost and a slightly aggressive Big cluster for a zippy UX and maintained speedy performance while gaming or browsing. Tested extensively.
    • HawkTail - An Interactive Governor profile focused on fluidity and UX. Butter smooth in all situations. Minimal heat during web browsing and heavy texting sessions and gamers are praising this profile as well. Great SOT and battery life. The complete package and new candidate for the 'Stable v3.0' Settings.
    • GlassFish - A battery-focused Interactive Governor Profile released by SoniCron and the first truly cross-device compatible profile. This profile was written from the ground up with a different philosophy in mind that can be applied to almost any phone with a big.LITTLE chipset. It has a built in psuedo-touchboost that helps the phone maintain idle frequencies much longer than other profiles. Also fixes crackling issues with V4A / ARISE Sound.
    • FairPark - A new approach to the Interactive governor that ignores the philosophy in the OP. Simple, effective and efficient. Great battery drain results, SOT, idle efficiency and a smooth UX. However, users that browse a lot or do a lot of CPU heavy tasks should use the FairParkHE (High Efficiency) Profile instead. Not recommended for gamers.
    • DrunkSauce - A collaborative effort between Myself and @NYCHitman1, this profile is a clean-sheet governor tweak that harnesses the enhanced efficiency of the tried and true Impulse governor with the new Ironactive governor (modified and updated Interactive Governor) Interactive. These tweaks were so successful, that they went on to become the default settings in the current release of Dirty Unicorns ROM for Nexus 5X (Bullhead). Expect supreme fluidity and responsiveness while achieving good SOT and excellent idle drain.
      • DrunkSauce Lite - The same as regular DrunkSauce just utilizing the Interactive governor for both the LITTLE and Big Cluster. This IS NOT a more battery-friendly version of DrunkSauce.
    • LoG - @RogerF81's Swansong in the SD808 world. A fresh take on the Interactive governor based on reported power consumption of the CPU at different frequencies. Well received and converted for N5X use by @LazerL0rd.

    Please contact ME with questions or feedback concerning the profiles above; not soniCron. Mention me in the post using the @ symbol or message me privately.
    106
    NEW! HawkTail Governor Settings

    bIheYlq.png

    Introducing the HawkTail Interactive Governor Settings!

    Lovingly crafted to provide your Google/LG Nexus 5X with superb battery life, incredible performance, and unmatched piece of mind! Better performance than ButterFly! Better battery life than GhostPepper! This is the new standard!

    Features:
    • Web Browser friendly
    • Phonecall friendly
    • Music friendly
    • YouTube friendly
    • Texter friendly
    • Camera friendly
    • GPS Navigation friendly
    • Bluetooth friendly
    • No delayed wakeups
    • Multitasking friendly!

    In all seriousness...

    We're looking at 8-10hr SOT ideal conditions; 7-8hr SOT real-world. (~5-6hr SOT for heavy users.) But all with unmatched performance! It works in a variety of conditions and under a variety of loads. This is slated for the new "Stable" in post 2, so if it tests well, it will be upgraded and considered the standard.

    Thank you, everyone, for making this thread and strategy as big as it is! Try out HawkTail today and let us know what you think!

    Download HawkTail 1.2 ElementalX Profile for Nexus 5X here!
    (v1.2 for Nexus 6P)
    Remove "txt" extension and move to "(internal storage)/ElementalX/gov_profiles/"​

    (Special thanks to @Alcolawl for his support and post design inspiration! However, these settings are original and not based off his superb work. Also it didn't register to me that the kestral was a hawk when I named this tweak until right now... sorry, mate! If you'd like me to rename, lemme know!)

    Updates:
    v1.2 to fix idle drain and improve smoothness
    v1.1 to fix excessive use of top frequencies in certain use cases. If you've had problems with high battery drain, try the update.
    102
    NEW! GlassFish Governor Settings

    P8t8mpj.png

    Introducing the GlassFish Interactive Governor Settings!

    With a completely new philosophy, GlassFish was designed to be multi-device compatible! This works not only on the Nexus 5X, but also the Nexus 6P and many other devices! These are sane defaults for practically any modern CPU/SOC! (No guarantees, however! But give it a shot!)

    This thing idles super cool. (A few times I pulled my phone out of my pocket and was afraid it had been turned off!) You're looking at 0.5-1.5%/hr idle! It handles a variety of usage scenarios gracefully and with superb speed! Watch a lot of YouTube or Netflix? Bet you can't find a governor profile that uses less battery life! Up to 10-12 hours! Listen to a lot of music on the go? Up to 14 hours! Like to text a lot? How about 8-10 hours! Browse the web? 7-9 hours!

    This profile is friendly to gamers, photographers, video chatters, phonecallers, everyone! (This was also tested with ARISE/V4A and works great, with no artifacts or hiccups!)

    Try out GlassFish today and let us know what you think!


    Installation Instructions
    • Remove "txt" extension and move to "(internal storage)/ElementalX/gov_profiles/"
    • In EXKernel Manager, select CPU> Governor options> LOAD> GlassFish and switch the "Apply on boot" to on (blue)
    • CPU> CPU Boost options> Input boost frequency and milliseconds to apply on boot (power button = blue)
    • CPU> Touchboost to apply on boot (power button = blue)

    Requirements
    This works on most devices and all custom kernels that allow you to turn off Touchboost. Still using stock kernel? You won't get quite the battery savings, but you can still use this profile! Compatible with most devices and versions of Android 5+, including Nougat!

    Not Using EXKernel Manager?
    Thanks to @Alcolawl, you can now apply GlassFish without EXKernel Manager! Click here to download the scripts!

    Updates:
    v1.2 - Smoothed scrolling even more; adapted for better performance with ARISE/V4A