Black screen after booting sometimes in the Apalis imx8 board

Excellent! The additional environment variables WESTON_USE_G2D=0 and EGL_PLATFORM=drm are helping reduce the frequency of the black screen issue (1). This indicates the problem is related to GPU acceleration and EGL context creation (1).

Current Working Configuration

Your current configuration with these improvements is:

weston:
  image: torizon/weston${GPU}:3
  environment:
    - ACCEPT_FSL_EULA=1
    - WESTON_DISABLE_ATOMIC=1
    - WESTON_USE_G2D=0
    - EGL_PLATFORM=drm
  # ... rest of your configuration

(1)

Additional Optimization Options

Since you’re seeing significant improvement, try adding these additional environment variables to further stabilize the display:

environment:
  - ACCEPT_FSL_EULA=1
  - WESTON_DISABLE_ATOMIC=1
  - WESTON_USE_G2D=0
  - EGL_PLATFORM=drm
  - GALLIUM_DRIVER=etnaviv
  - MESA_LOADER_DRIVER_OVERRIDE=etnaviv

(1)

Monitoring and Recovery Strategy

Since the issue is now much rarer (1 in 36 boots), implement a simple monitoring approach:

1. Container Health Check

Add a health check to your docker-compose.yml (2):

weston:
  # ... your existing configuration
  healthcheck:
    test: ["CMD", "ps", "aux", "|", "grep", "weston"]
    interval: 30s
    timeout: 10s
    retries: 3

(2)

2. Automatic Recovery Script

Create a simple monitoring script that restarts only the Weston container when issues are detected (1):

#!/bin/bash
# Check if weston process is running but no display output
if docker ps --filter "name=weston" --filter "status=running" -q > /dev/null; then
    # If weston is running but display appears black, restart container
    docker restart weston
fi

(1)

Alternative Display Interface

For production automotive systems, consider using the native HDMI interface with the proper device tree overlay (3). The Apalis iMX8 QuadMax supports native HDMI output using the apalis-imx8_hdmi_overlay.dtbo overlay (3), which might be more stable than relying on GPU acceleration.

Long-term Recommendation

Since you’ve reduced the occurrence from ~10% to ~3% of boots, and this is for an automotive application, consider:

  1. Upgrade to Torizon OS 7.x: Newer versions have improved graphics stability (4)
  2. Container restart instead of system reboot: Much faster recovery time for automotive applications (4)
  3. Hardware watchdog: Implement a hardware-level display monitoring solution

The combination of WESTON_USE_G2D=0 and EGL_PLATFORM=drm is forcing software rendering and explicit EGL platform selection, which explains the improved stability (1).

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.