Vivante GPU Enabled but Qt Wayland Apps Use Software Rendering on i.MX8X Colibri

Hi everyone,

I’m working on a Toradex Colibri i.MX8X and trying to get GPU acceleration working properly.

Here’s what I have so far:

  • CONFIG_MXC_GPU_VIV=y is set in the kernel config (menuconfig)
  • /dev/galcore exists
  • Boot log shows:
[    1.924984] [drm] Initialized vivante 1.0.0 20170808 for 80000000.imx8_gpu0_ss on minor 2
  • I’m using Sway with wlroots as my Wayland compositor
  • Running Qt Wayland apps results in software rendering
  • Here’s the Sway log excerpt:
[backend/drm/legacy.c:38] /dev/dri/card0 doesn't support DRM_CAP_ADDFB2, falling back to dumb buffer
[backend/drm/legacy.c:44] Falling back to software rendering on headless backend

I haven’t made changes to the device tree beyond the default Toradex BSP.

Questions:

  • What else should I check to ensure Qt apps use the Vivante GPU?
  • Are any specific userspace components or environment variables required (e.g., LD_LIBRARY_PATH, EGL_PLATFORM)?
  • Does Vivante support work correctly with wlroots-based compositors like Sway, or should I use Weston?

Any tips or known working setups would be much appreciated. Thanks!

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!

If you’re looking to enable GPU acceleration on your Colibri iMX8X, here are some key points to consider:

  1. The Colibri iMX8X is equipped with a GC7000Lite GPU from Vivante, which supports OpenGL ES3.1. This provides a solid foundation for graphics acceleration. You can find more details in the Colibri iMX8X documentation.

  2. For graphics acceleration, Toradex BSPs recommend using Wayland as the preferred graphics back-end for i.MX 8 Series modules. More information is available in the graphics acceleration documentation.

  3. If you’re developing Qt applications, it’s advisable to use the qt6-wayland-vivante container. This container includes the necessary GPU drivers for hardware acceleration. You can learn more about this setup in the Toradex community post.

  4. To verify that GPU acceleration is functioning correctly, you can run the contextinfo program to create an OpenGL/OpenGLES context. This is also discussed in the community post.

Regarding your specific questions:

  1. Instead of Sway, it is recommended to use Weston as the Wayland compositor for i.MX 8 modules. This is further explained in the graphics acceleration documentation.

  2. For a proper GPU acceleration setup, ensure you have the imx-gpu-viv-wayland package installed and that you have proper device access to /dev/dri and /dev/galcore. More details can be found in the community post.

To validate your setup, you can run the glmark2 benchmark in Wayland mode with the following command:

glmark2-es2-wayland -s 640x480

The Colibri iMX8X should score around 929 points with this benchmark when GPU acceleration is working correctly. This is also covered in the graphics acceleration documentation.

If you have any more questions or need further clarification, feel free to ask!

Best regards,
Toradex AI Assistant.

Hi again, thanks for the summary!

I understand that Weston is the officially supported compositor, but my use case specifically involves Sway (wlroots), as I need a minimal and scriptable Wayland environment for a kiosk-style Qt app.

Just to clarify, I’m using a custom Yocto build based on the official Toradex BSP for Colibri iMX8X. Here’s what I’ve verified:

  • I do have /dev/galcore present.
  • Kernel is built with CONFIG_MXC_GPU_VIV=y.
  • dmesg shows that the Vivante GPU is initialized:
[drm] Initialized vivante 1.0.0 20170808 for 80000000.imx8_gpu0_ss on minor 2
  • I’m using the default Toradex BSP device tree.
  • When I run glmark2-es2-wayland under Weston, I get a score around 929, confirming that GPU acceleration works under Weston.
  • However, when I launch a Qt app under Sway, it falls back to LLVMpipe (software rendering), and I see logs like:
00:00:00.000 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:338] Sway version 1.9-dev-2bba8a86 (Dec 14 2023, branch 'v1.9')
00:00:00.000 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:339] wlroots version 0.17.0
00:00:00.007 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:120] Linux colibri-imx8x-06858902 6.6.74-7.1.0-devel-g0459206db704 #1 SMP PREEMPT Mon Feb  3 12:55:19 UTC 2025 aarch64 GNU/Linux
00:00:00.007 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:136] Contents of /etc/os-release:
00:00:00.007 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:120] ID=horse-wlroots
00:00:00.007 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:120] NAME="user "
00:00:00.007 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:120] VERSION="7.1.0-devel-20250115102948+build.0 (scarthgap)"
00:00:00.007 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:120] VERSION_ID=7.1.0-devel-20250115102948-build.0
00:00:00.007 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:120] VERSION_CODENAME="scarthgap"
00:00:00.007 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:120] PRETTY_NAME="user  7.1.0-devel-20250115102948+build.0 (scarthgap)"
00:00:00.007 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:120] CPE_NAME="cpe:/o:openembedded:horse-wlroots:7.1.0-devel-20250115102948+build.0"
00:00:00.007 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:108] LD_LIBRARY_PATH=
00:00:00.007 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:108] LD_PRELOAD=
00:00:00.007 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:108] PATH=/usr/local/bin:/usr/bin:/bin
00:00:00.007 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:108] SWAYSOCK=
00:00:00.008 [INFO] [/usr/src/debug/sway-1.9/1.9-dev/sway/main.c:376] Starting sway version 1.9-dev-2bba8a86 (Dec 14 2023, branch 'v1.9')
00:00:00.008 [DEBUG] [/usr/src/debug/sway-1.9/1.9-dev/sway/server.c:118] Initializing Wayland server
00:00:00.008 [INFO] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/backend.c:309] Loading user-specified backends due to WLR_BACKENDS: drm,libinput
00:00:00.008 [INFO] [wlr] [libseat] [c/debug/seatd/0.8.0/libseat/backend/seatd.c:64] Could not connect to socket /run/seatd.sock: No such file or directory
00:00:00.008 [INFO] [wlr] [libseat] [c/debug/seatd/0.8.0/libseat/libseat.c:76] Backend 'seatd' failed to open seat, skipping
00:00:00.021 [INFO] [wlr] [libseat] [c/debug/seatd/0.8.0/libseat/libseat.c:73] Seat opened with backend 'logind'
00:00:00.021 [INFO] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/session/session.c:109] Successfully loaded libseat session
00:00:00.031 [DEBUG] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/session/session.c:384] Ignoring '/dev/dri/card2': not a KMS device
00:00:00.042 [DEBUG] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/session/session.c:384] Ignoring '/dev/dri/card1': not a KMS device
00:00:00.051 [INFO] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/backend.c:213] Found 2 GPUs
00:00:00.051 [INFO] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/drm/backend.c:202] Initializing DRM backend for /dev/dri/card3 (mxsfb-drm)
00:00:00.051 [DEBUG] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/drm/drm.c:110] Using atomic DRM interface
00:00:00.051 [DEBUG] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/drm/drm.c:123] ADDFB2 modifiers supported
00:00:00.051 [INFO] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/drm/drm.c:255] Found 1 DRM CRTCs
00:00:00.052 [INFO] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/drm/drm.c:213] Found 1 DRM planes
00:00:00.052 [INFO] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/drm/backend.c:202] Initializing DRM backend for /dev/dri/card0 (vkms)
00:00:00.052 [DEBUG] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/drm/drm.c:110] Using atomic DRM interface
00:00:00.052 [DEBUG] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/drm/drm.c:123] ADDFB2 modifiers supported
00:00:00.052 [INFO] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/drm/drm.c:255] Found 1 DRM CRTCs
00:00:00.052 [INFO] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/drm/drm.c:213] Found 2 DRM planes
00:00:00.052 [INFO] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/util/env.c:25] Loading WLR_RENDERER option: gles2
00:00:00.052 [INFO] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/egl.c:206] Supported EGL client extensions: EGL_EXT_client_extensions EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug EGL_EXT_platform_device EGL_EXT_explicit_device EGL_EXT_platform_wayland EGL_KHR_platform_wayland EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_EXT_platform_xcb EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless
00:00:00.060 [ERROR] [wlr] [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "eglQueryDeviceStringEXT"
00:00:00.060 [ERROR] [wlr] [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "eglQueryDeviceStringEXT"
00:00:00.060 [DEBUG] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/egl.c:509] DRM device '/dev/dri/card0' has no render node, falling back to primary node
MESA-LOADER: failed to open vkms: /usr/lib/dri/vkms_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
00:00:00.122 [ERROR] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/egl.c:320] Software rendering detected, please use the WLR_RENDERER_ALLOW_SOFTWARE environment variable to proceed
00:00:00.122 [ERROR] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/egl.c:572] Failed to initialize EGL context
00:00:00.122 [ERROR] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/gles2/renderer.c:804] Could not initialize EGL
00:00:00.122 [ERROR] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/wlr_renderer.c:346] Failed to create a GLES2 renderer
00:00:00.122 [ERROR] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/wlr_renderer.c:426] Could not initialize renderer
00:00:00.122 [ERROR] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/drm/renderer.c:27] Failed to create renderer
00:00:00.122 [ERROR] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/drm/backend.c:259] Failed to initialize renderer
00:00:00.124 [ERROR] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/backend/backend.c:221] Failed to create DRM backend
00:00:00.124 [INFO] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/util/env.c:25] Loading WLR_RENDERER option: gles2
00:00:00.124 [INFO] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/egl.c:206] Supported EGL client extensions: EGL_EXT_client_extensions EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug EGL_EXT_platform_device EGL_EXT_explicit_device EGL_EXT_platform_wayland EGL_KHR_platform_wayland EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_EXT_platform_xcb EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless
00:00:00.132 [ERROR] [wlr] [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "eglQueryDeviceStringEXT"
00:00:00.132 [ERROR] [wlr] [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "eglQueryDeviceStringEXT"
00:00:00.132 [DEBUG] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/egl.c:509] DRM device '/dev/dri/card3' has no render node, falling back to primary node
00:00:00.194 [ERROR] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/egl.c:320] Software rendering detected, please use the WLR_RENDERER_ALLOW_SOFTWARE environment variable to proceed
00:00:00.194 [ERROR] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/egl.c:572] Failed to initialize EGL context
00:00:00.194 [ERROR] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/gles2/renderer.c:804] Could not initialize EGL
00:00:00.194 [ERROR] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/wlr_renderer.c:346] Failed to create a GLES2 renderer
00:00:00.194 [ERROR] [wlr] [/usr/src/debug/wlroots-0.17/0.17.0/render/wlr_renderer.c:426] Could not initialize renderer
00:00:00.194 [ERROR] [/usr/src/debug/sway-1.9/1.9-dev/sway/server.c:132] Failed to create renderer

and similar EGL/DRI-related messages.

So my key question is:

Is GPU acceleration with Vivante (GC7000Lite) officially supported (or even possible) when using Sway (wlroots) as the Wayland compositor on Colibri iMX8X?

If not officially supported, is there any known workaround? (e.g. patching eglplatform_wayland.so, tweaking DRI config, or using alternate compositors that are wlroots-based but more compatible?)

I’d appreciate any guidance from the support team or community — I’m comfortable making adjustments in the Yocto build or testing experimental patches if needed.

Thanks!

Hi @Kadir

This is pretty much it.


Have you checked how the weston and qt6-wayland are implemented?
You can check the containers for Torizon, as it contains all the dependencies and libraries.