[Xiaomi Mi 5 Guides, News, & Discussion] ~N.A.W.Y~:
Why?

Well, i've found the stock values pretty limiting. Phone was slowing down pretty fast while under load. So i decided to make this mod.

How?(FOR ANDROID M-N)

(MAKE SURE TO HAVE A BACKUP OF THESE FILES)

Simply just go over to system/etc and delete these 2 files (If you cannot delete these files in any root file manager, do it in TWRP file manager.)

"thermal-engine-8996.conf"

"thermal-engine-8996-a1.conf"

You can't set values for Android 6-7 ROMs. However, you can disable SW thermal throttling completely instead.

How?(FOR ANDROID O)

(MAKE SURE TO HAVE A BACKUP OF THESE FILES)

Go to system/vendor/etc , find "thermal-engine-8996.conf" or "thermal-engine-8996-lite.conf" if you have 32 gb variant of Mi5.

These are the values that can be changed by the user,

For CPU,

[SS-CLUSTER1-SP0]

CLUSTER1 stands for BIG core, and CLUSTER0 stands for SMALL cores

The number at the end of SP stands for thermal throttling level. 0 Is the first one kicks in, 2 is the last one.

sampling= Default is 250, which means phone will reflesh temprature values every 250 miliseconds. You dont have to change this one.

sensor= xo_therm_buf sensor stands for Mainboard - SoC temp reading.

set_point= This is the one we need for changing thermal values. default 1st level thermal throttle value is 43000, which stands for 43c.

device_perf_floor= Specifies the frequency of the cpu in it's current thermal throttle level. 1478400 means phone will limit 1478 mhz during the first thermal throttle level, until temp goes down under the specified temprature.

[SKIN-SS-CPUS-ALL-1]

The set_point value in this section defines at which temp limit phone gonna turn off one of the cores, to decrease temp in extreme conditions. Mine is set to 57000, stands for 57c for mainboard temp.

For GPU,

[SS-GPU]

The set_point value in this section will set the thermal limit for the GPU. Mine is set to 55000.

These are the all of the values that can be changed by the user, DO NOT touch the other values except these ones.

MAGISK

If you don't want to mess around with all these settings, I've made a magisk module with my personal settings. You can extract thermal-engine-8996(-lite).conf file and set values you want and add it back into zip file.

https://drive.google.com/file/d/1J8QhSSGUHAqvjjOIAWQ0U2etIOHQDaZe/view?usp=drivesdk

NEW:

My new extreme settings, throttling will start from 60c SoC temp.

https://drive.google.com/file/d/1H58mlV05yEd-NP7dnQG6tr5QyKcL4vGD/view?usp=drivesdk

NOTES:

1) I am not responsible for any damages may occur.

YOU ARE

the one choosing to make this modification. Be careful.

2) Works on every ROM.

2) Since the CPU and GPU will still have the HW temp limit, the only thing you should keep your eye at is your battery temprature. As long as you dont pass 50c battery temp, everything should be okay. Avoid to charge the phone when battery temp is more than 50c otherwise battery may start losing it's lifespan.

3) This trick does

not

trigger safetynet. I've tested it and safetynet still passes with this modification.

4) This trick might work with other Snapdragon devices as well. You can try it, but make sure to have a backup.[/SIZE]