Hello,
We are using a custom board based on IMX8MP and noticed some performance issues when upgrading from Android 11 to Android 14. We noticed that transitions and animations feel laggy when using the device.
For evaluation, we performed the same tests on the IMX8MP EVK board. We were taking a look at the gfxinfo of the device and saw that there are huge differences in Janky frames, Number High input latency, and GPU percentile.
Android 11:
Total frames rendered: 1372
Janky frames: 204 (14.87%)
50th percentile: 7ms
90th percentile: 34ms
95th percentile: 77ms
99th percentile: 200ms
Number Missed Vsync: 91
Number High input latency: 274
Number Slow UI thread: 89
Number Slow bitmap uploads: 1
Number Slow issue draw commands: 61
Number Frame deadline missed: 145
50th gpu percentile: 2ms
90th gpu percentile: 3ms
95th gpu percentile: 3ms
99th gpu percentile: 4msAndroid 14:
Total frames rendered: 1136
Janky frames: 429 (37.76%)
Janky frames (legacy): 600 (52.82%)
50th percentile: 29ms
90th percentile: 73ms
95th percentile: 113ms
99th percentile: 250ms
Number Missed Vsync: 130
Number High input latency: 755
Number Slow UI thread: 254
Number Slow bitmap uploads: 3
Number Slow issue draw commands: 376
Number Frame deadline missed: 429
Number Frame deadline missed (legacy): 342
50th gpu percentile: 4ms
90th gpu percentile: 23ms
95th gpu percentile: 23ms
99th gpu percentile: 24msAndroid 15:
Total frames rendered: 1093
Janky frames: 318 (29.09%)
Janky frames (legacy): 639 (58.46%)
50th percentile: 18ms
90th percentile: 97ms
95th percentile: 105ms
99th percentile: 109ms
Number Missed Vsync: 221
Number High input latency: 1028
Number Slow UI thread: 145
Number Slow bitmap uploads: 0
Number Slow issue draw commands: 317
Number Frame deadline missed: 318
Number Frame deadline missed (legacy): 309
50th gpu percentile: 11ms
90th gpu percentile: 4950ms
95th gpu percentile: 4950ms
99th gpu percentile: 4950msIs this a known issue, or are there any hints on how we could solve this issue?
Hello @JK-dev,
Thanks for the data, we will do an internal research and get back to you when we find anything.
Hi @JuanJorge_Mendoza ,
I did tests on A16 and A13.
Android 16:
Total frames rendered: 946
Janky frames: 414 (43.76%)
Janky frames (legacy): 631 (66.70%)
50th percentile: 30ms
90th percentile: 113ms
95th percentile: 200ms
99th percentile: 350ms
Number Missed Vsync: 180
Number High input latency: 764
Number Slow UI thread: 265
Number Slow bitmap uploads: 7
Number Slow issue draw commands: 384
Number Frame deadline missed: 414
Number Frame deadline missed (legacy): 366
50th gpu percentile: 11ms
90th gpu percentile: 4950ms
95th gpu percentile: 4950ms
99th gpu percentile: 4950msAndroid 13:
Total frames rendered: 1000
Janky frames: 284 (28.40%)
Janky frames (legacy): 397 (39.70%)
50th percentile: 12ms
90th percentile: 69ms
95th percentile: 129ms
99th percentile: 250ms
Number Missed Vsync: 122
Number High input latency: 446
Number Slow UI thread: 176
Number Slow bitmap uploads: 1
Number Slow issue draw commands: 242
Number Frame deadline missed: 284
Number Frame deadline missed (legacy): 248
50th gpu percentile: 3ms
90th gpu percentile: 23ms
95th gpu percentile: 24ms
99th gpu percentile: 4950msHello @JK-dev,
Yes, please run the same test and forward the results.
Regards,
Juan Jorge
Hi @JuanJorge_Mendoza ,
Thanks for the reply! As a test for the Janky frames, we just started the system and rebooted once, so we don't have issues caused by any first boot optimizations, and moved around inside the Settings App. Then we read out the gfxinfos through:
adb shell dumpsys gfxinfoIf you would say this is a valid test, I am happy to perform it on A12, A13, and A16.
Hello @JK-dev,
No, that shouldn't be an issue.
Could you share the test used to test the Janky frame? Also if possible, could you please run the same test on A12 and A13? It will help us to track down where the issue begins to appear.
Regards,
Juan Jorge
Hi @danielchen ,
The Display only supports one resolution, which is 720p. I would guess this shouldn't be the issue.
Hi @JK-dev
what display resolution you are using? Could you check if lowering it helps reduce GPU/CPU load and improves overall performance.
@danielchen Thanks for the reply. I saw this post before, but for my understanding, it would mean that if we are using a user build instead of a userdebug build, the issue should be gone; however, this isn't the case. For us, it seems to be the same in user and userdebug images; is there a different way to turn off debuggable for the whole system?
Hi @JK-dev
Yes, this is a known issue on Android 14+ for i.mx8mp.
Android 14+ enables more extensive tracing and memory tracking for debug apps, which can slow down rendering by 1.5x-2x compared to previous versions. This affects UI thread, GPU scheduling, and input latency.
Please refer to below link for the quick workaround and more information.
Regards
Daniel
Hello @JK-dev,
Sorry for the late response it took us a while to optimize the GUI for the 8MP.
The patch "0001-MA-22638-Update-expected-present-time-to-optimize-re.patch" is used to optimize the refresh rate in framework/native. Another two patches need to be applied in vendor/nxp-opensource/imx
Please let us know if that solve your problem
Hi @JuanJorge_Mendoza ,
Sorry for the late reply, I was on holiday. Thank you for the patches! We tested your patches, and we can see that there is a slight improvement when navigating around. However, when it comes to higher loads or more Animations, the system remains very laggy, and most frames arrive way too late. To reproduce this, you could, for example, go to Settings -> Apps -> All Apps -> Include System Apps and scroll through that list. You will see that more than 50% of the frames are late.
Hey @joanxie ,
No, the performance is slightly better than before.
Without the patches:
Total frames rendered: 1015
Janky frames: 376 (37.04%)
Janky frames (legacy): 731 (72.02%)
50th percentile: 31ms
90th percentile: 150ms
95th percentile: 200ms
99th percentile: 400ms
Number Missed Vsync: 262
Number High input latency: 1167
Number Slow UI thread: 368
Number Slow bitmap uploads: 1
Number Slow issue draw commands: 26
Number Frame deadline missed: 376
Number Frame deadline missed (legacy): 386
50th gpu percentile: 4ms
90th gpu percentile: 11ms
95th gpu percentile: 11ms
99th gpu percentile: 12ms
With the patches:
Total frames rendered: 2078
Janky frames: 594 (28.59%)
Janky frames (legacy): 1050 (50.53%)
50th percentile: 21ms
90th percentile: 133ms
95th percentile: 200ms
99th percentile: 400ms
Number Missed Vsync: 367
Number High input latency: 2045
Number Slow UI thread: 567
Number Slow bitmap uploads: 4
Number Slow issue draw commands: 68
Number Frame deadline missed: 594
Number Frame deadline missed (legacy): 580
50th gpu percentile: 4ms
90th gpu percentile: 11ms
95th gpu percentile: 11ms
99th gpu percentile: 12ms
As you see, the patch reduces the number of Janky frames, and the 50% percentile is better, but still not sufficient.
when it comes to higher loads or more Animations
> is it worse than before? Is there any specific performance comparison data between using this patch and not using this patch?
did your operation via UI? if yes, do you have any script or something specific steps? then I can forward to the android team to validate and debug further
Hey @joanxie,
It's basically the same test we did before. What would be a test for the Android team that is sufficient?
they hope you can give them a script to run the performance test and show the detailed performance degradation data, then they can reproduce this, because they don't find the same issue on their side