Hi,
I’m trying to get our Qt6 app running on the iMX8QM. For some reason, the app doesn’t run well in the Docker container. As I can see, the CPU is running at 85-100% all the time, and from Docker stats, it reports that our container is using 370% of the CPU.
Besides that, I also have an iMX8plus, and our app runs well on it.
My question is, do I need to download a different GPU library for the iMX8QM? Currently, I have imx-gpu-viv-wayland installed.
Here is my docker-compose file as well.
qt6:
image: qt6
volumes:
- type: bind
source: /tmp
target: /tmp
- type: bind
source: /dev/dri
target: /dev/dri
devices:
- "/dev/galcore:/dev/galcore"
device_cgroup_rules:
- 'c 226:* rmw'
command: /source/build/qt6 fullscreen
depends_on:
- weston
Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!
Did you like my answer?

Hand-shake,
For your Qt6 application running on the iMX8QM within a Docker container and experiencing high CPU usage, it’s crucial to ensure that the GPU acceleration is correctly set up and utilized by your application. The iMX8QM, part of the Apalis family, features a Vivante GPU, and for optimal performance, leveraging the GPU for rendering is essential. Since you have imx-gpu-viv-wayland
installed, you’re on the right path, but there are a few additional steps and checks to consider:
-
Ensure Compatibility of the GPU Library: The imx-gpu-viv-wayland
package is designed to work with the Vivante GPU, providing the necessary drivers for hardware acceleration. Since your application runs well on the iMX8Plus but not on the iMX8QM, it suggests that the issue might not be with the GPU library itself but with how the application utilizes the GPU within the container.
-
Docker Container Configuration: Your docker-compose
file indicates that you’re binding /dev/dri
and /dev/galcore
to the container, which is necessary for GPU access. However, ensure that your application is configured to use the GPU. This can sometimes require additional environment variables or configuration within the application to ensure it’s directing rendering tasks to the GPU rather than falling back on software rendering.
-
Weston Dependency: Your application depends on weston
, which is a Wayland compositor. Ensure that Weston is correctly configured and running within your container environment. Weston should be set up to use the Vivante backend (weston.ini
configuration) to ensure it leverages hardware acceleration.
-
Performance Monitoring and Analysis: Since you’re experiencing high CPU usage, it’s beneficial to analyze your application’s performance more deeply. Tools like htop
can provide insights into which processes are consuming CPU resources. Additionally, ensuring that your Qt6 application is correctly utilizing Qt Quick’s Scene Graph to offload rendering to the GPU is crucial.
-
Qt Configuration: Verify that your Qt application is configured to use the eGLFS backend or Wayland, depending on your setup. For Wayland, setting the environment variable QT_QPA_PLATFORM=wayland
can force the application to use Wayland, which should work with the GPU acceleration provided by the imx-gpu-viv-wayland
package.
-
Update and Compatibility: Ensure that all packages and drivers related to the GPU are up to date
Please, also check if these links can help you solve your problem:
Qt on Torizon OS | Toradex Developer Center.
Greetings @Srimoki,
Just to make sure I understand your situation. You have a Qt6 application. On our Verdin i.MX8M Plus this application runs well, but on the Apalis i.MX8QM it looks like the GPU is not being leveraged at all. Is that correct?
Just to clarify you are running the exact same set of containers on both sets of hardware right?
Is there anything special about this Qt6 container? Did you create it using our VSCode IDE extension?
Also I didn’t see you specify, but what version of Torizon OS are you using on the modules?
Best Regards,
Jeremias
Hello Jeremias,
Thank you for the answer. The issue regarding why the i.MX8PLUS works better than on the Apalis i.MX8QM is that, for some reason, the image I pulled from our server didn’t include the imx-gpu-viv-wayland driver. That was the reason why our QT app didn’t run smoothly.
Regarding the VSCode IDE, I’ve only started using Torizon OS a few weeks ago, so I will also try the VSCode IDE.
We are using Torizon OS 6.
Hello @Srimoki,
We are glad that you were able to solve the problem by pulling the correct container.
In general, graphical containers for the Apalis iMX8QM and the Verdin iMX8MP use the same libraries, so if you use the exact same container with the same version of Torizon OS, it should work on both.
Best Regards,
Bruno