Failed to create wl_display

Hello !

I need support with an issue I cannot fix so far.

My configuration is :

Windows 10 (WSL ubuntu 18.04)
Iris v2 + imx8 dualX 1Gb Wifi Bluetooth
7 inch capactive screen from Toradex

What I have done :

  1. Import c++ (qt + qml) source code in VS code, debug it on the iris v2 board + imx8dx using the Torizon installed during the “unboxing” tutorial and a VGA screen → My app is starting with resolution issue (the resolution issue is not the problem)
  2. Then I Connected the toradex 7inch capacitive screen thrhough LVSD connector
  3. I ran the app again from vscode, it is also running/displayed with resolution issue
  4. To fix the resolution issue, I followed the tutorial on device tree overlays, decided to use :
    1. colibri-imx8x_parallel-rgb-lvds_overlay.dtbo
    2. colibri-imx8x_atmel-mxt-connector_overlay.dtbo
    3. display-edt7_overlay.dtbo

I decided to customizee TorizonCore Image, going with torizon-core-docker-colibri-imx8x-Tezi_5.7.0+build.17. I can provide my tcbuild.yaml and the docker-compose.yml used to create the /bundle folder

  1. I deployed the image to the board. I can see the overlays being applied during boot :

Applying Overlay: colibri-imx8x_parallel-rgb-lvds_overlay.dtbo
Applying Overlay: colibri-imx8x_atmel-mxt-connector_overlay.dtbo
Applying Overlay: display-edt7_overlay.dtbo

  1. This is where I am stuck :

Either when I try to debug from vscode or directly on the board (ssh) with the example tutorial (tuto) following commands :

docker run -e ACCEPT_FSL_EULA=1 --rm -it --name=qt5
-v /tmp:/tmp
-v /dev/dri:/dev/dri -v /dev/galcore:/dev/galcore
–device-cgroup-rule=‘c 199:* rmw’ --device-cgroup-rule=‘c 226:* rmw’
torizon/qt5-wayland-examples-vivante:$CT_TAG_QT5_WAYLAND_EXAMPLES_VIVANTE
bash

/usr/lib/aarch64-linux-gnu/qt5/examples/quick/animation/animation &

The following error is displayed :

Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin “wayland” in “” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

The qt5-wayland-vivante:2 container (or qt5-wayland-examples-vivante) is correctly pulled, but when I run it, I cannot not see anything happening which is not normal I guess.

Can you help ?

Many thanks

Hi @jrocher ,

To fix the resolution issue, I followed the tutorial on device tree overlays, decided to use :
colibri-imx8x_parallel-rgb-lvds_overlay.dtbo
colibri-imx8x_atmel-mxt-connector_overlay.dtbo
display-edt7_overlay.dtbo

If you’re using the 7 inch Capacitive Touch Display with TorizonCore 5.7 we recommend using the following DT overlays according to this article: Device Tree Overlays on Torizon | Toradex Developer Center

  • colibri-imx8x_parallel-rgb_overlay.dtbo
  • colibri-imx8x_atmel-mxt-connector_overlay.dtbo
  • display-lt161010_overlay.dtbo

The following error is displayed :
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin “wayland” in “” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Did you start the weston-vivante container before running the QT 5 examples one, as instructed here: Qt on Torizon OS | Toradex Developer Center

The Weston container provides the graphical server in which the QT container needs in order to correctly execute its graphical applications.

See if this helps you.

Best regards,
Lucas Akira

Thank you @lucas_a.tx

Ok for the DT overlays, will use them.

Concerning the weston-vivante container, I started qt5-wayland-vivante:2 , it should also work right ? I think I actually also tried with the weston-vivante one and faced the exact same problem.

Hi @jrocher ,

Concerning the weston-vivante container, I started qt5-wayland-vivante:2 , it should also work right ? I think I actually also tried with the weston-vivante one and faced the exact same problem.

The applications inside qt5-wayland-vivante:2 should only work if weston-vivante:2 is up and running. Just to be sure, try doing the following:

  1. Stop any running containers with docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)

  2. Start weston-vivante:2 with this command:

docker run -e ACCEPT_FSL_EULA=1 -d --rm --name=weston --net=host --cap-add CAP_SYS_TTY_CONFIG \
             -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ \
             --device-cgroup-rule='c 4:* rmw' --device-cgroup-rule='c 13:* rmw' \
             --device-cgroup-rule='c 199:* rmw' --device-cgroup-rule='c 226:* rmw' \
             torizon/weston-vivante:$CT_TAG_WESTON_VIVANTE --developer weston-launch \
             --tty=/dev/tty7 --user=torizon

You should see a graphical desktop-like environment on your display after this command. If that’s not the case, then something is wrong with the Weston container and the QT apps will not work.

  1. Start the qt5-wayland-vivante:2 container as you did before:
docker run -e ACCEPT_FSL_EULA=1 --rm -it --name=qt5 \
           -v /tmp:/tmp \
           -v /dev/dri:/dev/dri -v /dev/galcore:/dev/galcore \
           --device-cgroup-rule='c 199:* rmw' --device-cgroup-rule='c 226:* rmw' \
           torizon/qt5-wayland-examples-vivante:$CT_TAG_QT5_WAYLAND_EXAMPLES_VIVANTE \
           bash
  1. Inside the container, try executing any of the sample applications:
/usr/lib/aarch64-linux-gnu/qt5/examples/quick/animation/animation &

Doing the steps above I was able to run the sample apps without any problems on a Colibri iMX8X with TorizonCore 5.7.0.

See if the error persists when doing the procedures mentioned above.

Best regards,
Lucas Akira

Thank you @lucas_a.tx , I re-installed Torizon from scratch and then I did what you proposed.
All good now

Thank you

Glad I was able to help!

Best regards,
Lucas Akira