• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Question [Bounty) TPD App Throttling Disablement

Search This thread

Burt Squirtz

Senior Member
Feb 11, 2018
597
266
I'll Personally donate $50 to anyone that comes up with a easy solution to disable the app throttling. I'm well aware that some Developers can exclude the TPD commit, but it seems like devs aren't too keen on doing that.

I also realize that OnePlus should have added a toggle within the OS for us to turn that on or off. Samsung does this they have a feature called 'enhanced processing', that lets the phone run at full potential.
 

Mohamedkam000

Senior Member
This thread has some info. By easy solution, you mean one without root? Not possible as far as I know. One Plus locks these apps to not use performance CPUs, just like it does with their camera on external apps.

You can change app's package name, change anything, even a character. The phone won't be listing the app, and it should just work as on any other SD888 phone.
 

Burt Squirtz

Senior Member
Feb 11, 2018
597
266
This magisk module disable TPD and OpPerf, I hacked oneplus services, it make the phone run at full speed when needed. working fine with stock kernel and rom . if you want restore it, you can disable or removing this magisk module.
Dude, can't tell you how happy you made me! You are the proverbial man. This is incredible.

Please PM me for the best way for me to get you that $50.
 
  • Like
Reactions: Shooter7889

Bunecarera

Senior Member
Mar 4, 2008
277
99
OnePlus 9 Pro
This magisk module disable TPD and OpPerf, I hacked oneplus services, it make the phone run at full speed when needed. working fine with stock kernel and rom . if you want restore it, you can disable or removing this magisk module.

Testing.

After installing, browserbench Speedometer goes to 71...
So that's already a big improvement.

Will have to see what it does with general feel of the device, stability and battery.
 
Last edited:
  • Like
Reactions: Mar-cel

ThePresence

Senior Member
May 24, 2011
1,057
232
30
Mumbai
OnePlus 9 Pro
This magisk module disable TPD and OpPerf, I hacked oneplus services, it make the phone run at full speed when needed. working fine with stock kernel and rom . if you want restore it, you can disable or removing this magisk module.

Wow this module worked like a charm.. all the lags are gone now and finally I'm feeling like I'm using a flagship phone. Thank you so much.
 

Walhalla

Senior Member
Jul 5, 2008
145
136
This magisk module disable TPD and OpPerf, I hacked oneplus services, it make the phone run at full speed when needed. working fine with stock kernel and rom . if you want restore it, you can disable or removing this magisk module.
thank you very much for this. Can you eloborate what you changed? As this system file will probably change with every system update it would be nice to know what needs to be changed so that we are not lost, when you abandon your 9 Pro :D
 

Mar-cel

Senior Member
Jun 18, 2013
1,452
329
This magisk module disable TPD and OpPerf, I hacked oneplus services, it make the phone run at full speed when needed. working fine with stock kernel and rom . if you want restore it, you can disable or removing this magisk module.
can you maintain this mod for new oos releases? with a new thread in themes and mods section
 

Rayekk

Senior Member
Oct 13, 2014
157
131
OnePlus 9 Pro
As the OP does not respond, I decided to investigate myself what changes were made in the oneplus-services.jar file.

I unpacked the original oneplus-services.jar framework from my phone, decompiled classes.dex which was inside and compared all changes made in @xls654 module.

The changes are in three files inside classes.dex (original files on left side, "hacked on right side):


sources/com/android/server/wifi/tsu.java
(wtn enables something called "OpWifiLowLatency", but I don't know what is WifiManager.WifiLock and why he disabled it, to be honest I don't understand just this one change, I don't know what WiFi has to do with TPD and overall app throttling)
Code_eidIYu8z5t.png



sources/com/android/server/wm/OnePlusPerfManager.java
(here he disabled OnePlusPerfManager)
Code_XNTzVwKOzp.png



sources/com/android/server/hmo.java
(I'm quite sure boolean H enables TPD, so OP disabled it by replacing whole function with "return false")
Code_VOKkhWRTF4.png




I hope someone will find this information useful. I wanted to see how OP turned off the throttling app out of curiosity, and since he doesn't write back in this thread, I thought that I would save everyone's time by showing what I found.

I hope the author of the module will not be angry that I showed it 🥶
 

Kenkool12

Senior Member
Jul 10, 2021
90
13
Running on blue spark kernel and ran the benchmark now I'm getting 112 the phone feels smooth now and apps run better.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    The magisk module removed, see post #26 @LuK1337 , the command "chmod 000 /sys/module/tpd/parameters/tpd_*" is better way,Thanks @LuK1337. That module is only for my personal testing.
    15
    for those that also want to disable OPPerf again.

    Based on the findings of @xls654 (digging in the oneplus-services.jar) and the idea of @LuK1337 to disable access to the tpd files of the kernel module, I created a new magisk module, after I found a build.prop variable in the code to disable OPPerf.

    The module chmods the system writeable files of the tpd kernel module:

    Code:
    chmod 000 /sys/module/tpd/parameters/tpd_cmds
    chmod 000 /sys/module/tpd/parameters/tpd_dynamic
    chmod 000 /sys/module/tpd/parameters/tpd_enable
    chmod 000 /sys/module/tpd/parameters/tpd_id

    and sets a build.prop variable to disable OPPerf:

    Code:
    persist.sys.opperf.enable=false

    Be informed that this module doesn't modify any system files so its universal and working on upcoming OOS versions. If you disable or uninstall the module and reboot all is reverted.

    If you don't want to use a magisk module you can also set and revert the build.prop variable via terminal, but it is only read once on boot, when the OPPerf service starts, so you need to reboot after setting or removing the variable.

    disable OPPerf:

    Code:
    su -c "setprop persist.sys.opperf.enable false"

    revert:

    Code:
    su -c "resetprop -p --delete persist.sys.opperf.enable"
    10
    As the OP does not respond, I decided to investigate myself what changes were made in the oneplus-services.jar file.

    I unpacked the original oneplus-services.jar framework from my phone, decompiled classes.dex which was inside and compared all changes made in @xls654 module.

    The changes are in three files inside classes.dex (original files on left side, "hacked on right side):


    sources/com/android/server/wifi/tsu.java
    (wtn enables something called "OpWifiLowLatency", but I don't know what is WifiManager.WifiLock and why he disabled it, to be honest I don't understand just this one change, I don't know what WiFi has to do with TPD and overall app throttling)
    Code_eidIYu8z5t.png



    sources/com/android/server/wm/OnePlusPerfManager.java
    (here he disabled OnePlusPerfManager)
    Code_XNTzVwKOzp.png



    sources/com/android/server/hmo.java
    (I'm quite sure boolean H enables TPD, so OP disabled it by replacing whole function with "return false")
    Code_VOKkhWRTF4.png




    I hope someone will find this information useful. I wanted to see how OP turned off the throttling app out of curiosity, and since he doesn't write back in this thread, I thought that I would save everyone's time by showing what I found.

    I hope the author of the module will not be angry that I showed it 🥶
    9
    I'll Personally donate $50 to anyone that comes up with a easy solution to disable the app throttling. I'm well aware that some Developers can exclude the TPD commit, but it seems like devs aren't too keen on doing that.

    I also realize that OnePlus should have added a toggle within the OS for us to turn that on or off. Samsung does this they have a feature called 'enhanced processing', that lets the phone run at full potential.
    5
    No, it's just what I showed in the post, some things have been disabled, but nothing was added that was not originally there, the module is safe.
    Not sure why would one bother patching services jar when you can just do "chmod 000 /sys/module/tpd/parameters/tpd_*"...
    At least that'd survive OTA updates.