Qt application not using GPU on Verdin AM62 (Mallow carrier board)

Hello community,
Hello @leonardo.costa.tx,

I have built a Yocto image for the Verdin AM62 with the Mallow carrier board. When I run a simple PyQt application, I notice that CPU usage is quite high. Running the same application on a Raspberry Pi shows much lower CPU usage. Based on this, I suspect that my image is not making use of the GPU for rendering.

I am using the module: Verdin AM62 Dual 1GB IT

In my local.conf, I have added:
IMAGE_INSTALL:append = " python3 python3-spidev python3-pyqt5"
#IMAGE_INSTALL:append = " python3 python3-pyqt5 python3-pyqt5.qtwidgets python3-pyqt5.qtgui python3-pyqt5.qtcore python3-pyqt5.qtserialport"
IMAGE_INSTALL:append = " nano libdrm libinput evtest weston"
DISTRO_FEATURES:append = " wayland opengl"
IMAGE_INSTALL:append = " spidev-test"
IMAGE_INSTALL:append = " libgpiod-tools"
IMAGE_INSTALL:append = " python3 python3-pip"
IMAGE_INSTALL:append = " kernel-module-hello"

My questions:

  • Do i need to add something to local.conf to use GPU
  • Is GPU acceleration currently supported in the BSP for Verdin AM62?
  • Are there additional packages or kernel modules I need to include in Yocto to enable GPU support?

Thank you in advance.

Regards.
Raju

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello Raju,

GPU Support on Verdin AM62

The GPU support on Verdin AM62 depends on which specific module variant you’re using. According to the datasheet, GPU availability varies across different Verdin AM62 models(1):

GPU Availability by Module Variant

  • Verdin AM62 Quad 2GB WB IT: GPU supported (PowerVR Rogue AXE-1-16M at 500MHz)(1)
  • Verdin AM62 Dual 1GB WB IT: GPU supported (PowerVR Rogue AXE-1-16M at 500MHz)(1)
  • Verdin AM62 Dual 1GB IT: GPU supported (PowerVR Rogue AXE-1-16M at 500MHz)(1)
  • Verdin AM62 Dual 1GB ET: No GPU support(1)
  • Verdin AM62 Solo 512MB WB IT: No GPU support(1)
  • Verdin AM62 Solo 512MB: No GPU support(1)

The GPU-enabled variants support 2D and 3D acceleration, OpenGL ES 3.1, and Vulkan 1.2(1).

Multimedia and GPU Acceleration

For multimedia applications, NXP provides GStreamer plugins to access hardware acceleration units on i.MX SoCs(2). The documentation states that “NXP provides GStreamer plugins to access the multimedia libraries using the i.MX SoC’s hardware acceleration units”(2).

Recommendations

  1. Verify your module variant - Check if your specific Verdin AM62 model includes GPU support according to the specifications above(1)

  2. Use the Reference Multimedia Image - Consider building the tdx-reference-multimedia-image which includes multimedia acceleration support(3):

$ bitbake tdx-reference-multimedia-image

(3)

  1. Check NXP documentation - For detailed GStreamer usage and GPU acceleration on NXP-based SoMs, refer to the NXP documentation on Embedded Linux for i.MX Applications Processors, specifically the Multimedia section(2)

If you’re using one of the GPU-supported variants but still experiencing high CPU usage, the issue might be related to your PyQt application not properly utilizing the available GPU acceleration or missing multimedia packages in your custom Yocto build.

Best regards, Toradex AI Assistant.

Hey, @raju3003,

May I kindly ask you not to ping our staff (with @) directly in your question? This disrupts our internal process of assignment to your ticket.

I suggest reading through our article on video encoding. Read the article and run the commands to make sure the GStreamer pipeline are running properly.

As the AI said, the Verdin AM62 Dual 1GB IT supports both 3D and 2D accelearation, so the commands in the article should work. If they do, it will indicate some error in your python implementation. Let me know what you find.

Best regards,

Hello,

First, apologies for tagging staff directly in my previous post — I understand now that it disrupts your internal process.

In my case, I am not playing any video or audio — my application is just a simple PyQt5 UI with buttons. When a button is pressed, it sends a value, and when data is received, the UI updates (for example, changing the button color).

Even though this is a simple UI, I notice high CPU usage on the Verdin AM62 (Dual 1GB IT, Mallow carrier board). Running the exact same application on a Raspberry Pi shows much lower CPU usage. This makes me think that GPU acceleration might not be in use on my Yocto image.

So my questions are:

  1. Do I need to add something specific in local.conf to enable GPU acceleration for Qt/PyQt?
  2. Are there additional packages or kernel modules I should include in Yocto to ensure hardware acceleration is used for UI rendering?

Thanks for your guidance.

Best regards,
Raju

Hey, @raju3003,

I understand where you’re coming from with your comparison to Raspberry Pi, but there are many possible causes for different CPU usage of an application across different boards. We need to:

  1. Confirm if the GPU is in fact available for usage in your image.
  2. If it is available for usage, verify if the GPU is being used by your particular python application.

You do not need to add a specific entry to local.conf, and there are no additional modules or packages needed. If you are building the Reference Multimedia image, GPU acceleration should be available for the Verdin AM62 Dual 1GB IT.

Run the commands on our article on video encoding. We need to confirm if the GPU is available and working properly, before investigating its usage on your python implementation.

Best regards,

Hi,

Thanks for your guidance earlier. I checked the Qt platform being used on my Verdin AM62, and it seems the GPU library is being picked up:

echo $QT_QPA_PLATFORM
wayland-egl

So it appears that Qt is configured to use GPU acceleration. However, even with this, my simple PySide6 application (installed via pip3 install pyside6, using the python3-pip added in local.conf) still shows noticeably lower performance compared to a Raspberry Pi running the same application.

I also tried testing GPU video decoding using GStreamer:

gst-launch-1.0 filesrc location=input.mp4 ! qtdemux ! v4l2video0dec ! autovideosink

But it failed with:

WARNING: erroneous pipeline: no element "v4l2video0dec"

This indicates that the GStreamer hardware video decoding plugin isn’t installed, but since my application is GUI-only (buttons changing color based on input) and does not play video, I believe this shouldn’t affect GPU usage for my Python UI.

Could you advise on additional checks I can do to confirm that GPU acceleration is actually being utilized for my Python UI? For instance:

  • Are there specific environment variables or debug tools I can use to verify GPU rendering for PySide6?
  • Are there recommended ways to profile CPU vs GPU usage for simple Qt/PySide6 applications on Yocto?

Any guidance on how to further investigate this would be really helpful.

Best regards,
Uday

Hey @raju3003,

I apologize for taking long to respond. From your output it does seem like the GPU is set up properly, and as you said, the absence of v4l2video0dec should not affect your Pyside6 application.

Our Reference Multimedia images require no additional Yocto configuration for applications to use GPU acceleration. I investigated further, and there are a few more commands to confirm if the GPU is working properly:

First run dmesg to confirm if the GPU is being detected:

dmesg | grep -i -E '(gpu|vivante|etnaviv|gal|pvr|mali)'

If it is detected, run the following command to run a test render using the GPU. Also, post here the output of the command after you run it.

glmark2-es2-wayland -b shading:duration=5.0 -b build:use-vbo=false -b texture -s 640x480

Best regards,

Hi @leonardo.costa.tx,

Thank you for the guidance. I connected to the target device and ran the suggested command. Below is the output:

raju@SYS-01:~$ ssh root@verdin-am62-15415775.local
root@verdin-am62-15415775:~# ls
MCP_V2  pictures  sound  video
root@verdin-am62-15415775:~# dmesg | grep -i -E '(gpu|vivante|etnaviv|gal|pvr|mali)'
[    9.267150] PVR_K:  143: Device: fd00000.gpu
[    9.283836] PVR_K:  143: Read BVNC 33.15.11.3 from HW device registers
[    9.329413] PVR_K:  143: RGX Device registered with BVNC 33.15.11.3
[    9.360231] [drm] Initialized pvr 24.2.6643903 20170530 for fd00000.gpu on minor 0
[   16.108468] PVR_K:  403: RGX Firmware image 'rgx.fw.33.15.11.3' loaded
[   16.121651] PVR_K:  403: Shader binary image 'rgx.sh.33.15.11.3' loaded

It seems the GPU is detected and initialized correctly.

After that i ran

glmark2-es2-wayland -b shading:duration=5.0 -b build:use-vbo=false -b texture -s 640x480

running nicely but CPU usage varying between 50-70

Best regards,
Raju

Hey, @raju3003,

Please send the console output when you ran the command:

glmark2-es2-wayland -b shading:duration=5.0 -b build:use-vbo=false -b texture -s 640x480

Since you said the visual output ran nicely, I suspect the GPU is working correctly, but I want to check the output to make sure.

About the 50-70% CPU usage, the AM62’s GPU is not very powerful compared to other modules, and for this reason a higher CPU usage is expected. If the GPU wasn’t being used, the CPU cores would probably run at around 100%.

Best regards,

Hi @leonardo.costa.tx,

Here’s the console output from running the command:

root@verdin-am62-15415775:~# glmark2-es2-wayland -b shading:duration=5.0 -b build:use-vbo=false -b texture -s 640x480
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Imagination Technologies
    GL_RENDERER:    PowerVR A-Series AXE-1-16M
    GL_VERSION:     OpenGL ES 3.1 build 24.2@6643903
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
    Surface Size:   640x480 windowed
=======================================================
[shading] duration=5.0: FPS: 242 FrameTime: 4.148 ms
[build] use-vbo=false: FPS: 222 FrameTime: 4.510 ms
[texture] <default>: FPS: 444 FrameTime: 2.253 ms
=======================================================
                                  glmark2 Score: 301 
=======================================================
root@verdin-am62-15415775:~#

As you mentioned, the AM62 GPU isn’t very powerful, which likely explains the higher CPU usage.
Currently, I’m using the 1 GB RAM variant — would upgrading to more RAM help improve performance, or is it mainly limited by the SoC itself?

If the AM62 is not ideal for graphics-intensive applications, could you please suggest a better SoM from Toradex that offers stronger GPU performance?

Best regards,
Raju

Hey @raju3003,

From the command output, the GPU is working fine. If you use a SoM variant with more RAM, it should make some improvement in performance. If you wish for a SoM more suited for graphical applications, we recommend using the Verdin AM62P, since it’s from the same family as the Verdin AM62 you are using, the transition to it should be seemless. Before making your decision, check our Product Selector, you can select more than one of our SoMs and compare their specs directly.

Best regards,