Qt5 app and X11 performance on Apalis

Hi,

I’m developing a Qt 5.9.6 Quick/QML app for the Apalis T-30, on top of the Toradex BSP 2.8b4, screen is Full-HD.

Some things I like to verify:

  1. Other posts here mentioned hardware acceleration for the T-30 is available on top of X11.
    Out of the box, my app seems to use the Qt LibGLES module (OpenGL ES), xcb platform plugin and Qt threaded rendering, which should all be the “fastest”/correct setting in this setup (I think).
    Am I on the right track here?

  2. My problem: The Qt app (nothing fancy, no big animations,“buttons and text/input”) in a small/medium window runs in 60 fps, but increasing the window size seems to severely hit the framerate to sync at 30 fps. Using fullscreen seems to increase performance a little.
    Using Qt Profiler I saw no increase in raw rendering time (around 3ms - scene complexity does not change). After some research I suspect the problem to arise from the “Swap” part of the rendering process.

As I’m not an X11 expert - is there anything I can config/profile here, especially on the X11 part /swapping/Qt interaction with X11?

Is this maybe normal behaviour, am I expecting “to much” of the Apalis T-30 on running fullscreen Full-HD Qt5 app with X11 at 60fps?

Thanks for sharing your opinions on this…

hi @bruthos

Sorry for the late reply.
We are looking into this issue and will come back to you.

Best regards,
Jaski

hi @bruthos

Other posts here mentioned hardware acceleration for the T-30 is available on top of X11. Out of the box, my app seems to use the Qt LibGLES module (OpenGL ES), xcb platform plugin and Qt threaded rendering, which should all be the “fastest”/correct setting in this setup (I think). Am I on the right track here?

Yes, this should work fine.

My problem: The Qt app (nothing fancy, no big animations,“buttons and text/input”) in a small/medium window runs in 60 fps, but increasing the window size seems to severely hit the framerate to sync at 30 fps. Using fullscreen seems to increase performance a little. Using Qt Profiler I saw no increase in raw rendering time (around 3ms - scene complexity does not change). After some research I suspect the problem to arise from the “Swap” part of the rendering process.

Which Image did you use?
Could you provide a sample application?

Thanks and Best regards,
Jaski

Hi Jaski, thanks for your answer.

Which Image did you use

I did build the BSP 2.8b4 as I need the Qt SDk Toolchain to build stuff, so did not use an precompiled image.

Could you provide a sample application?

I added a sample as source (see zip).When running this sample is see 60fps in windowed mode (1600x900), but only 30 fps in maximized mode (~FullHD, which is ~40% more pixels). As Qt does not seem to “do more work” at the rendering stage (see Qt Profiler) I would expect the bottleneck to be the OpenGL/X11/EGL Interface.

My expecation would be that a chip with a GPU Unit may handle this, as the X11 should use EGL which should be accelerated by the NVIDIA proprietary driver.

I know that this is not the place to profile my Qt application and that is not my expectation.
But I’d like to be sure, that all “hardware acceleration” is used in the right way, so that the only optimisation I have to do is in my application itself, and no “magic” X11 switch or GPU Performance mode.

Speaking of performance mode, changing the CPU governor to “performance” yields some improvements (“ondemand” does nothing for me). Is there anything one can do to access some info or change the GPU behaviour (power saving is no concern for me)?

Best regards and thx!


Hi @bruthos

For me the frame rate switches between 30 and 60 fps depending on the window size. I could imagine that this comes because the update rate is synchronized with the screen refresh rate. If the update rate drops slightly below 60 fps the frame rate will therefore drop to 30 fps even if it is still be near 60 fps.

I’m not sure if this helps you. However, I’m not sure if this is a real “issue”.

Regards,
Stefan