fix(headless-kde): --no-block the portal restart so bring-up isn't blocked ~30s
ci / rust (push) Has been cancelled
ci / rust (push) Has been cancelled
A synchronous systemctl try-restart of the portal chain (xdg-desktop-portal is Type=dbus, waits for its bus name) blocked the script ~30-40s before plasmashell started. --no-block queues the restart and returns immediately — the portal only needs to be ready before the first client streams (seconds later), not before plasmashell. Validated: plasmashell up in 1s (was ~30s); a virtual capture session against the fresh session streamed 720/720 frames @720p120, zero-copy CUDA, no black screen. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -72,7 +72,11 @@ echo "KWin ready."
|
||||
# without it the restarted portal can inherit an empty WAYLAND_DISPLAY), then restart.
|
||||
systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR 2>/dev/null || true
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP DBUS_SESSION_BUS_ADDRESS 2>/dev/null || true
|
||||
systemctl --user try-restart plasma-xdg-desktop-portal-kde.service xdg-desktop-portal-kde.service xdg-desktop-portal.service 2>/dev/null || true
|
||||
# --no-block: queue the restart and return immediately. A synchronous try-restart of the
|
||||
# portal chain blocks bring-up ~30s (xdg-desktop-portal is Type=dbus and waits for its bus
|
||||
# name); the portal only needs to be ready before the FIRST client streams (seconds later,
|
||||
# user-driven), not before plasmashell starts.
|
||||
systemctl --user --no-block try-restart plasma-xdg-desktop-portal-kde.service 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 &
|
||||
|
||||
Reference in New Issue
Block a user