QtQuick stuck at 24FPS (wearable example)
Unsolved
Mobile and Embedded
-
Hi Qt comunity!
I'm running a Qt application on an embedded Linux i.mx8mm using the eglfs backend and the galcore driver.
To narrow down the issue, I tried to compile some Qt examples and mess around with them:
- https://doc.qt.io/qt-6/qtquickcontrols-wearable-example.html
- https://doc.qt.io/qt-6/qtdoc-demos-todolist-example.html
The todo list example works fine at 60 fps and is very responsive:
$ QT_QPA_EGLFS_DEBUG=1 QSG_RENDER_TIMING=1 QT_QPA_EGLFS_INTEGRATION=eglfs_viv QT_QPA_PLATFORM=eglfs ./ToDoListApp ... qt.scenegraph.time.renderloop: [window 0xaaab1a6cdf00][render thread 0xaaab1a7e2f40] syncAndRender: frame rendered in 1ms, sync=0, render=0, swap=1 qt.scenegraph.time.renderloop: [window 0xaaab1a6cdf00][render thread 0xaaab1a7e2f40] syncAndRender: start, elapsed since last call: 2 ms qt.scenegraph.time.renderer: time in renderer: total=0ms, preprocess=0, updates=0, rendering=0 qt.scenegraph.time.renderloop: [window 0xaaab1a6cdf00][render thread 0xaaab1a7e2f40] syncAndRender: frame rendered in 1ms, sync=0, render=0, swap=1 qt.scenegraph.time.renderloop: [window 0xaaab1a6cdf00][render thread 0xaaab1a7e2f40] syncAndRender: start, elapsed since last call: 1 ms
However the wearable example seems to be stuck at 24fps (swap=40):
$ QSG_RENDER_TIMING=1 ./wearableexample ... qt.scenegraph.time.renderloop: [window 0xaaaacd34c9e0][gui thread] polishAndSync: start, elapsed since last call: 40 ms qt.scenegraph.time.renderloop: [window 0xaaaacd34c9e0][render thread 0xaaaacd640310] syncAndRender: frame rendered in 40ms, sync=0, render=0, swap=39 qt.scenegraph.time.renderloop: [window 0xaaaacd34c9e0][render thread 0xaaaacd640310] syncAndRender: start, elapsed since last call: 40 ms qt.scenegraph.time.renderloop: [window 0xaaaacd34c9e0][gui thread] Frame prepared, polish=0 ms, lock=0 ms, blockedForSync=0 ms, animations=0 ms qt.scenegraph.time.renderer: time in renderer: total=0ms, preprocess=0, updates=0, rendering=0 qt.scenegraph.time.renderloop: [window 0xaaaacd34c9e0][gui thread] polishAndSync: start, elapsed since last call: 41 ms qt.scenegraph.time.renderloop: [window 0xaaaacd34c9e0][render thread 0xaaaacd640310] syncAndRender: frame rendered in 41ms, sync=0, render=0, swap=40 qt.scenegraph.time.renderloop: [window 0xaaaacd34c9e0][render thread 0xaaaacd640310] syncAndRender: start, elapsed since last call: 41 ms qt.scenegraph.time.renderloop: [window 0xaaaacd34c9e0][gui thread] Frame prepared, polish=0 ms, lock=0 ms, blockedForSync=0 ms, animations=0 ms qt.scenegraph.time.renderer: time in renderer: total=0ms, preprocess=0, updates=0, rendering=0
Even when using the basic loop:
$ QSG_RENDER_TIMING=1 QSG_RENDER_LOOP=basic ./wearableexample ... qt.scenegraph.time.renderloop: [window 0xaaaadd7759e0][gui thread] syncAndRender: frame rendered in 3ms, polish=0, sync=0, render=0, swap=2, perWindowFrameDelta=45 qt.scenegraph.time.renderer: time in renderer: total=0ms, preprocess=0, updates=0, rendering=0 qt.scenegraph.time.renderloop: [window 0xaaaadd7759e0][gui thread] syncAndRender: frame rendered in 3ms, polish=0, sync=0, render=0, swap=2, perWindowFrameDelta=45 qt.scenegraph.time.renderer: time in renderer: total=0ms, preprocess=0, updates=0, rendering=0
Enabling
qt.scenegraph.general=true
gives me this message but I don't think this is the root cause but a consequence of slower rendering:$ QT_LOGGING_RULES="qt.scenegraph.general=true" QSG_RENDER_TIMING=1 QSG_RENDER_LOOP=basic ./wearableexample ... qt.scenegraph.general: animation driver switched to timer mode qt.scenegraph.general: Window 0xaaaaebb98ed0 is determined to have broken vsync throttling (5.809524 < 8.333333) switching to system timer to drive gui thread animations to remedy this (however, render thread animators will likely advance at an incorrect rate).
What would be the reason of such of performances difference of the two applications compiled and running on the same target? Has anyone observed similar issue?