Help Needed: Running Weston on Raspberry Pi 4 with TorizonCore

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


It looks like you’re encountering an issue with running the Weston container on a Raspberry Pi 4 with TorizonCore. The error message indicates that Weston is having trouble opening a device, which is likely related to the GPU or DRM (Direct Rendering Manager) setup.

Here are a few steps you can take to troubleshoot and potentially resolve the issue:

  1. Check Device Permissions:
    Ensure that the /dev/dri devices have the correct permissions. The Docker command you provided includes the necessary device-cgroup-rules, but double-check that the devices are accessible.

  2. Verify Weston Configuration:
    The weston.ini file you provided seems mostly correct, but there might be an issue with the output section. Try specifying the correct output name. Based on your ls /sys/class/drm output, it looks like card0-HDMI-A-1 should be the correct name. Update your weston.ini as follows:

    [output]
    name=card0-HDMI-A-1
    transform=rotate-270
    
  3. Use Correct Docker Image:
    Ensure that you are using the correct Weston Docker image for the Raspberry Pi 4. The image torizon/weston-vivante:3 is typically used for NXP i.MX-based modules. For the Raspberry Pi 4, you might need a different image. Try using torizon/weston:2 instead:

    docker run -e ACCEPT_FSL_EULA=1 -e IGNORE_X_LOCKS=1 --rm --name=weston \
    --net=host --cap-add CAP_SYS_TTY_CONFIG -v /home/torizon/weston/:/etc/xdg/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' \
    --privileged torizon/weston:2 weston-launch
    
  4. Check Kernel and Firmware:
    Ensure that the kernel and firmware on your Raspberry Pi 4 are up to date. Sometimes, issues with DRM and GPU can be resolved by updating the kernel and firmware.

  5. Review Logs for More Details:
    The error logs indicate that the device could not be opened. Check the full logs for any additional details that might provide more context. You can also try running Weston with increased verbosity to get more detailed logs:

    docker run -e ACCEPT_FSL_EULA=1 -e IGNORE_X_LOCKS=1 --rm --name=weston \
    --net=host --cap-add CAP_SYS_TTY_CONFIG -v /home/torizon/weston/:/etc/xdg/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' \
    --privileged torizon/weston:2 weston-launch --debug
    
  6. Consult Documentation and Community:
    If the above steps do not resolve the issue, consult the Torizon documentation and community forums for additional guidance. There might be specific configurations or known issues related to running Weston on a Raspberry Pi 4.

If you continue to experience issues, please provide any additional error messages or logs that might help in diagnosing the problem further.

Please, also check if these links can help you solve your problem:

/dev/fb0 imx8 plus.