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

Question [Bounty) TPD App Throttling Disablement

Search This thread

goodburner

Senior Member
Dec 6, 2012
98
24
I can confirm that the difference with OPPERF disable module and the Tasker profiles to disable TPD makes a HUGE difference. This is the phone I paid for. Thank you
 

chrmica

Senior Member
Dec 4, 2011
68
6
OnePlus 9 Pro
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"
Hi,
Is it possible to temp ROOT Onplus 9 Pro without unlocking bootloader and set the commands to disable OPPerf and TDP through terminal, will the changes remain on reboot or lost. Thanks
 

samwhiteUK

Senior Member
Jul 1, 2012
123
42
Cambridge
OnePlus 9 Pro
Hi,
Is it possible to temp ROOT Onplus 9 Pro without unlocking bootloader and set the commands to disable OPPerf and TDP through terminal, will the changes remain on reboot or lost. Thanks
The closest you can come is to use adb and run

adb shell pm disable com.oneplus.config

This won't disable the OPPerf, but it will remove the config for it - meaning the phone won't know what apps to limit and will run all the cores at full speed.

However, the TPD module will still be in place, and therefore thread placement will still occur (I think)
 
  • Like
Reactions: galaxys

chrmica

Senior Member
Dec 4, 2011
68
6
OnePlus 9 Pro
The closest you can come is to use adb and run

adb shell pm disable com.oneplus.config

This won't disable the OPPerf, but it will remove the config for it - meaning the phone won't know what apps to limit and will run all the cores at full speed.

However, the TPD module will still be in place, and therefore thread placement will still occur (I think)
Thanks for the tip will check it out
 

DarkLord_OP

Member
Jun 18, 2021
13
3
OnePlus 9 Pro
Disabling TPD only solves part of the problem. If the OPPerf service is running and is able to retrieve configs from OPOnlineConfig then it'll throttle CPU core frequencies in certain apps such as Chrome.

Speedometer scores in Chrome:
Throttling: ~15-20
TPD disabled: ~70
TPD/OPPerf disabled: ~110 (Full 888 potential)
I used the module and both are disabled but chrome cant seem to go past 84. So what kernel are you using and what version of OOS? Also would you mind sharing some battery stats with both disabled?
 

chrmica

Senior Member
Dec 4, 2011
68
6
OnePlus 9 Pro
The closest you can come is to use adb and run

adb shell pm disable com.oneplus.config

This won't disable the OPPerf, but it will remove the config for it - meaning the phone won't know what apps to limit and will run all the cores at full speed.

However, the TPD module will still be in place, and therefore thread placement will still occur (I think)
tried it but fails to disable so I assume phone still needs to be rooted
1627814607375.png
 

chrmica

Senior Member
Dec 4, 2011
68
6
OnePlus 9 Pro
It's not impossible, I did it. I just obviously have the command wrong, sorry. It's

adb shell pm disable-user --user 0 com.oneplus.config

( I forgot the "pm")
Thanks command worked , restarted and ran speedometer in Chrome twice and seems nothing changed got a 30 and 24 point score, will test a bit more but seems this method does not work. I also checked after restart that package was still disabled and it was.
 

samwhiteUK

Senior Member
Jul 1, 2012
123
42
Cambridge
OnePlus 9 Pro
Thanks command worked , restarted and ran speedometer in Chrome twice and seems nothing changed got a 30 and 24 point score, will test a bit more but seems this method does not work. I also checked after restart that package was still disabled and it was.
Admittedly, this command will only help with clock speeds. In the case of Chrome, it's the TPD you need to disable - the TPD prevents Chrome using the prime cores, so it doesn't matter how fast they're running
 

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.
    14
    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.