ajinasokan / flutter_displaymode

A Flutter plugin to set display mode in Android
MIT License
184 stars 22 forks source link

[BUG] Not working on OnePlus 9 Pro #10

Closed AlexV525 closed 3 years ago

AlexV525 commented 3 years ago

Just got the new OnePlus device, tested with the plugin and it seems not working well.

matches.last is at 120Hz refresh rate.

image

AlexV525 commented 3 years ago

Tracking native code, the logic seems solid but it doesn't take effects.

image

image

image

AlexV525 commented 3 years ago

Do you think whether I should reopen the closed issue in flutter repo again?

ajinasokan commented 3 years ago

Did you check the settings to see if there is anything that can block this? From what I read OP9 has a new mode to automatically switch to high refresh rates of its LTPO panel.

Have a look at logcat as well while you try to switch modes.

AlexV525 commented 3 years ago

Did you check the settings to see if there is anything that can block this?

Checked, currently the factory mode is unable to call, the only place to control the refresh rate is here:

Screenshot_2021-03-31-13-03-48-03

From what I read OP9 has a new mode to automatically switch to high refresh rates of its LTPO panel.

You mean the automatically 1~120Hz mode? Yes it's enabled by default when you choose the 120Hz refresh rate.

Have a look at logcat as well while you try to switch modes.

There are no helpful logs when toggling between modes.

dJani97 commented 3 years ago

@AlexV525 I know it's not a proper fix, just curious: does this ADB command work for you?

adb shell settings put global oneplus_screen_refresh_rate 0

On previous OnePlus phones, this command disables optimization and forces the phone to use it's max refresh rate all the time. It works well with the 8T in all Flutter apps and even some games.

AlexV525 commented 3 years ago

@AlexV525 I know it's not a proper fix, just curious: does this ADB command work for you?

Sure, this global setting works fine in every previous OP devices, I used to use this trick on 8 Pro. But now 9/9 Pro has switched to ColorOS (maybe only in China) so the config list doesn't include the column anymore.

More further info is I tried to switch between modes in settings and see if there is a column being modified, but it didn't.

Anyway thanks for the reply, but it's failed on OP9+ColorOS.

dJani97 commented 3 years ago

Right, I forgot about the ColorOS part.

Then I wonder if this issue with changing the display mode is specific to the OnePlus 9 Pro, or rather it's an issue with ColorOS. It would be interesting to see results from older ColorOS devices, and also the OxygenOS version of the OnePlus 9 Pro.

AlexV525 commented 3 years ago

Yep. Since my new device will be use as a daily driver, I don't have plans to make it Oxygen currently, and I don't have any devices that can both have high refresh rate and ColorOS (my OP8 is going to be recycled).

AlexV525 commented 3 years ago

I've opened couple threads in official forums. Let's see if any helpful response can get.

https://forums.oneplus.com/threads/bug-preferred-displaymode-settings-not-working-on-op9-coloros-11.1411296/ https://forum.xda-developers.com/t/preferred-displaymode-settings-not-working-on-op9-coloros-11.4254835/ https://www.oneplusbbs.com/forum.php?mod=viewthread&tid=5891851

AlexV525 commented 3 years ago

Now I'm pretty sure that this is a ColorOS issue because #6 looks like the same problem. ColorOS is used both on OP9 and OPPO devices.

AlexV525 commented 3 years ago

Good news, OP9 now supports to update the display mode manually. So I'm going to close this.

image

jerboy commented 3 years ago

@AlexV525 which version of colorOS has fixed this bug?My colorOS version is V11.2, still not fix.

AlexV525 commented 3 years ago

@AlexV525 which version of colorOS has fixed this bug?My colorOS version is V11.2, still not fix.

11_A.06 Screenshot_2021-05-07-11-41-57-09