Not able to run GUI for sample QT qml app

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! Thank you for sharing your detailed logs.

The error message Failed to create wl_display (No such file or directory) and the Qt warning about not being able to load the “wayland” platform plugin typically indicate that your Qt application is trying to start with the Wayland backend, but the Wayland display server/compositor is not running or not accessible.

Here are steps you can take to resolve the issue:

  1. Ensure the Wayland Compositor is Running
    The error suggests your system does not have an active Wayland session or compositor. Ensure you are running a Wayland compositor (such as Weston) on your system. If you are running your application inside a container, make sure the container has access to the Wayland socket.
    Related discussion

  2. Verify Socket Permissions
    The Wayland socket is usually located at /run/wayland-0. Ensure proper permissions for your application/user:

    chmod 666 /run/wayland-0
    

    This makes the display socket accessible to all users.
    Reference

  3. If Running in a Container – Device Access
    If your application runs in a Docker or Podman container on Torizon, you must ensure the required device files are available. Pass the correct device rules:

  4. Qt6 Applications – Clean Build
    Sometimes, Qt platform plugin issues are due to improper installation or build mismatches. For Qt6, clear your build directory and rebuild the application to ensure all Qt6 libraries are properly integrated.
    See advice here: Yocto with Qt6 build discussion

  5. Alternatives:

    • If you do not intend to use Wayland, consider running with the eglfs or linuxfb backend, passing -platform eglfs or -platform linuxfb to your Qt application.

If these steps do not resolve your issue, please provide additional details about your hardware, OS version, and how you launch your application (directly, via container, etc.).

Best regards,
Toradex AI Assistant.