[Tweak] Interactive Governor Tunables for Redmi Note 4 Snapdragon variant

FaustTN

Senior Member
Jun 20, 2017
138
353
0
Hi guys, I'll make this short and sweet. A few years ago, I stumbled on this little guide for the Interactive governor, which made a lot of changes in CPU scaling and has spread to many devices.


To make a long story short, OEMs usually ramp up your CPU to more than what is needed to ensure smooth performance. This guide, changes that by ramping up your CPU to the minimum amount needed to get the same effect. The result? Lower frequencies used equals more power saved without impacting performance.

It's like a car race. If you take on a tight corner at high speed, you go in fast but you still need to slow down or risk crashing. But if you decelerate to just the right speed, you consume less energy while ensuring not much of your acceleration is sacrificed in the process.


This will be the best time to release this thread because we now have our voltage values from the kernel source, which provides the real change in these tweaks.

Calculations and stuff

We take the voltage values, and see what gives the highest jump when switching frequencies.
Code:
1401 MHz to 1689 MHz = 5v increase
1958 MHz to 2016 MHz = 75v increase
We don't care about the small increase, as they are negligible. The real drains are in the huge jumps in voltage.
So, we have the following frequencies with large differences when they jump:
652 MHz = 75v
1036 MHz = 70v
1843 MHz = 70v
1958 MHz = 75v

Then, we take into account the minimum frequency to ensure smooth tasks:
  • Idle = 652 MHz
  • Scrolling = 1036 MHz (Use Chrome browser to scroll Facebook in desktop mode)
  • Video = 1401 MHz (Play 1080p*60fps videos in Youtube app)
  • App load = 1843 MHz (Use any app really)
  • High load = 2016 MHz (Max out just in case)

I will be skipping explaining all the formulas and maths but you're welcome to check them out in the original thread and refer it to our frequencies + voltage

CPU Load:
652 MHz = 57
1036 MHz = 67
1401 MHz = 75
1689 MHz = 9
1843 MHz = 85
1958 MHz = 87



Soooo what now?
I'll be taking their Hawktail profile, as it seems to work the best. Any newer profile from that thread is built specifically for the Nexus 5x.

You should use a kernel manager app to implement these values, I recommend Kernel Adiutor Mod if you want free, or you can pay for EXKM made by one of the more senior developers in XDA.

Code:
go_hispeed_load: 95
above_hispeed_delay: 0
timer_rate: 60000
hispeed_freq: 652800
timer_slack: 480000
[B]target_loads: [/B] 80 652800:57 1036800:67 1401600:22 1689600:84 1804800:83 1958400:87
min_sample_time: 0
ignore_hispeed_on_notif: 0
boost: 0
boostpulse_duration: 0
align_windows: 1
use_migration_notif: 1
use_sched_load: 0
max_freq_hysteresis: 0
Hopefully it helps you as it seems to help me. Discussion is more than welcome here, as these are just rough calculations that isn't fine tuned yet for our CPU.

Additionally, open a terminal emulator app and type these:
Code:
su
stop perfd
This will prevent the Qualcomm binaries from taking over the CPU scaling and leave it up to the governor instead.
 
Last edited:

antimatter.web

Senior Member
Jan 27, 2014
179
32
48
Going back on topic: These settings seem pretty great! Currently off the charger for 47 hours with +5 hours SOT and 30% left! LOS 14.1 with autumnQueen92 kernel tweaks. All radios active too [emoji106] [emoji15] Screenshot_20170521-134324.png


Sent from my Redmi Note 4 using Tapatalk
 
N

notauseranymore

Guest
Going back on topic: These settings seem pretty great! Currently off the charger for 47 hours with +5 hours SOT and 30% left! LOS 14.1 with autumnQueen92 kernel tweaks. All radios active too [emoji106] [emoji15]
Sent from my Redmi Note 4 using Tapatalk
Sounds good. What was your previous SOT like?
 

antimatter.web

Senior Member
Jan 27, 2014
179
32
48
Well, before that I had the Helio X20 variant and it would rarely last 24 hours with ~6 hours SOT.
With the Snapdragon variant on miui 8.2.5.0 global I got about 8 hours SOT over 36 hours. I then switched to LOS. 14.1 after a single cycle. This certainly seems to be an improvement in both standby and in-use consumption.

Sent from my Redmi Note 4 using Tapatalk
 

alexeei

Senior Member
Jul 2, 2008
282
215
63
May be error in this line 80 652800:57 1036800:67 1401600:75 1689600:8 1843200:85 1958400:87, as i think it must be 1689600:80, or i'm wrong?
 
N

notauseranymore

Guest
May be error in this line 80 652800:57 1036800:67 1401600:75 1689600:8 1843200:85 1958400:87, as i think it must be 1689600:80, or i'm wrong?

Nope, it's correct. It'll be more efficient to skip that frequency instead since the voltage jump isn't high.
 

antarix

Senior Member
May 16, 2012
1,552
513
0
Surat
go_hispeed_load: 95
above_hispeed_delay: 0
timer_rate: 60000
hispeed_freq: 652800
timer_slack: 480000
target_loads: 80 652800:57 1036800:67 1401600:75 1689600:9 1843200:85 1958400:87
min_sample_time: 0
ignore_hispeed_on_notif: 0
boost: 0
boostpulse_duration: 0
align_windows: 1
use_migration_notif: 1
use_sched_load: 0
max_freq_hysteresis: 0
@AutumQueen92 after applying these values kernel adiutor shows Max CPU frequency 1689Mhz

Sent from my Redmi Note 4 using Tapatalk
 
N

notauseranymore

Guest
go_hispeed_load: 95
above_hispeed_delay: 0
timer_rate: 60000
hispeed_freq: 652800
timer_slack: 480000
target_loads: 80 652800:57 1036800:67 1401600:75 1689600:9 1843200:85 1958400:87
min_sample_time: 0
ignore_hispeed_on_notif: 0
boost: 0
boostpulse_duration: 0
align_windows: 1
use_migration_notif: 1
use_sched_load: 0
max_freq_hysteresis: 0
@AutumQueen92 after applying these values kernel adiutor shows Max CPU frequency 1689Mhz

Sent from my Redmi Note 4 using Tapatalk

Can you set the max to 2016 MHz? I've never heard of this problem before, so I'm not sure why it's behaving this way. Could be a problem with the app itself.
 

alexeei

Senior Member
Jul 2, 2008
282
215
63
go_hispeed_load: 95
above_hispeed_delay: 0
timer_rate: 60000
hispeed_freq: 652800
timer_slack: 480000
target_loads: 80 652800:57 1036800:67 1401600:75 1689600:9 1843200:85 1958400:87
min_sample_time: 0
ignore_hispeed_on_notif: 0
boost: 0
boostpulse_duration: 0
align_windows: 1
use_migration_notif: 1
use_sched_load: 0
max_freq_hysteresis: 0
@AutumQueen92 after applying these values kernel adiutor shows Max CPU frequency 1689Mhz
May be you make some error, apply in Kernel adiutor also, and max frequency same as it was-2016mhz
 

phyowaidd

Senior Member
May 23, 2017
57
27
0
Yangon
go_hispeed_load: 95
above_hispeed_delay: 0
timer_rate: 60000
hispeed_freq: 652800
timer_slack: 480000
target_loads: 80 652800:57 1036800:67 1401600:75 1689600:9 1843200:85 1958400:87
min_sample_time: 0
ignore_hispeed_on_notif: 0
boost: 0
boostpulse_duration: 0
align_windows: 1
use_migration_notif: 1
use_sched_load: 0
max_freq_hysteresis: 0
@AutumQueen92 after applying these values kernel adiutor shows Max CPU frequency 1689Mhz

Sent from my Redmi Note 4 using Tapatalk
Open kernal auditor > Thermal > disable VDD restriction .
You r good to go:D