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?

Running LVGL Applications on Torizon OS
The issue you’re experiencing is related to the Wayland compositor (Weston) not being available when your LVGL application tries to run. LVGL applications on Torizon OS require Weston to be running first to provide the graphical environment.
Prerequisites for LVGL on Torizon OS
Before running LVGL applications, you need (1):
- A Toradex System on Module with Torizon OS installed
- Understanding of GUI Overview
- Reading and understanding of Debian Containers for Torizon
- Awareness about Torizon OS Containers Tags and Versioning
Solution: Using Docker Compose
The recommended approach is to use Docker Compose to manage both Weston and your LVGL application containers together. This ensures Weston starts before your application (2).
Example Docker Compose Structure
Your docker-compose.yaml should include both services (2):
services:
weston:
# Weston container configuration
your-lvgl-app:
depends_on:
- weston
# Your LVGL application configuration
Starting Weston Container
First, you need to start the Weston Wayland compositor. For different hardware platforms, use the appropriate commands (3):
For i.MX8 modules:
# docker run -e ACCEPT_FSL_EULA=1 -d --rm --name=weston \
-v /dev/dri:/dev/dri -v /dev/galcore:/dev/galcore -v /tmp:/tmp \
--device-cgroup-rule='c 199:* rmw' --device-cgroup-rule='c 226:* rmw' \
--device-cgroup-rule="c 4:* rmw" --device-cgroup-rule="c 13:* rmw" \
--device-cgroup-rule="c 199:0 rmw" --device-cgroup-rule="c 10:223 rmw" \
torizon/weston-imx8:4 \
--developer
For AM62 modules:
# docker run -d --rm --name=weston \
-v /dev/dri:/dev/dri -v /tmp:/tmp \
--device-cgroup-rule='c 226:* rmw' \
--device-cgroup-rule="c 4:* rmw" --device-cgroup-rule="c 13:* rmw" \
--device-cgroup-rule="c 199:0 rmw" --device-cgroup-rule="c 10:223 rmw" \
torizon/weston-am62:4 \
--developer
Using VS Code Torizon IDE Extension
You can start using LVGL on Torizon with the VS Code Torizon IDE Extension directly, which provides an out-of-the-box experience (1).
The extension provides ready-to-use LVGL templates as starting points from the VS Code Torizon Templates repository (1).
Key Documentation Resources
For comprehensive guidance on LVGL development with Torizon OS, refer to the detailed guide available at the LVGL documentation, which explains how to create a Docker image with LVGL and deploy a demo application on any Toradex device running Torizon OS (1).
Communication Between Containers
Weston creates a Unix socket file so graphical client applications can communicate with it (typically in the /tmp/1000-runtime-dir directory). By bind mounting /tmp into your LVGL application container, your application can access the Wayland compositor despite being in separate containers (4).
Troubleshooting Tips
- Ensure Weston is running first - Your LVGL application depends on Weston being available
- Check container dependencies - Use
depends_on in your docker-compose file
- Verify volume mounts - Make sure
/tmp is properly mounted between containers
- Check device permissions - Ensure proper device-cgroup-rules are set
The key is understanding that LVGL applications on Torizon OS work as Wayland clients that communicate with the Weston compositor through shared volumes and Unix sockets.
Best regards, Toradex AI Assistant.