Weston-imx95 egl initialization error on Verdin iMX95 EVK board

Hello,

We are evaluating the iMX95 Verdin EVK 1.3 board and ran into an issue trying to launch the weston-imx95:4 docker container. The steps we did are the following:

  1. Built the torizon-docker OS image following the guidelines
  2. Flashed the image onto the board
  3. Created the following docker-compose file to launch weston:
services:
  weston:
    image: torizon/weston-imx95:4
    container_name: weston
    environment:
      - ACCEPT_FSL_EULA=1
    network_mode: host
    cap_add:
      - CAP_SYS_TTY_CONFIG
    volumes:
      - type: bind
        source: /tmp
        target: /tmp
      - type: bind
        source: /dev
        target: /dev
      - type: bind
        source: /run/udev
        target: /run/udev
    device_cgroup_rules:
      - 'c 4:0 rmw'
      - 'c 4:1 rmw'
      - 'c 4:7 rmw'
      - 'c 13:* rmw'
      - 'c 226:* rmw'
      - 'c 199:0 rmw'
      - 'c 253:* rmw'

When running docker compose up, the weston container fails with a egl initialization error:

Attaching to weston
weston  | Switching VT tty7 to text mode if currently in graphics mode
weston  | Switching to VT 7
weston  | SoC is: 'i.MX95'
weston  | SoC has GPU: true
weston  | SoC has DPU: true
weston  | Removing previously created '.X*-lock' entries under /tmp before starting Weston. Pass 'IGNORE_X_LOCKS=1' environment variable to Weston container to disable this behavior.
weston  | dos2unix: converting file /etc/xdg/weston/weston.ini to Unix format...
weston  | dos2unix: converting file /etc/xdg/weston-dev/weston.ini to Unix format...
weston  | 00:00:00.000 [INFO] [seatd/seat.c:39] Created VT-bound seat seat0
weston  | 00:00:00.000 [INFO] [seatd/seatd.c:194] seatd started
weston  | Date: 2025-09-24 UTC
weston  | [15:54:16.038] weston 12.0.4
weston  |                https://wayland.freedesktop.org
weston  |                Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
weston  |                Build: 12.0.4
weston  | [15:54:16.039] Command line: weston -Bdrm-backend.so -Swayland-0
weston  | [15:54:16.039] OS: Linux, 6.6.52-lts-next-ge0f9e2afd4cf, #1-Torizon SMP PREEMPT Tue Nov 19 23:01:49 UTC 2024, aarch64
weston  | [15:54:16.039] Flight recorder: enabled
weston  | [15:54:16.039] Using config file '/etc/xdg/weston/weston.ini'
weston  | [15:54:16.040] Output repaint window is 7 ms maximum.
weston  | [15:54:16.040] Loading module '/usr/lib/aarch64-linux-gnu/libweston-12/drm-backend.so'
weston  | [15:54:16.059] initializing drm backend
weston  | [15:54:16.059] Trying libseat launcher...
weston  | 00:00:00.036 [INFO] [seatd/server.c:145] New client connected (pid: 28, uid: 1000, gid: 1000)
weston  | 00:00:00.036 [INFO] [seatd/seat.c:170] Added client 7 to seat0
weston  | 00:00:00.036 [INFO] [seatd/seat.c:480] Opened client 7 on seat0
weston  | [15:54:16.060] [libseat/libseat.c:73] Seat opened with backend 'seatd'
weston  | [15:54:16.060] [libseat/backend/seatd.c:212] Enabling seat
weston  | [15:54:16.060] libseat: session control granted
weston  | [15:54:16.063] using /dev/dri/card0
weston  | [15:54:16.063] DRM: supports atomic modesetting
weston  | [15:54:16.063] DRM: supports GBM modifiers
weston  | [15:54:16.063] DRM: does not support async page flipping
weston  | [15:54:16.063] DRM: supports picture aspect ratio
weston  | [15:54:16.064] failed to initialize egl
weston  | 00:00:00.040 [INFO] [seatd/seat.c:418] No clients on seat0 to activate
weston  | 00:00:00.041 [INFO] [seatd/seat.c:524] Closed client 7 on seat0
weston  | 00:00:00.041 [INFO] [seatd/seat.c:192] Removed client 7 from seat0
weston  | 00:00:00.041 [INFO] [seatd/client.c:471] Client disconnected
weston  | [15:54:16.065] fatal: failed to create compositor backend
weston  | Internal warning: debug scope 'drm-backend' has not been destroyed.
weston  | 00:00:00.062 [INFO] [seatd/seatd.c:218] seatd stopped
weston  | Switching back to vt 7

We’ve seen a somewhat similar issue discussed here, but the log in that other one at least showed some EGL initialization steps, in our case there are none.

Any help appreciated.

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:


Weston EGL Initialization Issue on iMX95 Verdin EVK

The EGL initialization failure you’re experiencing with the torizon/weston-imx95:4 container is likely related to GPU driver access or configuration issues. Here are several troubleshooting steps to resolve this:

1. Verify Display Connection

First, ensure you have a display connected to your iMX95 Verdin EVK before starting Weston (1). The container may fail to initialize EGL properly without a connected display.

2. Check Container Configuration

Your Docker Compose configuration looks mostly correct, but you may need to add additional device access rules. Based on the Weston documentation, try adding these device cgroup rules (2):

device_cgroup_rules:
  - 'c 4:* rmw'
  - 'c 13:* rmw'
  - 'c 199:* rmw'
  - 'c 226:* rmw'
  - 'c 253:* rmw'

3. Force Display Connection (if needed)

If you’re running without a physical display connected, you can force the connector state as described in the documentation (1):

echo on > /sys/class/drm/card0-HDMI-A-1/status

Replace card0-HDMI-A-1 with the appropriate connector for your setup.

4. Try Alternative Weston Launch Command

You can also try launching Weston directly with Docker run to isolate the issue (2):

docker run -e ACCEPT_FSL_EULA=1 -d --rm --name=weston \
    -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' \
    --device-cgroup-rule='c 253:* rmw' --cap-add CAP_SYS_TTY_CONFIG \
    --net=host torizon/weston-imx95:4

5. Check GPU Device Access

Verify that the GPU devices are properly accessible:

ls -la /dev/dri/
ls -la /dev/galcore

The container needs access to these devices for EGL initialization.

6. Configuration File Customization

If the issue persists, you may need to customize the Weston configuration. The documentation explains how to bind mount a custom weston.ini file (3):

volumes:
  - /path/to/your/weston.ini:/etc/xdg/weston/weston.ini

7. Verify Torizon OS Build

Since you built a custom Torizon OS image for iMX95, ensure that all necessary GPU drivers and libraries are included in your build. The iMX95 support may require specific kernel modules and userspace libraries that need to be properly configured in your Yocto build.

The “failed to initialize egl” error typically indicates that the EGL/OpenGL ES drivers are not properly loaded or accessible to the container, which is often related to device permissions or missing driver components.

Best regards, Toradex AI Assistant.

Hi @sergefr

Just to confirm, which board are you using?

I’m asking this because knowing the correct machine is a common point of confusion for iMX95.

Hi @allan.tx , it’s the first one - imx95-19x19-verdin

To be transparent on this.

The software support for the iMX95 EVK is limited due to our focus on supporting the upcoming Toradex SoMs that will be available to purchase in volume, and which will be equipped with the i.MX95 B0 silicon revision, such as Verdin iMX95, Aquila iMX95, and SMARC iMX95. Hardware accelerated graphical containers (like Weston) will only be guaranteed to work on these, and they may or not work on the EVK.

For the time-being there are some options if you just want to see Weston run in a container.

You could try to use the weston:4 container image instead of torizon/weston-imx95:4. This is an upstream variant that may work on the i.MX95 EVK. However, if it does work it will be with software rendering instead of using the system’s GPU.

Alternatively, one could try to build the downstream Weston from NXP inside a container. Though this may require some effort as typically the downstream Weston has particular build constraints and requirements.

That said, I do encourage you to look into this topic again when we have official support for graphical containers on other i.MX95 based Toradex modules.

Best Regards,
Jeremias

1 Like

Ok, thanks. We will give it a quick try, but otherwise wait for the upcoming new products.

Thank you for your understanding regarding this.

Best Regards,
Jeremias