[LG V20 Themes, Apps, and Mods] Holyman007:
STANDARD DISCLAIMER: I am not responsible for any damage caused to your phone or loved ones.

MUST HAVE ROOT.

The PROBLEM:

This mod is for phones that throttle heavily and lag during charging / heavy use/ gaming. Seems like it affects people on stock-based roms rather than AOSP/lineage based roms since the thermal file is deleted/edited already. Switching kernels does not help the throttling at all. Using any kernel or cpu app (EX kernel, kernel aduitor), you should see that the cpu freqs throttle down to 652mhz on the small cluster and 1036mhz on the big cluster when charging or after heavy use. The throttling isn't caused by thermals since the CPU temps and battery temps are well within acceptable levels (below 50 degrees cpu and below 25 degrees battery).

Seems like the only reason LG does this is to prolong battery life rather than keeping performance at acceptable levels.

The second issue is the SLOW charging when your screen is on. Ampere reports a maximum charging rate of ~300mah when charging (qc3 or regular) before the mod. This mod will increase it to ~1000mah when screen on (I'm unsure how to increase it further). Screen off charging is unaffected and is still Quick Charge.

THE FIX:

Download my "thermal-engine-8996.conf" file here: https://drive.google.com/file/d/0B0W3xXHgfOxvLUpKNWhrWDE0TDg/view?usp=sharing

Use a root explorer.

Backup your old one in root/system/etc (or just rename it to thermal-engine-8996.conf.bak).

Put the new one in root/system/etc

Edit: apparently it downloads as a .txt file so change it back to .conf

Change permissions to rw-r--r--

Restart and enjoy lag free charging + increased charging speed!

This will make your device slightly hotter and possibly less battery life during heavy use but that's a given.

Thermal throttling is NOT affected (CPU speeds still throttle after 80 degrees with my testing)

Flashing rom updates WILL overwrite the file so you will need to replace it again.

Different versions:

Reduced charging speed (to 600mah) when screen on (To reduce heat): https://drive.google.com/file/d/0B7VVzSKFTGVkNHBnWXNYY2JJdEU/view?usp=sharing

Reduced max speed (to 1824mhz) but kept 1000mah charging when screen on (should reduce heat when doing intensive tasks): https://drive.google.com/open?id=0B7VVzSKFTGVkWjlnUF84SDc0N0k

Reduced charging speed (600mah) + max speed (1824mhz) to reduce heat even more and will still help reduce lag:https://drive.google.com/file/d/0B7VVzSKFTGVkV2ZoTU1sS2YtOUk/view?usp=sharing

What I did:

Under [KRYO_SS] in the conf file, I edited the "device_perf_floor" value to 2150000 instead of the stock 1036800. This will cause the phone to never throttle below 2150mhz big cluster and 1593mhz small cluster when charging/heavy use. If you are using an kernel that supports overclocking, this value can be set higher (to your max big cluster mhz). The small cluster mhz will automatically scale up since there's no value for it anyways. I think this entire section is just to save battery life as I see no other benefit from throttling when you're charging (when temps are low). Honestly, you can probably delete the whole section under [KRYO_SS] and it'll keep it at max mhz but I rather have some control over it.

For increased charging speed when screen on, I edited the values under [CHG_MONITOR]. I also deleted the entire [PA_MONITOR] and [LCD_ON_MONITOR] section. This increases the charging speed to ~1000mah from ~300mah but I can't seem to increase it further when screen on. Might be due to another setting I haven't found yet.

I also increased the GPU clocks to decrease throttling but I haven't found GPU throttling to be a problem at all before the mod so this probably won't affect performance.

The only other phone I have found that has the same thermal conf file is the LG G5 thread here: https://xdaforums.com/lg-g5/help/reduce-gpu-thermal-throttling-help-t3471510

Seems like they were doing it for the GPU throttling however.

Let me know if anyone is having issues with this mod or wants to implement it in their rom :)