From 187c173e01da0029e3418ae6e8a380e9c36faded Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Wed, 10 Jun 2026 14:29:01 +0000 Subject: [PATCH] fix(headless-kde): restart xdg-desktop-portal after kwin comes up The portal processes bind to the compositor that existed when they started; after a kwin restart the stale instances point at a dead socket and RemoteDesktop/EIS input injection times out ("EIS setup timed out"). Hit live: a fresh session streamed fine but ate no mouse/keyboard until the portals were restarted. Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/headless/run-headless-kde.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/headless/run-headless-kde.sh b/scripts/headless/run-headless-kde.sh index dcb3b94..bba4443 100755 --- a/scripts/headless/run-headless-kde.sh +++ b/scripts/headless/run-headless-kde.sh @@ -34,6 +34,11 @@ kwin_wayland --virtual --width "$W" --height "$H" --no-lockscreen \ KWIN_PID=$! sleep 2 +# The xdg-desktop-portal processes bind to the compositor that existed when THEY started; +# after a kwin restart the stale instances point at a dead socket and RemoteDesktop/EIS +# (mouse/keyboard injection) times out. Restart them against the fresh compositor. +systemctl --user try-restart plasma-xdg-desktop-portal-kde.service xdg-desktop-portal.service 2>/dev/null || true + kbuildsycoca6 >/dev/null 2>&1 || true # rebuild the menu cache under the correct env plasmashell &