Open nobelharvards opened 1 month ago
Can confirm, as I believe the original issue starts, that on Samsung S22 Ultra the frame rate stays at 60
Can confirm, as I believe the original issue starts, that on Samsung S22 Ultra the frame rate stays at 60
That is a flagship phone. It probably has an LTPO panel, which as per the docs on flutter_displaymode, does not do anything to LTPO panels.
This library is ineffective on devices with LTPO panels and iOS devices with ProMotion.
Yep and I agreed with you in my reply
Description
Ente Auth seems to force Android devices to the highest refresh rate while it is open, regardless of what the user has set in system preferences.
It seems to be line 87 in
auth/lib/main.dart
.https://github.com/ente-io/ente/blob/b4d8dea2ef97e483251cc7da2a510de30daa9671/auth/lib/main.dart#L87
Out of the 2 Android devices I have on hand (Nokia G60 and Motorola G54), the Nokia jumps from 60 to 120Hz when opening Ente Auth despite explicitly setting the display refresh rate in system settings to stick to 60Hz for better battery life. The Motorola seems to stay at 60Hz and prioritises the preferred refresh rate in system settings over
FlutterDisplayMode.setHighRefreshRate()
.Most people only open 2FA apps for a few seconds to get the code they want, so in practice, this is not a huge deal for battery life. However, it seems unnecessary to have this line in a 2FA app.
2FA apps are not games. It is completely unnecessary to max out the refresh rate every time the app is opened.
Can anyone else verify whether this behaviour occurs on their Android device? The screen must be lower end. I.e. one that has "discrete framerates like 60Hz, 90Hz etc." Higher end devices with LTPO panels or iOS devices with ProMotion will not work, as per the Flutter display mode docs.
https://pub.dev/packages/flutter_displaymode
For anyone with poor eyesight or poor observance, there is an option in developer options called "show refresh rate" that will help diagnose this issue.
This line was originally added in October 2023 in here: https://github.com/ente-io/ente/pull/276.
In March 2024, an if statement was added, wrapping this statement so it only executes on Android. https://github.com/ente-io/ente/pull/724
I believe
setHighRefreshRate()
(and the wrapping if statement) should be removed entirely so Ente Auth follows user preference that is set in system settings instead of forcing the highest refresh rate just because it can.I am not an expert in Flutter. If I have misinterpreted anything, please let me know.
Version
3.1.3
What product are you using?
Ente Auth
What platform are you using?
Mobile - Android