[G4 Android Development] fates13:
So I've been watching movies on my VR headset (Bobovr Z4, highly recommended if you want to try out VR) and have noticed that the G4 overheats like crazy. The ambient temperatures where I live fluctuate between 50 deg F and 90 deg F depending on the time of day and the month. Even at cooler night temperatures, my G4 would heat up to the point of shutting itself off after around 20-25 minutes of watching a movie with no orientation sensors being used (static side by side video) and brightness at around 65%. This got incredibly annoying so I wanted to see what I could do about it.

I've tested out [MENTION=4888382]Robshr[/MENTION]'s CTT mods and all 4 versions had issues that I didn't know how to fix, from the phone not charging at max Quick Charge speeds to overheating quickly. I've been running a modified version of the default CTT from the 13B rom from Verizon and it was fine for normal & gaming use but VR caused massive overheating so I modified it even further.

What I've found from testing is that the thermal mod values will take over any type of other settings you try to set with apps like Kernel Auditor or EX Kernel Manager (If you're using SetCpu, I'd highly recommend you switch to something else because it is outdated and doesn't know how to manage the big little core setup on the G4 and most newer phones) once your phone hits the temperatures set in the thermal-engine-8992.conf file. This means that you basically can't limit the max clock speeds of your phone once it reaches the temperatures set in the conf file. For example, the lines from the default conf file state for the little cores:

"thresholds 50000 53000 60000

thresholds_clr 48000 51000 58000

actions cluster0 cluster0 cluster0

action_info CLUSTER0_MAX 1248000 960000"

When my phone reached 60 degrees C, I couldn't limit the clock speed of the little cores using EX Kernel Manager below 960 MHz. I could set it below 960 MHz in the manager but it would show that the clock speeds still reached 960 MHz. What I did was decrease the max speeds the cores could hit at certain temperatures and raised the temperature limits by a little bit. What this does is throttle harder at higher temperatures instead of lower at lower temperatures and allows the phone to stay at lower clock speeds if set by a kernel managing app. I've found that 600 MHz is more than enough to stream 3D movies from my PC to my phone without issues using ES File Explorer. EX Kernel Manager allows me to limit the clock speeds to 600 MHz by switching to the power saving mode. Turning it off allows my phone to hit normal clock speeds again, which can be set using EX Kernel Manager at their max values allowed by the chip (higher than what LG limits them to I believe). From my tests so far, using the 600 MHz limit for VR 3D movies allows my phone to operate for around 40-50 minutes before displaying a overheating message which is a significant improvement from before. I don't use Marshmallow because it doesn't have root on Verizon so I can't help you if you have a Marshmallow rom.

Installation:

Extract the rar and move the thermal-engine-8992.conf to the /etc/ folder and replace the one that's in there (make a backup of that file first). Set permissions to RW R R and reboot. Highly recommend using EX Kernel Manager in conjunction and limiting the clock speed for movies. For games, you probably need higher clock speeds.