6.6.0 i.mx6 Running Qt application with DRM


with BSP version 5 I run two applications on different framebuffer layers. On top a Qt program with cutout and a video application in the background.

After switching to BSP version 6.6.0 with new kernel, I want to use DRM for that (framebuffer overlay does not exist anymore, I can’t use Weston).

I enabled the eglfs kms integration, but when starting a simple Qt (QML) application, it crashes with this message:

EGL_EXT_device_base missing

When calling eglinfo, I get only this message:

EGL client extensions string:
    EGL_EXT_client_extensions EGL_EXT_platform_base

What could be the problem?

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?

:+1: :-1:


The error message “EGL_EXT_device_base missing” indicates that the required EGL extension is not available on your system. This extension is crucial for enabling hardware acceleration through the Direct Rendering Manager (DRM) in environments where Wayland or X11 is not being used, such as with the eglfs backend in Qt.

Here are some steps to troubleshoot and potentially resolve the issue:

  1. Verify EGL and DRM Support: Ensure that the GPU drivers and EGL libraries in your BSP support DRM and the necessary EGL extensions. For i.MX6 platforms, this typically involves Vivante GPU drivers. Check if there are updates or patches available for these drivers that include support for the required extensions.

  2. Qt Configuration: Make sure your Qt environment is correctly set up to use the eglfs backend. You might need to explicitly specify the backend when launching your application, using the -platform eglfs argument. Additionally, verify that your Qt build includes the eglfs module and it’s configured to use DRM/KMS.

  3. Kernel Configuration: The kernel must be configured with DRM support enabled. This includes enabling the Direct Rendering Manager (DRM) and the specific DRM driver for your GPU. For the i.MX6, this would typically be the etnaviv DRM driver. Check your kernel configuration (/proc/config.gz or the kernel config file) to ensure these options are enabled.

  4. Debugging EGL: Use tools like eglinfo to check the available EGL configurations and extensions. Since you mentioned eglinfo only shows limited extensions, this might indicate an issue with the EGL implementation or initialization. Ensure that the EGL libraries used by eglinfo and your Qt application are the ones provided with your BSP or GPU drivers.

  5. Environment Variables: Some GPU drivers require specific environment variables to be set for DRM/EGL to work correctly. For example, setting EGL_PLATFORM=drm can force EGL to use DRM. Check the documentation for your GPU drivers for any such requirements.

  6. Update Qt: If you’re not using the latest version of Qt supported by your BSP, consider updating. Newer versions of Qt have improved support for various backends and might include fixes for issues like the one you’re encountering.

If after following these steps the issue persists, it might be necessary to delve deeper into the specific GPU driver and EGL library implementation on your system. Since direct modifications to hardware or low-level driver code are beyond the scope of this support,

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

2D/3D Graphics Acceleration (GPU) | Toradex Developer Center.

Hi @sst

Thanks for contacting us. Can you give us some more information about the software you are using? Did you build the image on your own or use the multimedia image we provided?

Further, can you check if the display is working properly? Can you provide us the output of the following commands:

find /sys/class/drm/
for status in /sys/class/drm/card*-*; do echo $status; cat $status/status; done
wget https://raw.githubusercontent.com/toradex/tdx-info/master/tdx-info --output-document=tdx-info && sh ./tdx-info

You also have to have a kms configuration file in your file system. You can set it via QT_QPA_EGLFS_KMS_CONFIG. The options and how it has too look like is written in this article:

It should look something like this, depending on the display you use (/etc/kms.config):

  "device": "/dev/dri/card0",
      "name": "HDMI1",
      "mode": "1920x1080"

Before you start the application you might also want to increase the log level as follows:

export QT_LOGGING_RULES=qt.qpa.*=true
export QT_QPA_EGLFS_KMS_CONFIG=/etc/kms.config
export QT_QPA_PLATFORM=eglfs