[GUIDE] Advanced Interactive Governor Script - Battery Life

Did this script helped you with battery life?

  • Yes, it's better now

    Votes: 31 81.6%
  • Nah!

    Votes: 7 18.4%

  • Total voters
    38

GoldGanja

Senior Member
Jan 15, 2012
210
141
0
Napoli
Mi-globe rom 6.10.13 dev
You should not have any issue then...
most common problem is that the Big cores are OFFLINE while you run my script, usually it happens if the phone is a bit hot that's why you should use my thermal-engine.

Another problem could be the core_ctl,
go check for /sys/devices/system/cpu/cpu4/core_ctl/min_cpus

if it's 0, then you have to set it to 2 and then apply my script.
 

solis_f

Senior Member
Mar 26, 2015
1,000
578
0
You should not have any issue then...
most common problem is that the Big cores are OFFLINE while you run my script, usually it happens if the phone is a bit hot that's why you should use my thermal-engine.

Another problem could be the core_ctl,
go check for /sys/devices/system/cpu/cpu4/core_ctl/min_cpus

if it's 0, then you have to set it to 2 and then apply my script.
Well it's not zero. It's 2. I was using my own thermal tweak. I'll try yours and report back
@GoldGanja nope, still the same with your thermal config
 
Last edited:

GoldGanja

Senior Member
Jan 15, 2012
210
141
0
Napoli
running out of ideas,
if you cat /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor does it give you back "interactive" ?
btw try to post what's inside TAO.log
 

solis_f

Senior Member
Mar 26, 2015
1,000
578
0
running out of ideas,
if you cat /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor does it give you back "interactive" ?
btw try to post what's inside TAO.log
Yes it does
20-10-2016 15:40:36 -- 97TAO -- PerfD Stopped
20-10-2016 15:40:36 -- 97TAO -- Applying settings to LITTLE cluster
20-10-2016 15:40:36 -- 97TAO -- Applying settings to LITTLE cluster - DONE
20-10-2016 15:40:36 -- 97TAO -- Applying settings to BIG cluster
20-10-2016 15:40:36 -- 97TAO -- Applying settings to BIG cluster - DONE
20-10-2016 15:40:36 -- 97TAO -- Enabling Input Boost at 600 MHz for the LITTLE cluster
20-10-2016 15:40:36 -- 97TAO -- Enabling Input Boost at 600 MHz for the LITTLE cluster - DONE
20-10-2016 15:40:36 -- 97TAO -- Kernel modifications for better task management - DONE
20-10-2016 15:40:36 -- 97TAO -- GPU default power level to 5
20-10-2016 15:40:36 -- 97TAO -- switch to NOOP scheduler
20-10-2016 15:40:36 -- 97TAO -- PerfD Started and default value changed

Log seems to be executed well. Btw in your init.d file has an error it says smiui logfile instead of logfile
 
  • Like
Reactions: GoldGanja

GoldGanja

Senior Member
Jan 15, 2012
210
141
0
Napoli
Yes it does
20-10-2016 15:40:36 -- 97TAO -- PerfD Stopped
20-10-2016 15:40:36 -- 97TAO -- Applying settings to LITTLE cluster
20-10-2016 15:40:36 -- 97TAO -- Applying settings to LITTLE cluster - DONE
20-10-2016 15:40:36 -- 97TAO -- Applying settings to BIG cluster
20-10-2016 15:40:36 -- 97TAO -- Applying settings to BIG cluster - DONE
20-10-2016 15:40:36 -- 97TAO -- Enabling Input Boost at 600 MHz for the LITTLE cluster
20-10-2016 15:40:36 -- 97TAO -- Enabling Input Boost at 600 MHz for the LITTLE cluster - DONE
20-10-2016 15:40:36 -- 97TAO -- Kernel modifications for better task management - DONE
20-10-2016 15:40:36 -- 97TAO -- GPU default power level to 5
20-10-2016 15:40:36 -- 97TAO -- switch to NOOP scheduler
20-10-2016 15:40:36 -- 97TAO -- PerfD Started and default value changed

Log seems to be executed well. Btw in your init.d file has an error it says smiui logfile instead of logfile
Yhea log seems to be all fine,
Please paste a "cat" of /data/system/perfd/default_values and i will tell you if all the values are correct.

Oh and thanks for the input on the error, i'll correct and re-upload.
 

solis_f

Senior Member
Mar 26, 2015
1,000
578
0
Yhea log seems to be all fine,
Please paste a "cat" of /data/system/perfd/default_values and i will tell you if all the values are correct.

Oh and thanks for the input on the error, i'll correct and re-upload.
[email protected]:/ $ su
[email protected]:/ # cat data/system/perfd/default_values
ihf;960000
iahd;33000
ighl;300
itl;82 787000:85 960000:88 1248000:99 1440000:100
gpu_default_pwrlvl;5
sst;33
smil;20
sminr;3
sitl;65
sum;86
sdm;54
cbmf;1525
cbhdr;90
cbhip;16
ihf0;960000
iahd0;33000
itl0;82 787000:85 960000:88 1248000:99 1440000:100
imst0;0
ighl0;300
imf0;0
itr0;60000
its0;80000
iiib0;1
intb0;0
ibd0;0
[email protected]:/ #

Here you go
 

GoldGanja

Senior Member
Jan 15, 2012
210
141
0
Napoli
[email protected]:/ $ su
[email protected]:/ # cat data/system/perfd/default_values
ihf;960000
iahd;33000
ighl;300
itl;82 787000:85 960000:88 1248000:99 1440000:100
gpu_default_pwrlvl;5
sst;33
smil;20
sminr;3
sitl;65
sum;86
sdm;54
cbmf;1525
cbhdr;90
cbhip;16
ihf0;960000
iahd0;33000
itl0;82 787000:85 960000:88 1248000:99 1440000:100
imst0;0
ighl0;300
imf0;0
itr0;60000
its0;80000
iiib0;1
intb0;0
ibd0;0
[email protected]:/ #

Here you go
I've updated the script, and just run it on my device ...

Code:
cat /data/system/perfd/default_values
ihf;960000
iahd;33000
ighl;300
itl;82 787000:85 960000:88 1248000:99 1440000:100
gpu_default_pwrlvl;5
sst;33
smil;20
sminr;3
sitl;65
sum;86
sdm;54
cbmf;1525
cbhdr;90
cbhip;16
ihf0;960000
iahd0;33000
itl0;82 787000:85 960000:88 1248000:99 1440000:100
imst0;0
ighl0;300
imf0;0
itr0;60000
its0;80000
iiib0;1
intb0;0
ibd0;0
ihf4;960000
iahd4;33000
itl4;86 960000:98 1689600:99 1824000:100
imst4;0
ighl4;90
imf4;20000
itr4;30000
its4;80000
iiib4;1
intb4;0
ibd4;0
This is what you should get when cat perfd. You don't have itl4, or any other value for the big cores (the ones with "4" at the end). This means your 2 big cores are still offline when you used the script, that's the issue for you. Don't know why ...
 

solis_f

Senior Member
Mar 26, 2015
1,000
578
0
Nope still the same... @GoldGanja
Also the minimum frequency should be 600 for LITTLE based on what your script says but it is still 384

I even added a sleep 120 just in case but still acts the same after reboot. Through terminal everything is fine
 
Last edited:

GoldGanja

Senior Member
Jan 15, 2012
210
141
0
Napoli
Nope still the same... @GoldGanja
Also the minimum frequency should be 600 for LITTLE based on what your script says but it is still 384

I even added a sleep 120 just in case but still acts the same after reboot. Through terminal everything is fine
Sorry to hear that... did you added gov-tuner mod when you builded your mi-globe rom 6.10.13? Because i really don't know what else could be...
 

solis_f

Senior Member
Mar 26, 2015
1,000
578
0
Sorry to hear that... did you added gov-tuner mod when you builded your mi-globe rom 6.10.13? Because i really don't know what else could be...
no i didn't. I figured that it could be conflicting, because I usually have some init.d scripts around so I ticked it off.... I cannot understand why I'm having this problem while yours is ok... You said you are using stable. What supersu do you use? Maybe thats the cause...

Edit:
I managed to get it to trigger by letting the screen on by fast unlocking the screen on boot! It closed the screen for a split second so the script got half-applied. Why is closing the screen such a problem though?
 
Last edited:

GoldGanja

Senior Member
Jan 15, 2012
210
141
0
Napoli
no i didn't. I figured that it could be conflicting, because I usually have some init.d scripts around so I ticked it off.... I cannot understand why I'm having this problem while yours is ok... You said you are using stable. What supersu do you use? Maybe thats the cause...

Edit:
I managed to get it to trigger by letting the screen on by fast unlocking the screen on boot! It closed the screen for a split second so the script got half-applied. Why is closing the screen such a problem though?
When screen is off, the big cores are put at sleep ... that's why!
 

GoldGanja

Senior Member
Jan 15, 2012
210
141
0
Napoli
Should I use the updated version or the first one?
Always use the last one available. About my quote over there, that's the default behavior of the system not something i've implemented. But because of this, you have to run my script when the screen is turned on....
 
Last edited:

akrai

Senior Member
Apr 21, 2013
130
34
0
Script is not automatically executed with reboot, and i think it may be related with the reason that other scripts for mi4c makes use of a 120 second sleep before doing anything, because i edited the 5 seconds sleep the script already has for a 120s sleep and it does work in my slim rom
(other people also reported the same problem)
 
Last edited:

YiPing_Huang

Member
Aug 5, 2014
42
13
28
After applying your script I found my phone to be laggy upon input.
I opened Kernel Adiutor and found that the input boost frequency core 1 is set to 600MHz.
That is to say, there is no input boost at all!

However, the core frequency ramps up nicely when executing apps.
 

GoldGanja

Senior Member
Jan 15, 2012
210
141
0
Napoli
Script is not automatically executed with reboot, and i think it may be related with the reason that other scripts for mi4c makes use of a 120 second sleep before doing anything, because i edited the 5 seconds sleep the script already has for a 120s sleep and it does work in my slim rom
(other people also reported the same problem)
Never tested Slim Rom, but glad to hear that with the 120 second sleep you could solve the problem. I use the last stable Xiaomi.EU (8.0.5) with a mod to enable init.d scripts. No problem at all with the script executing all of the commands with the sleep 5. As already stated, keep in mind that the screen MUST be turned on while the script is executed, otherwise it will not apply all the settings due to the Big Cores offline during screen off.

Does this hinder the performance of the phone in any way?
As you can see from the first post, the score of a synthetic benchmark like AnTuTu is in loss of about 5k points. In daily usage i've yet to see some real difference...

After applying your script I found my phone to be laggy upon input.
I opened Kernel Adiutor and found that the input boost frequency core 1 is set to 600MHz.
That is to say, there is no input boost at all!

However, the core frequency ramps up nicely when executing apps.
With the script, Little Core min frequency is setted to 600MhZ, so yhea basically there is no input boost. One of the biggest battery hog of the default config was the input boost @ 1248MhZ, that means that each time you touch the screen the current frequency of the cpu ramp up. Imagine what happens when you are answering an instant message...
If you feel it to be laggy upon input, you could set the boost freq. to 960MhZ.
Happy to hear that the freq. ramps up nicely to you too!
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone