[MOD] FIX CPU Throttling When Charging/Gaming (Increase Charging Speed Screen On)

Search This thread

Holyman007

Senior Member
Oct 13, 2008
93
77
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 :)
 
Last edited:

jayochs

Senior Member
Jul 22, 2010
9,624
3,147
36
Central NJ
www.dinosaurstakefrance.com
wow awesome. seems easy enough. I'm gonna try!

Sent from my LG-US996 using Tapatalk

---------- Post added at 05:07 PM ---------- Previous post was at 05:05 PM ----------

wonder if you could figure out a way to stop the screen on service from being dozed so hard that it lags to turn the screen on when it's sitting for like 30 seconds. so slow to turn on, can't stand it.

Sent from my LG-US996 using Tapatalk
 

wyclefcupcake

Member
Aug 3, 2017
7
3
i love you

dude i made an account for the first time ever just to come here to comment and tell you that you are awesome and i love you and i just applied the fix and i'm so happy!
 

Holyman007

Senior Member
Oct 13, 2008
93
77
wow awesome. seems easy enough. I'm gonna try!

Sent from my LG-US996 using Tapatalk

---------- Post added at 05:07 PM ---------- Previous post was at 05:05 PM ----------

wonder if you could figure out a way to stop the screen on service from being dozed so hard that it lags to turn the screen on when it's sitting for like 30 seconds. so slow to turn on, can't stand it.

Sent from my LG-US996 using Tapatalk

Haven't had that issue so not sure how to fix it. I'm using a custom rom (WETA) so I probably can't replicate it. Maybe try a different kernel?
 
Last edited:

Holyman007

Senior Member
Oct 13, 2008
93
77
is there a way to verify these changes are in effect? I'm planning to put this into Magisk as a module, but not sure how to verify...

If you use a cpu monitoring app (cpu-z or kernel aduiter), you will see the cores don't throttle when you have the phone plugged in after applying the mod. Ampere will also report a maximum charge rate of about 1000mah when screen on.
 

AlkaliV2

Senior Member
Jun 12, 2012
1,506
1,700
¯\_(ツ)_/¯
Google Pixel 5
I just want to make a point that if you are doing this mod it is highly advisable to switch to a QC 3.0 charger for your battery to maintain its lifetime. One of the reasons that this was put into place is because QC 2.0 pushes a LOT of voltage to the device to quick charge it when the screen is off and the phone is idle because there will be less overall heat generated in the device (which LG wants to avoid after the bootloop situation it can't seem to get out of). QC 3.0, which the v20 is capable of using, charges faster and cooler than its 2.0 counterpart and will be easier on your battery lifespan. A QC 3.0 charger is more efficient overall and should be going on sale soon because QC 4.0 is on the way/out now with the new Samsung devices.

And yes, you can swap this battery out if the first one won't hold a charge anymore, but the longer you keep the first one the later you have to pay for the second one (assuming you keep the phone that long). Also, you do not want the components to bake in case the v20 uses the same manufacturing technique as the 5x did.
 
  • Like
Reactions: Koont

Holyman007

Senior Member
Oct 13, 2008
93
77
I just want to make a point that if you are doing this mod it is highly advisable to switch to a QC 3.0 charger for your battery to maintain its lifetime. One of the reasons that this was put into place is because QC 2.0 pushes a LOT of voltage to the device to quick charge it when the screen is off and the phone is idle because there will be less overall heat generated in the device (which LG wants to avoid after the bootloop situation it can't seem to get out of). QC 3.0, which the v20 is capable of using, charges faster and cooler than its 2.0 counterpart and will be easier on your battery lifespan. A QC 3.0 charger is more efficient overall and should be going on sale soon because QC 4.0 is on the way/out now with the new Samsung devices.

And yes, you can swap this battery out if the first one won't hold a charge anymore, but the longer you keep the first one the later you have to pay for the second one (assuming you keep the phone that long). Also, you do not want the components to bake in case the v20 uses the same manufacturing technique as the 5x did.

Hmm interesting. Yeah the thought of restricting the voltage to prevent any heat build up at all came to mind. I still think they overdid it with the throttling to the point where it is unusable when charging.

The thermal file can be edited so it throttles a bit or halfway which I explained in the op if anyway is worried about the heat.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 46
    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 :)
    5
    made one with the gpu throttling completely disabled, and the cpu minimum cooling range stay at 1996 mhz. i am using it so far so good.
    4
    Someone earlier in the thread was planning to do this. I'm unsure of how to do it even though I am using magisk as well.

    that was me... if any wants to test it go ahead, otherwise I'll confirm it works or not tonight...
    4
    Let me know if anyone is having issues with this mod or wants to implement it in their rom :)

    So I'm having a hard time testing whether this is actually working or not. I use the mk2000 BTTF kernel and I'm suspicious that it has already done some modifications to the kernel for charging. I'm on a VS995 and I have some other differences based on what I'm reading from here.
    For instance, my stock thermal-engine-8996.conf has
    Code:
    action_info      1000
    in the
    Code:
    [PA_MONITOR]
    and
    Code:
     [LCD_ON_MONITOR]
    sections - which sounds different than what others have stated.

    Also, I'm not sure the best way to measure the current charge because Ampere doesn't work with the screen off and I am getting wildly different readings with the screen on. With my stock .conf I was getting anywhere from ~250 to ~1300, but seemed to be usually between ~600-800. This seems to be much higher stock than what others are reporting so I am trying to find out from the kernel dev if he made any modifications.

    In any event, I have gone ahead and created an AROMA based installer for these mods to make it easier for users to pick between the different profiles as well as go back to their backup/an original conf.

    I've used all your original config files, which based upon my examination appear to do the following:

    - charging-600mah-max-speed-1824mhz
    - charging-600mah-max-speed-2150mhz
    - charging-1000mah-max-speed-1824mhz
    - charging-1000mah-max-speed-2150mhz

    If I have got these wrong please let me know. This is what I have labeled profiles #3-#6 in my script. If you unzip the file you will see a profiles directory which shows these. I also added two new profiles:

    - charging-600mah-max-speed-1037mhz
    - charging-1000mah-max-speed-1037mhz

    These are #1 and #2 respectively. The idea here is that you may want to increase your charging speed, but not your CPU at all. Because of the issues I'm having getting accurate measurements I'm not sure this is working. I don't know why we wouldn't be able to increase the charging speeds while leaving the default CPU speeds. If you could check over the 2 .conf files that I included for these profiles to make sure I configured them right that would be appreciated.

    I think the flash file is pretty self explanatory. It has the 6 options as well as the option to restore from backup. The backup file will be the file that was overwritten the *first* time you ran this flash. So if you are doing it on a stock phone the backup file will always be your original. In case you weren't sure what your original was I include as a final option the ability to restore a stock .conf file. Again, this is the file from a VS995 and I'm not sure if everyone's is the same. If people want to send me stock files from other models I can compare and include them for restore.

    I'd also love to pick your brain about some of these settings and also clean up some of these profile files (I did remove some extra LF already). I just am having some issues because I can't tell what is working or not on my phone at the moment.
    3
    Don't forget

    Don't forget to rename the file from .txt to .conf after pasting. :) THANK YOU!!!!