From 3e203ce3edeab68d23aad0ceb759911292efe89f Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Sun, 12 Apr 2026 16:01:40 -0500 Subject: [PATCH] Update launch_chffrplus.sh --- launch_chffrplus.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/launch_chffrplus.sh b/launch_chffrplus.sh index d14fb3622..85cc4bc4e 100755 --- a/launch_chffrplus.sh +++ b/launch_chffrplus.sh @@ -76,6 +76,20 @@ function agnos_init { if [ "$COLOR_CAL_UPDATED" = "1" ] && systemctl is-active --quiet weston.service; then sudo systemctl restart weston.service + + # Weston can recreate wayland-0 as root on service restart before weston-ready + # fixes ownership. Repair it here so the Qt UI can always reconnect. + if [ -d /var/tmp/weston ]; then + for _ in $(seq 1 50); do + if [ -S /var/tmp/weston/wayland-0 ]; then + sudo chown -R comma:comma /var/tmp/weston 2>/dev/null || true + sudo chmod -R 700 /var/tmp/weston 2>/dev/null || true + SOCKET_OWNER="$(stat -c '%U:%G' /var/tmp/weston/wayland-0 2>/dev/null || true)" + [ "$SOCKET_OWNER" = "comma:comma" ] && break + fi + sleep 0.1 + done + fi fi # Check if AGNOS update is required