[Guide] [Magisk] Disable Dynamic refresh rate for Poco X3 NFC

CaPicote

Senior Member
Jan 10, 2019
97
37
18
Can you provide me the following?:
1- MIUI vers. (i.e 12.0.3.0 QJGEUXM)
2- Go to terminal a run su and then:
Code:
getprop ro.vendor.smart_dfps.enable
-Output should be false, if it's true, then you didn't set it right.

I think a lot of people mix up framerate and refresh rate. Just an FYI, the thing that should be of interest is the refresh mode in power monitor. Check these screenshots, the circled value should stay at 120Hz consistently. Another screenshot I provided below without this mod shows 60Hz encircled when device not touched(which we don't want). The value on the right side of it (also in screenshots) is the framerate provided from the app (process) and indicates the actual frames displayed on the screen, if the screen isn't changing or moving, then there is nothing to display 120 frames about and will drop to 1 fps, which is completely normal.
MIUI 12.0.3.0 Global (QJGMIXM)
I went to a terminal, and it indeed shows me that ro.vendor.smart_dfps.enable is false, same with ro.vendor.dfps.enable
And I confirm that on the power monitor it says that my screen goes to either 120/90/60/30Hz depending on the activity, just like you've shown in the second screenshot
 

Slim K

Senior Member
May 16, 2015
95
13
28
Doesn't seem to work there, checked with the power monitor, and it still switch between 120/90/60/30/1 fps depending on the app/menu I'm in
Did you use the config file or did you set it up manually? Also which build date do you have? September or October patch? did you possibly forget to set the prop to post-fs-data?
 

CaPicote

Senior Member
Jan 10, 2019
97
37
18
Did you use the config file or did you set it up manually? Also which build date do you have? September or October patch? did you possibly forget to set the prop to post-fs-data?
There was a config file? No, I did it manually by following the guide
October patch, 12.0.3.0 Global.
I did not, I set the prop to post-fs-data for both smart_dfps and dfps
 

Slim K

Senior Member
May 16, 2015
95
13
28
There was a config file? No, I did it manually by following the guide
October patch, 12.0.3.0 Global.
I did not, I set the prop to post-fs-data for both smart_dfps and dfps
Just for you I have fastbooted to MIUI latest international and tried to replicate what you're describing, everything works as expected. Maybe you have a corrupt vendor if you flashed a custom ROM, since Display hal by xiaomi has been removed from all of them. If you didn't flash a custom rom, try setting it to both boot stages (post-fs and late-start). If it still doesn't work, then I must apologize, I will look into it further and report back. :crying:
 

CaPicote

Senior Member
Jan 10, 2019
97
37
18
Just for you I have fastbooted to MIUI latest international and tried to replicate what you're describing, everything works as expected. Maybe you have a corrupt vendor if you flashed a custom ROM, since Display hal by xiaomi has been removed from all of them. If you didn't flash a custom rom, try setting it to both boot stages (post-fs and late-start). If it still doesn't work, then I must apologize, I will look into it further and report back. :crying:
Well, I did flash a custom rom, I was on RR just for this reason alone, when I saw that there was this guide I wanted to go back to MIUI since overall I like it better (given the adaptative refresh rate is disabled).
Do you know how could I perhaps fix my corrupt vendor if it's really that?
 

Slim K

Senior Member
May 16, 2015
95
13
28
Well, I did flash a custom rom, I was on RR just for this reason alone, when I saw that there was this guide I wanted to go back to MIUI since overall I like it better (given the adaptative refresh rate is disabled).
Do you know how could I perhaps fix my corrupt vendor if it's really that?
You will have to reflash Stock MIUI for NFC vers. through fastboot (the 3,9 GB one). If you don't know how I could write a step by step guide for you. If you do know, then remember to not use the "flash_all_lock" script, since that will lock bootloader and possibly brick your device. ;) Also don't update to October patch immediately, try this mod first and see if it works.
 
Last edited:

VidarPT

Member
Aug 14, 2018
13
1
3
Hey. Thanks for the information. I'd like to try this out but I have two questions: 1 - Is it safe to flash magisk? Some guy from another thread said magisk corrupted his ramdisk and /sdcard when flashing. 2 - Where do I get power monitor to check the refresh rate? Thanks.
 

en_mih

Senior Member
Jun 2, 2010
223
22
0
I'm having problems hiding magisk manager(no magisk hide), I already turn off dynamic hz thx to you , changed device fingerprint for pixel 4(want certification)... But when I want to hide magidk manager (a Bank app can see it -already marked in hide-) it says some error , I don't know if it's the Miui security app , this never happened on AOSP, I'm on stock poco X3 , root + props hide config + vanced ... Any tip ?
go to settings - additionals settings - developer options - and select install via USB . :D and now you can hide manager magisk
 

Slim K

Senior Member
May 16, 2015
95
13
28
Hey. Thanks for the information. I'd like to try this out but I have two questions: 1 - Is it safe to flash magisk? Some guy from another thread said magisk corrupted his ramdisk and /sdcard when flashing. 2 - Where do I get power monitor to check the refresh rate? Thanks.
To answer you questions:
1- The guy in that thread has made the obvious mistake of flashing stock related files through twrp (a very baaad idea), since all current custom recoveries have limited access to system-vendor-product partition (read only). If he had read more carefully, his device wouldn't have been hard bricked. Besides, if you only want Root (Magisk), you don't even need a custom recovery, just an unlocked Bootloader, your current boot.img and a pc with some flashing knowledge.
2- You can find it under Monitoring in Settings/Additional settings/Developer options/Power monitor. If you can't find the option there, then you probably debloated MIUI, in that case restore the app Power Checker with the package name:
Code:
com.xiaomi.powerchecker
If you need further assistance, hit me up and I will help.
 

VidarPT

Member
Aug 14, 2018
13
1
3
Thank you for the clarification. I actually already flashed Xiaomi EU rom and TWRP. I'll flash Magisk tomorrow and play around with dynamic refresh rate.
I wish there was a way to actually customize how dynamic rate works. Stop it from being so aggressive sometimes or lock the frequency on each specific app. - example: always lock at 30Hz when playing games.
 
Last edited:

VidarPT

Member
Aug 14, 2018
13
1
3
Finally flashed magisk and changed props. Works well, however I don't understand the difference between dfps and smart_dfps. Disabling smart_dfps alone seems to disable adaptive refresh entirely while just disabling dfps does nothing. (I might have said these backwards)
Sadly this doesn't solve my issue when playing games or watching videos on a web browser like firefox. The framepacing is terrible nonetheless. You'd think a game running at 30fps would have perfect frame pacing with the screen set to 60Hz but that's not the case. Even though vsync keeps the screen tearing away, it doesn't control framepacing. Fourtenately, dfps is actually really good at solving this problem because it reduces the screen refresh rate to 30Hz, leading to a smoother and mostly even framepacing. The same logic applies when playing a 60FPS game running the screen at 120Hz - will lead to bad framepacing. It disapoints me, however, that the phone ALWAYS increases its refresh rate to 120/60 whenver the screen is touched. So, for instance, if you're watching a 30FPS video and don't touch the screen, the refresh rate will drop to 30Hz. That's great and helps with both framepacing and battery life. The problem arises when you touch the screen even once and the refresh rate jumps immidiately to 120Hz. This is my only problem with dfps. That said, I'd like to ask if you have any idea how to disable this? Sounds like a battery saving or performance feature and not dfps related? I want the phone to change its refresh rate to whatever the framerate is of the fullscreen application on display and never change it when touching the screen and until changing or closing the app. Essentially, I want to limit the maximum refresh rate of the app. There's actually one application that does this: the Youtube app. Regardless of the screen refresh rate, as soon as you open the Youtube app the screen drops to a 60Hz limit and stays at 60Hz, never going over that. It still drops to 30Hz when watching a 30FPS video, but it never goes back to 120Hz. I'd like to achieve this either on an app to app basis or system wide. If you have any idea, please share your thoughts.
 
Last edited:

Slim K

Senior Member
May 16, 2015
95
13
28
Finally flashed magisk and changed props. Works well, however I don't understand the difference between dfps and smart_dfps. Disabling smart_dfps alone seems to disable adaptive refresh entirely while just disabling dfps does nothing. (I might have said these backwards).
Without disabling dfps (not the smart one), I experience random switches to 90Hz in some system apps and processes, i.e in recents tab and when changing Volume. At least that is what happens in the EU version of Stock MIUI.
Sadly this doesn't solve my issue, I'd like to achieve this either on an app to app basis or system wide.
What you're describing happens because of Surface flinger, which is responsible for handling touch activities, but it happens for a good reason. Imagine switching from a video at 30hz to Home screen at 120Hz, if we do your implementation of smartdfps, it will go like this:

1- You're watching the video at 30Hz and decide to go back to home (Youtube).
2- You touch the screen at home button to return (still at 30Hz) (Surface fllinger).
3- The Switch Animation starts to transport you to home (still at 30Hz) (System UI).
4- At home screen the Refresh rate ramps up to 120Hz (It goes in steps 30>50>90>120Hz because of driver limitations)(Poco Launcher).

Now that doesn't sound so terrible, except if you switch out Poco Launcher with any other App, then you experience Massive Lag during the switch to it. In comparison, Ramping up during touch (i.e Step 2 from above) and capping System UI @ 120 at all times looks smoother during most of the steps, which is Xiaomi's implementation. IMHO disabling it entirely sounds better than both.
If you want Per-app refresh rate, switch to Nitrogen OS by xyyx, that ROM has this feature you want in Settings.
 
Last edited:

Slim K

Senior Member
May 16, 2015
95
13
28
Hello, can this instruction be applied to Samsung A70? Or is this instruction only for Poco X3?
This is only for Poco X3, as the title implies :)
Hi guys, is there any way I can disable this annoying behaviour of dropping hz and fps if I'm not touching the screen? I'm not rooted (need to wait the 7 days by XIAOMI) but this is driving me mad!
No you can't. You need system R/W access or Magisk to edit vendor Props.
 

Slim K

Senior Member
May 16, 2015
95
13
28
Is there a way to set the refresh rate to 90hz and disable the dynamic refresh rate after that?
If you mean using Setedit app to force 90Hz as many tuts online mention, then try the following:
1- Reset vendor.dfps.enable back to true.
2- Set the Key in System table Setedit app:
Code:
user_refresh_rate
to the value 90.
3- be sure 120Hz in Settings is enabled, then return to home screen.
4- Open Recents and stay for a few seconds (it will switch to 90Hz).
5- Done.

It should stay fixed at 90Hz even if you reboot and while Dfps is disabled. If you switch to 60Hz in settings and back to 120Hz, It'll reset to 120Hz, then you can do the above again. :D
 
Last edited:

bredpir

New member
Nov 25, 2019
2
0
0
If you mean using Setedit app to force 90Hz as many tuts online mention, then try the following:
1- Reset vendor.dfps.enable back to true.
2- Set the Key in System table Setedit app:

to the value 90.
3- be sure 120Hz in Settings is enabled, then return to home screen.
4- Open Recents and stay for a few seconds (it will switch to 90Hz).
5- Done.

It should stay fixed at 90Hz even if you reboot and while Dfps is disabled. If you switch to 60Hz in settings and back to 120Hz, It'll reset to 120Hz, then you can do the above again. :D
do something like that on Samsung A70 friend