From c0d042e9533d12e95152a893944168bef61fc0f3 Mon Sep 17 00:00:00 2001 From: Isaac Hermida Date: Fri, 27 Mar 2026 14:16:30 +0100 Subject: [PATCH] dey-image-container: webkit/lvgl: modify weston startup Standalone GPU and video tests perform as expected in the WebKit container, but rendering degrades once Cog runs on top of Weston. Align the container Weston startup with the native setup by loading the default Weston options, enabling the systemd-notify module and exporting WL_EGL_GBM_FENCE=0 before starting the compositor. https://onedigi.atlassian.net/browse/DEL-10038 https://onedigi.atlassian.net/browse/DEL-10039 Signed-off-by: Isaac Hermida --- .../lvgl/rootfs_files/start-lvgl-demo.sh | 19 +++++++++++++++++-- .../webkit/rootfs_files/start-webkit-demo.sh | 19 +++++++++++++++++-- .../images/dey-image-container.bb | 7 ++++++- 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/meta-digi-containers/containers/lvgl/rootfs_files/start-lvgl-demo.sh b/meta-digi-containers/containers/lvgl/rootfs_files/start-lvgl-demo.sh index a5937890d..734b49749 100644 --- a/meta-digi-containers/containers/lvgl/rootfs_files/start-lvgl-demo.sh +++ b/meta-digi-containers/containers/lvgl/rootfs_files/start-lvgl-demo.sh @@ -2,6 +2,16 @@ export XDG_RUNTIME_DIR="/run/user/0" export WAYLAND_DISPLAY="@WAYLAND_DISPLAY@" +COMPATIBLE="$(tr '\0' ' ' /dev/null || true)" + +case "${COMPATIBLE}" in + *digi,ccmp15*|*digi,ccmp25*) + export WL_EGL_GBM_FENCE=0 + ;; +esac + +[ -f /etc/default/weston ] && . /etc/default/weston + rm -rf "$XDG_RUNTIME_DIR" mkdir -p "$XDG_RUNTIME_DIR" chmod 0700 "$XDG_RUNTIME_DIR" @@ -13,7 +23,12 @@ chmod 1777 /tmp/.X11-unix rm -f /tmp/weston.log -weston --backend=drm-backend.so --idle-time=0 --log=/tmp/weston.log & +weston \ + --backend=drm-backend.so \ + --modules=systemd-notify.so \ + --idle-time=0 \ + --log=/tmp/weston.log \ + ${OPTARGS} & while :; do if [ -S "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}" ]; then @@ -23,4 +38,4 @@ while :; do done sleep 0.1 -exec /usr/bin/lvgl-demo \ No newline at end of file +exec /usr/bin/lvgl-demo diff --git a/meta-digi-containers/containers/webkit/rootfs_files/start-webkit-demo.sh b/meta-digi-containers/containers/webkit/rootfs_files/start-webkit-demo.sh index d5b758483..a562c5bf5 100644 --- a/meta-digi-containers/containers/webkit/rootfs_files/start-webkit-demo.sh +++ b/meta-digi-containers/containers/webkit/rootfs_files/start-webkit-demo.sh @@ -2,6 +2,16 @@ export XDG_RUNTIME_DIR="/run/user/0" export WAYLAND_DISPLAY="@WAYLAND_DISPLAY@" +COMPATIBLE="$(tr '\0' ' ' /dev/null || true)" + +case "${COMPATIBLE}" in + *digi,ccmp15*|*digi,ccmp25*) + export WL_EGL_GBM_FENCE=0 + ;; +esac + +[ -f /etc/default/weston ] && . /etc/default/weston + rm -rf "$XDG_RUNTIME_DIR" mkdir -p "$XDG_RUNTIME_DIR" chmod 0700 "$XDG_RUNTIME_DIR" @@ -13,7 +23,12 @@ chmod 1777 /tmp/.X11-unix rm -f /tmp/weston.log -weston --backend=drm-backend.so --idle-time=0 --log=/tmp/weston.log & +weston \ + --backend=drm-backend.so \ + --modules=systemd-notify.so \ + --idle-time=0 \ + --log=/tmp/weston.log \ + ${OPTARGS} & while :; do if [ -S "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}" ]; then @@ -33,4 +48,4 @@ done /etc/connectcore-demo-example-webkit start # We need a process waiting indefinetily, if not the "init" process dies # and there is not any remaining process -exec /usr/bin/docker-init -- sleep infinity \ No newline at end of file +exec /usr/bin/docker-init -- sleep infinity diff --git a/meta-digi-containers/recipes-core/images/dey-image-container.bb b/meta-digi-containers/recipes-core/images/dey-image-container.bb index e92745640..f918b07aa 100644 --- a/meta-digi-containers/recipes-core/images/dey-image-container.bb +++ b/meta-digi-containers/recipes-core/images/dey-image-container.bb @@ -99,7 +99,11 @@ IMAGE_INSTALL = " \ # Container type customizations LVGL ######################## CONTAINER_INIT_SCRIPT:container-lvgl = "/start-lvgl-demo.sh" -IMAGE_INSTALL:append:container-lvgl = " lvgl-demo weston" +IMAGE_INSTALL:append:container-lvgl = " \ + lvgl-demo \ + weston \ + weston-init \ +" DISTRO_FEATURES:remove:container-lvgl = " wayland" ######################## @@ -123,4 +127,5 @@ IMAGE_INSTALL:append:container-webkit = " \ wayland \ wayland-protocols \ weston \ + weston-init \ "