[Xiaomi Mi 4C] GoldGanja:
Remember to have the screen turned ON while you apply the script!!!

Hi guys!

Today i want to share with you a script i specifically tailored for our 4C, to decrease high battery drain just by tuning parameters of the interactive governor.

As many of you know, on the Nexus 5X forum there is a huge post about different profiles created to achieve the same purpose, and almost all of them works with our device (personally tested)

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

I raccomed to read it!

One of them in particular was extremely good battery wise but i felt some lagginess here and there (talkin about HawkTail 1.2)

So i decided to make a script myself and share it with you, the idea behind it is to force the CPU to scale better with loads and making the Big cores in use more frequently by tuning some of the kernel parameters.

Plus we will have the GPU idling @ 180MhZ instead of 300MhZ (like in the Nexus 5x) and a switch to noop scheduler.

Performance wise and taking in example the latest stable ROM from Xiaomi.eu (8.0.5) we will have a decrease of about 5k point in Antutu (I'll attach two screenshots, the 71K was the result without tweaking, plus just by switching back to CFQ scheduler you'll get 2K points back but NOOP is more battery friendly)

So here you go, this is my script TAO.

Using it is pretty simple and you have a couple of options: [ROOT IS NEEDED]

Since it's a script, if your rom have INIT.D folder support, you can just move the file under /etc/Init.d and reboot the device. The script will make a log file under /sdcard/TAO.log that you can check if anything went wrong.

The second option, if your rom doesn't have Init.d folder support, just use Kernel Auditor and a text editor.

Open the downloaded file in a text editor, select all and copy the text.

Then open Kernel Auditor, and in the menu look for init.d, enable the "Emulate Init.d" and then click the "+" symbol. It will ask to add a name (let's set it to TAO for coherence), then OK. It will open a new window where we have to paste all the text previously copied, save it by pressing the icon on the top right. Now we can just reboot the device or click the newly created item and select execute.

Third option is to run it manually from terminal.

Plus, i'll add my Thermal-engine-8992.conf that you guys can use to change the thermal throttling values. Download it and replace it in /system/etc/ , set it with permission 644 and reboot.

This modded thermal will move up the limits, long story short, your device will continue to perform even if it gets hot.

Enjoy! & report back for feedback

Remember to have the screen turned ON while you apply the script!!!

P.S.

Files are zipped, extract them!!! :D

UPDATE

Minor update - use_sched_load set to 0 for both cores

Correction made for the log file

UPDATE 0.7

Since [MENTION=6537267]solis_f[/MENTION] is having some problem with the big cores, and this could be a common problem to many others too i've decided to add something in the script that will force the big core online so you should not have any more problem executing the script. Let me know

UPDATE 0.8 - Experimental

Updated Target_loads for both Little and Big cores.

Little core min freq. to 384 MhZ.

Input boost @ 787 MhZ instead of 600 MhZ.

hispeed_load disabled for both cores.

Updated values for UpMigrate.

Enabled core_ctl for big cluster:

With this update, you'll have your big cores Offline most of the time, but they will comes online when needed.

Yours perfd (/data/system/perfd/default_values) with this version have to look like this:

ihf;787200
iahd;38000
ighl;200
itl;39 460800:5 600000:62 672000:10 787200:81 864000:90 960000:99
gpu_default_pwrlvl;5
sst;33
smil;20
sminr;3
sitl;65
sum;66
sdm;54
cbmf;1525
cbhdr;90
cbhip;16
ihf0;787200
iahd0;38000
itl0;39 460800:5 600000:62 672000:10 787200:81 864000:90 960000:99
imst0;0
ighl0;200
imf0;0
itr0;30000
its0;-1
iiib0;1
intb0;0
ibd0;0
ihf4;1248000
iahd4;38000
itl4;53 768000:64 864000:72 960000:79 1248000:99
imst4;0
ighl4;200
imf4;20000
itr4;30000
its4;-1
iiib4;1
intb4;0
ibd4;0

P.P.S.

Over two hundred downloads, but not even half of you gives me feedback... :rolleyes:

UPDATE 0.9

Sorry for the delay, many things to do IRL.

This version is what i'm using now, should be smoother then v0.8, hope you like it.