diff --git a/docs/session-aware-host-followups.md b/docs/session-aware-host-followups.md index ae34be2..39237a4 100644 --- a/docs/session-aware-host-followups.md +++ b/docs/session-aware-host-followups.md @@ -8,10 +8,20 @@ backend in place without a reconnect. Live-validated on the Bazzite F44 box (`bazzite-deck-nvidia:testing`, RTX 4090): Desktop KDE at 5120×1440 + input; Gaming managed at 5120×1440; warm-session reuse on quick reconnect; Feature B -video-switch both directions. The items below are **deliberately parked** — they have workarounds -and/or are F44-specific. +video-switch both directions. -## High priority +## Resolved (2026-06-15, `3363576`) + +- **#2 — mid-stream-switch input** ✅ `vdisplay::settle_desktop_portal()` pushes the live session env + into the systemd/D-Bus activation environment and restarts the KWin portal on a switch, so input + lands without a reconnect. Validated live: `settled desktop portal env … compositor=kwin` → + `libei: portal granted devices` → `device RESUMED` on a Gaming→Desktop mid-stream switch. +- **#3 — KWin/Mutter virtual output primary** ✅ `apply_session_env` defaults + `PUNKTFUNK_KWIN_VIRTUAL_PRIMARY` / `PUNKTFUNK_MUTTER_VIRTUAL_PRIMARY` on for the auto desktop path. + Validated live: `KWin: streamed output set as the sole desktop also_disabled=["HDMI-A-1"]` — panels + now render on the streamed screen. + +## Still parked ### 1. F44 gamescope teardown corrupts the GPU context Every gamescope teardown on this box (stop the autologin on connect; stop the managed session on @@ -31,26 +41,7 @@ but don't eliminate it. Options, in order of preference: connected (the autologin is never restored; return to gaming manually). - Upstream gamescope/driver fix. -### 2. Mid-stream-switch input (Gaming→Desktop) is flaky until a reconnect -After a mid-stream switch to a desktop, pointer/keyboard often don't land until a disconnect+reconnect. -Root cause: on the switch the host opens the KDE `RemoteDesktop` **portal** immediately, but the -portal is a D-Bus-activated service that reads the **systemd `--user` activation environment**, which -hasn't settled to the new session yet — so the portal session is created against a half-stale env. It -*accepts* events (no error, so the injector's reopen-on-failure never fires) but they don't reach -KDE. The host log even shows `libei: portal granted devices` + `device RESUMED`, yet input is dead. -**Workaround: reconnect once after switching** (re-opens the portal against the settled env → works). -Fix: on a session switch, push the new session env into the systemd/D-Bus activation environment -before reopening input — `systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -DBUS_SESSION_BUS_ADDRESS` + `dbus-update-activation-environment` (exactly what a fresh KDE login does; -see `scripts/headless/run-headless-kde.sh:118-119`) — and/or delay/retry the input reopen until the -portal is settled. - -### 3. KWin virtual output is not set as primary -The KWin virtual output isn't marked the primary display, so KDE panels / primary-screen content can -stay on the (now-absent) original output instead of the streamed virtual screen. Follow-up: set the -virtual output primary on create — `vdisplay/kwin.rs` already reads `PUNKTFUNK_KWIN_VIRTUAL_PRIMARY`; -make it default-on (or always promote the new output to primary via the KWin/kscreen API) so the -streamed screen is the primary desktop. +(#2 mid-stream-switch input and #3 virtual-output-primary are **resolved** — see the Resolved section above.) ## Lower priority / polish