FORUMS
Remove All Ads from XDA

[Guide, Aroma, Magisk] Thermal throttle tweaking

447 posts
Thanks Meter: 336
 
By Razorless, Senior Member on 9th June 2016, 09:43 PM
Post Reply Email Thread
Update: The Aroma installer should work again. You can also only use the v1.6 (it installs the recommended extreme profile and doesn't need the aroma installer). Thanks @Seyaru and @yochananmarqos
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:
Quote:

Instructions:
magisk:

Installing/Updating Magisk to a new version:

  1. Download Magisk via the Manager, but do not flash it
  2. Reboot to recovery, flash the stock boot.img to clear the ramdisk
  3. Flash Magisk before the custom kernel so it creates a backup of the stock boot.img just in case
  4. Flash the custom kernel (ElementalX in my case) and reboot

Installing the module:
  1. You have to have Magisk installed (for more information see Magisk thread).
  2. Flash magisk-thermal_tweaking_v1.6.zip (installs the recommended extreme profile by defaullt)
  3. If you want another profile, flash "thermal_tweaking_systemless_v1.2.3.zip" and selecet "Magisk" as installation type
  4. 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

Hello and welcome!
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: don't know about phasma yet. It seems to work with phasma
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. This behavior was only tested on elemental kernel. Only If you are on stock kernel you will need to edit those lines.
Note2: using "msm_thermal" in a kernel manger overrides this setting with "infinte" so the core never shuts down (don't do this). Msm_thermal seems to have no effect on the Nexus 5X.
Code:
[CPU4_HOTPLUG_MONITOR] and [CPU5_HOTPLUG_MONITOR]
thresholds     41000
thresholds_clr 39000
The bold blue digits represent the temperatures in °C. Threshold means the temp to shut down, threshold_clr the temp to go online again. The higher these digits, the longer the big core will be usable by the phone (but only as long as the throttle temp is not more than 2°C lower). The difference between the two temps should be at least 2°C.

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
Code:
[PID-BIG_CLUSTER_management]
set_point          39000
set_point_clr      37000
At the set_point a PID algorithm will be used to throttle the CPU step by step. The set_point_clr determines how soon the the clock speed will increase again. Keep at least 2°C between those two. Increasing these temps will allow the big cluster to be utilized longer at higher clock speeds.

Throttle temp of little cluster:
Code:
[PID-LITTLE_CLUSTER_management]
set_point          44000
set_point_clr      41000
Determines when the little cluster will be throttled. Keep 3°C between the temps.

Throttling of the GPU:
Code:
[SS-GPU_management]
set_point          44000
set_point_clr      41000
Same as above. 3°C difference.

LCD brightness reduction:
Code:
[LCD_management]
thresholds       36000         39000      ...
thresholds_clr   34000         37000      ...
Now this works slightly differntly. The threshold and threshold_clr works the same. But this time we have every step as it's own line. If you want to increase the temp at which the screen starts to reduce it's brightness by 2°C, you would need to raise every threshold and threshold_clr in this category be 2°C. As usual keep 2°C between the temps.

update:
battery charging current reduction.:
Code:
[battery_monitor]
thresholds       40000
thresholds_clr   38000
If you want to increase the temperaure at which the phone reduces its charging rate, you can raise the blue values. I would not recommend anything higher than 4°C.

Recommended Settings:
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.

Old:
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.

Normal user:
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
Gaming:
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 noticibly slightly warmer. With this, the GPU has alot more breathing room and will run at higher speeds for a longer time. This may be increased even more, because the G4 has even higher values (Moto X doesn't throttle GPU at all)
  • 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
heavy duty: update v5
Think you can handle the heat? No Less of a compromise in daily use and increased gaming performance with a brighter screen. This will turn your phone into a hot beast a slightly warmer phone.
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
extreme
update v4: Been using this for many days months now. Even under heavy load the phone is not uncomfortably hot. Didn't have any problems so far.
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
Update: The Profiles above extreme are outdated and do not work properly.

Thanks:
@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.
The Following 81 Users Say Thank You to Razorless For This Useful Post: [ View ] Gift Razorless Ad-Free
 
 
9th June 2016, 11:34 PM |#2  
Alcolawl's Avatar
Senior Member
Flag New York
Thanks Meter: 2,236
 
More
This is some good **** right here. Between this and the governor profiles, this is the best community effort I've ever seen to improve a device. And the difference is extraordinary. I cannot wait to see how some of these changes play along with the Interactive Governor Profiles. Love all of the work you've put into researching the throttling behaviors on this device. Keep it up bro!
The Following 11 Users Say Thank You to Alcolawl For This Useful Post: [ View ] Gift Alcolawl Ad-Free
10th June 2016, 12:31 AM |#3  
Junior Member
Thanks Meter: 0
 
More
There is a flashable zip for 5x ?

Inviato dal mio SM-T715 utilizzando Tapatalk
10th June 2016, 12:32 AM |#4  
siealex's Avatar
Senior Member
Flag Kharkov
Thanks Meter: 502
 
More
Quote:

little cluster throttle 47/44 ; GPU throttle 47/44

47??? It will throttle always! I can understand 70..75* (and at least 50* for the big cluster), but not 47.
10th June 2016, 02:27 AM |#5  
Alcolawl's Avatar
Senior Member
Flag New York
Thanks Meter: 2,236
 
More
Quote:
Originally Posted by siealex

47??? It will throttle always! I can understand 70..75* (and at least 50* for the big cluster), but not 47.

What? Could you imagine how hot the outside of the phone would become? These aren't air/liquid cooled desktop CPUs these are tiny passively cooled ARM CPUs crammed into a hunk of plastic and other chips and radios that get just as hot, sandwiched between a battery that can reach 40+ Celsius and an LCD screen. Trust me, you don't want your CPU or any other part of your phone approaching those temps.
The Following 2 Users Say Thank You to Alcolawl For This Useful Post: [ View ] Gift Alcolawl Ad-Free
10th June 2016, 03:25 AM |#6  
chiahead52's Avatar
Senior Member
Thanks Meter: 57
 
More
is it possible to look into this same info for the 6P? It has that same file but the info inside the file is not the same as the 5X. Thank you
10th June 2016, 10:57 AM |#7  
Razorless's Avatar
OP Senior Member
Thanks Meter: 336
 
More
Quote:
Originally Posted by siealex

47??? It will throttle always! I can understand 70..75* (and at least 50* for the big cluster), but not 47.

The LG G4 throttles the GPU at 48°C, the big cluster at 45°C and the little cluster at 53°C. As a result, the outside temps are 7°C higher (44) than the Nexus 5X's (37). I would consider this uncomfortably hot. Also, the G4 might (or not) have better thermal conduction from the inside to the outside, because of different materials, but we don't know that.

You are welcome to try higher values and report your results. The G4 has an emergency shut down if temps get too high, the 5X probably has it, too.
Quote:
Originally Posted by chiahead52

is it possible to look into this same info for the 6P? It has that same file but the info inside the file is not the same as the 5X. Thank you

Sure, but I don't have a 6P so I would need someone to send me the thermal engine.conf someone already did this for the Nexus 6P
Quote:
Originally Posted by tony.quartararo

There is a flashable zip for 5x ?

Inviato dal mio SM-T715 utilizzando Tapatalk

I don't think a flashable .zip is neccessary, because you only need to change a few lines. It's faster and easier than booting to recovery and installing the .zip. Also, you have much more flexibility by editing it yourself.

I will upload some predefined files later, so you just need to replace them and set permissions.

OP update 1
10th June 2016, 02:26 PM |#8  
Senior Member
Flag Toronto
Thanks Meter: 643
 
More
5x has one of the colder skin temperatures (37.4 degrees C max) compared to other high end Android devices. So there should be lot of breathing room for increasing thermals if you don't mind the added heat in your hand.

For instance the Nexus 5 skin temperature went up to 45 degrees C and then performance crashed hard due to heavily throttling the CPU and GPU.
10th June 2016, 02:45 PM |#9  
Razorless's Avatar
OP Senior Member
Thanks Meter: 336
 
More
Quote:
Originally Posted by bblzd

5x has one of the colder skin temperatures (37.4 degrees C max) compared to other high end Android devices. So there should be lot of breathing room for increasing thermals if you don't mind the added heat in your hand...

I generally agree, but it's hard to compare two phones, even if the use the same SoC (G4/5X). Different materials and component placement inside and outside of the phone can affect the results heavily.

Still, I believe raising the Nexus 5X's thermals by a few degrees won't hurt anything, but makes a great difference in sustained performance.
10th June 2016, 02:58 PM |#10  
Senior Member
Thanks Meter: 198
 
More
How does the 'thermal throttling' setting in EXKM relate to all this?
10th June 2016, 03:04 PM |#11  
Razorless's Avatar
OP Senior Member
Thanks Meter: 336
 
More
Quote:
Originally Posted by Smultie

How does the 'thermal throttling' setting in EXKM relate to all this?

I updated the main post:
The thermal throttling in kernel managers only changes the hotplug temp of the big cluster. On franco and elemental kernel anyway (don't know about phasma or stock). On elemental/franco, core control has to be enabled, otherwise your big cores will be either online or offline forever.
Post Reply Subscribe to Thread

Tags
magisk, nexus 5x, systemless, thermal, throttling

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes