Bug Report: Marker rotation stutters on high-refresh-rate displays — app locked to 45Hz (Android) #148
Cesarin76
started this conversation in
Bug reports
Replies: 1 comment
|
Hello, before I read through this in details, this bug report seems to be mostly AI generated, could you please confirm? It seems the specific issue you're encountering is the map rotation animation when following the current device's location is visually stuttered? Could you confirm the problem you're encountering is with this animation specifically and not other animations? (e.g. opening the drawer, opening the settings page, etc.). Thanks. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
App: Map Marker (com.exlyo.mapmarker)
Version tested: 3.19.0 (versionCode 839)
Platform: Android 16, Motorola device with a 120Hz-capable display (confirmed via adb bugreport)
SUMMARY
The map marker's rotation animation (heading/compass indicator) appears visibly choppy/stuttering compared to other navigation apps (e.g. HERE WeGo, Google Maps) on the same device. Root cause identified via dumpsys SurfaceFlinger / DisplayDeviceRepository logs captured in an Android bug report: the OS is explicitly throttling the app's rendering to 45Hz, while the display's native refresh rate is up to 120Hz (confirmed elsewhere in the same log as renderFrameRate=120.00001).
Relevant log lines:
DisplayDeviceRepository: Display device changed render timings: "Pantalla integrada", renderFrameRate=90.0, presentationDeadlineNanos=11500000, appVsyncOffsetNanos=9166667, frameRateOverrides=[{uid=10411 frameRateHz=45.0}]
SurfaceFlinger: setPreferredRefreshRateForUid uid: 10411, rate:45.000000
(uid 10411 = com.exlyo.mapmarker in this session)
The window info for MainActivity also shows:
requestedFrameRate: {0.00 Hz FrameRateCompatibility::Default FrameRateCategory::Normal}
i.e. the app is not requesting any specific frame rate at all, so the platform's default frame-rate voting logic is choosing a conservative rate for it.
ROOT CAUSE
This matches a long-standing, well-documented Flutter/Android issue: Flutter apps do not opt into the display's maximum refresh rate by default, so Android's per-app frame rate policy falls back to a lower rate unless the app explicitly requests a higher one via the platform APIs added in Android 11 (API 30):
References:
SUGGESTED FIX
In MainActivity (android/app/src/main/kotlin/.../MainActivity.kt), request the highest available refresh rate when the Flutter surface is created:
class MainActivity : FlutterActivity() {
override fun onFlutterSurfaceViewCreated(flutterSurfaceView: FlutterSurfaceView) {
super.onFlutterSurfaceViewCreated(flutterSurfaceView)
window.attributes = window.attributes.also {
it.preferredRefreshRate = 120f
}
}
}
Alternatively, integrate the flutter_displaymode package and call FlutterDisplayMode.setHighRefreshRate() on app start.
STEPS TO REPRODUCE
Happy to provide the full bug report log if useful for debugging.
All reactions