Make sure to backup your orignal thermal-engine. I attached it just in case.
Update: It seems as there is a hardcoded limit for the thermal throttling of the big cluster (may be kernel related). That means that the profiles above extreme decrease the performance instead of increasing it (they only prevent the big cluster from going offline, even though it is not utilized any more)
Update: Zip now supports magisk! thanks @tohtorin and @yochananmarqos for the new updated zip
Update: now with a flashable zip that supports both system and systemless root! thanks @tohtorin for that zip
Instructions for the zip install:
Installing/Updating Magisk to a new version:
- Download Magisk via the Manager, but do not flash it
- Reboot to recovery, flash the stock boot.img to clear the ramdisk
- Flash Magisk before the custom kernel so it creates a backup of the stock boot.img just in case
- Flash the custom kernel (ElementalX in my case) and reboot
Installing the module:
- You have to have Magisk installed (for more information see Magisk thread).
- Flash magisk-thermal_tweaking_v1.6.zip (installs the recommended extreme profile by defaullt)
- If you want another profile, flash "thermal_tweaking_systemless_v1.2.3.zip" and selecet "Magisk" as installation type
- Enjoy your flying hot potat.. phone
You can still use the installer without magisk. In that case, ignore step 1 and 2 and do NOT select magisk as installation type.
Also, if you are using elemental/franco kernel, don't forget to enable core control, disable msm_thermal and set "throttling temp" according to the profile
Do you like shiny graphics but your phone does not? Do you sometimes wonder why the Nexus 5X has a big cluster that's offline almost the entire time? Tired of lags and stutters? Well, search no more. The solution is right around the corner!
Attention: Setting these values too high can cause damage. I'm not responsible if this fries your phone or burns down your house.
Update: It seems like there is a hardcoded limit, see above.
If you don't want to tweak the settings yourself, you can scroll down to the recommended settings section.
Note: Right now this has only been tested on elemental and franco kernel with core control enabled (msm_thermal does nothing). I will update this as soon as I have some information from the kernel devs.
update: francokernel has the same settings regarding hotplug, so you need to enable core control and set the thermal limit with a kernel manager
update: have not tried this with stock kernel, but it should work
update: this will not work with jolla kernel since it has it's own thermal tweaks and does not use the thermal-engine
update: racer kernel now works and has the extreme_v4 profile implemented
Let's first try to understand the thermal throttling of the Snapdragon 808. Here is a comparison of thermal throttling on several 808 devices. The LG G4 throttles much later at much higher temps, and as a result gets alot warmer on the outside. Since the Nexus 5X uses the same SoC, it should be safe to increase the thermals. However, you have been warned!
Before you can get started, you need root access and a root explorer. The file we want to edit is named "thermal-engine-8992.conf" and can be found in "system/etc". Permissions have to be rw- r-- r--
We can easily influence the following behaviors (I'm only showing the relevant lines, not the entire file). A reboot is required after applying changes.
Hotplug temp, Temperature at which the big cluster will be taken offline:
This should be set at the same temp as the throttle temp of the big cluster. It must never exceed it by more than 2°C or you will loose performance!.
Note: On elemental/franco kernel, enabling "core control" in a kernel manager, and setting a "thermal throttling" limit, overrides this setting. Disabling core control disables hotplugging altogether, so the cores will never shut off (don't do this)!. So, if you are using elemental/franco kernel, set core control to enabled and set your desired hotplug temp in the kernel manger. The values below have no effect on elemental/franco kernel.
[CPU4_HOTPLUG_MONITOR] and [CPU5_HOTPLUG_MONITOR] thresholds 41000 thresholds_clr 39000
Throttle temp of big cluster, Temp at which the big cluster starts to throttle it's clock:
This should not be higher than the hotplug temp of the big cluster
[PID-BIG_CLUSTER_management] set_point 39000 set_point_clr 37000
Throttle temp of little cluster:
[PID-LITTLE_CLUSTER_management] set_point 44000 set_point_clr 41000
Throttling of the GPU:
[SS-GPU_management] set_point 44000 set_point_clr 41000
LCD brightness reduction:
[LCD_management] thresholds 36000 39000 ... thresholds_clr 34000 37000 ...
battery charging current reduction.:
[battery_monitor] thresholds 40000 thresholds_clr 38000
How to use:
update: back online, please uninstall the old version and install the new one (only for systemless)!: @tohtorin and @yochananmarqos have created a nice zip with Aroma installer. It can install the engine with a classical system install (overwrites the file in system/etc) or a systemless method, that does not touch your system partition. You only need the v1.6 to install the extreme profile. That means you can still apply OTAs and won't even lose the thermal tweak (as long as you have systemless root working).
You can grab the file and the uninstaller (can also be uninstalled via magisk manager) in the attachements below. Just flash it, no need to wipe anything. If you are using elemental/franco kernel, you still need to enable core control, disable msm_thermal and set the value for thermal-throttling to the appropriate setting (see profiles below) in EXkernel manager.
Note: If you have installed the script via system-method (or manually replaced/edited your thermal-engine) the systemless install will not work. In order to use the systemless version, you will need to have the stock thermal-engine in your system/etc.
Either edit the file yourself or download the attachement. Rename it to "thermal-engine-8992.conf", copy/overwrite it to "system/ect" and set permissions to "rw- r-- r--". Enable core control and set the thermal limit accordingly (elemental/franco). Reboot after editing/replacing.
Using these thermal-engine tweaks does not necessarily decrease battery life. It only negatively impacts battery life if you are using the phone for so long or so heavily, that it would throttle or shut off the big cluster (or GPU/screen brightness) with stock settings.
Not playing graphically demanding games or doing CPU heavy workloads? Try this setting. With this, the big cluster will be online almost the entire time while "normally" using the phone. Also, this will not increase the maximum phone temperature so it should be almost risk-free.
- only on stock kernel: hotplug big cluster 46/44
- elemental/franco: core control enabled ; "thermal throttling" in kernel manger to 46
- any: throttle big cluster 46/44
Like those shiny graphics? Most games need lots of GPU power but are actually not that demanding on the CPU side. So the little cluster should provide enough horsepower. For this we need to raise the phone's maximum temperature limit, so it will get
- only on stock kernel: hotplug big cluster 43/41
- elemental/franco: core control enabled ; thermal throttling" in kernel manger to 43
- any: throttle big cluster 43/41. So you have a better experience during "normal" use
- any: little cluster throttle 47/44 ; GPU throttle 47/44
Think you can handle the heat?
update v2: increased the hotplugging temp of the bigs for longer usage.
update: heavy_v2 fixed now (it was the same as v1, sorry for that)
update v3: Increased throttle temp for the littles. They throttled too soon after longer usage.
update v4: I decided to increase the temperature at which the charging current gets reduced since it is pretty low. Increasing it by 4°C should be safe. This will still not rapidly charge your phone during navigation or gaming, though. However, with light usage such as browsing this will increase the charging rate.
update v5: fixed a wrong value for big cluster throttle clear temp (was 46, should be 47)
- stock kernel: big hotplug 46/44 v2 49/47
- elemental/franco: core control, limit 46 v2 49
- any: LCD 38/36, 41/39, 44/42, 47/45
- any: little throttle 47/44 v3 49/47
- any: big throttle 46/44 v2 49/47
- any. GPU throttle 47/44
- any: battery monitor 40/38, 43/42
update v4: Been using this for many
Not for the faint of heart! This pushes the phone even further than heavy. These settings are still below those of the LG G4, but are significantly higher than stock. Only for those who like it hot.
update v2: Increased the throttle temp of the big cluster. Throttling under medium/heavy load can cause lag. So now it doesn't throttle much before it goes offline. This results in a more fluid experience and smoother transition between big->little cluster.
update v3: I decided to increase the temperature at which the charging current gets reduced since it is pretty low. Increasing it by 4°C should be safe. This will still not rapidly charge your phone during navigation or gaming, though. However, with light usage such as browsing this will increase the charging rate.
update v4: Increased the little cluster throttle temp. Before this the littles throttled too soon under heavy usage.
- stock kernel: big hotplug 51/49
- elemental/franco: core control, limit 51
- any: LCD 40/38, 43/41, 46/44, 49/47
- any: little throttle 49/46 v4 51/48
- any: big throttle 48/46 v2 51/49
- any. GPU throttle 49/46
- any: battery monitor 40/38, 43/42
@RogerF81, @GoldGanja for making me aware of the thermal-engine, @flar2, @franciscofranco, @tohtorin for that awesome Aroma installer that supports systemless root, @yochananmarqos, @Seyaru for the new updated magisk zip
Did I forget you? Just PM me and I'll add you
I have attached the default thermal-engine of the Nexus 5X below for anyone who needs it.