iMX8MP application not utilizing GPU properly

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Tim,

I’m sorry to hear about the performance issues you’re experiencing with your Slint application on the Verdin i.MX8MP. It sounds like the application isn’t utilizing the GPU as expected, which can indeed lead to high CPU usage and lag.

Here are some steps you can take to troubleshoot and potentially resolve this issue:

  1. Verify GPU Driver Installation: Ensure that the GPU drivers are correctly installed and configured on your TorizonCore system. The i.MX8MP should support GPU acceleration, so it’s important to confirm that these drivers are active and properly set up.

  2. Container Configuration: Check that your Docker container is configured to allow GPU access. This typically involves ensuring that the container has the necessary permissions to access GPU devices. You can do this by using the --device flag in your docker run command to map the GPU device, such as /dev/galcore, into the container.

  3. OpenGL and Skia Configuration: Since you’re using the Skia renderer, make sure it is configured to use hardware acceleration. Sometimes, additional configuration or environment variables are needed to enable GPU acceleration in graphics libraries.

  4. Review Application Code: Ensure that your application is designed to leverage GPU acceleration. This might involve reviewing the code to ensure that OpenGL calls are optimized for GPU execution.

By following these steps, you should be able to identify whether the issue lies with the driver, the container setup, or the application itself. If the problem persists, further investigation into the specific OpenGL calls and their execution paths might be necessary to ensure they are being offloaded to the GPU as expected.

I hope this helps you improve the performance of your application.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Avalonia: [OpenGL] Unable to initialize GLX-based rendering.