c25706b355
Feature A: in Gaming Mode, default to a host-managed gamescope at the CLIENT's mode (tear the TV's autologin down on connect) instead of attaching to the running TV session — so the client receives ITS resolution (capture == encode == client mode, fixing the InitializeEncoder size mismatch the attach path hit), not the TV's 4K. Reliability is the debounce: restore_managed_session() now SCHEDULES the TV restore RESTORE_DEBOUNCE (5s) after the last disconnect via a host-lifetime worker, instead of restoring immediately per-disconnect. A reconnect inside the window cancels the pending restore and reuses the still-warm managed session (create_managed_session clears PENDING_RESTORE at the top) — so a quick reconnect (e.g. a controller hiccup) never triggers a gamescope stop/relaunch, which is the per-connect churn that leaked NVIDIA GPU context on F44 (the black-screen reconnect). - vdisplay/gamescope.rs: PENDING_RESTORE + RESTORE_DEBOUNCE; schedule_restore_tv_session (debounced), do_restore_tv_session (the actual restore, worker-driven), start_restore_worker (100ms tick, RAII keepalive handle). create_managed_session cancels the pending restore + reuse path unchanged. - vdisplay.rs: apply_input_env flips gamescope to managed-DEFAULT; PUNKTFUNK_GAMESCOPE_ATTACH (or an explicit _NODE) opts back to attach for couch-on-TV; _MANAGED forces managed. restore_managed_session schedules; new start_restore_worker wrapper. - m3.rs serve(): hold the restore worker for the host lifetime. - bazzite host.env: document managed-default + the ATTACH opt-out. Compiles, clippy-clean, 78 host tests pass. F44 single stop/start leak to be verified live on the box. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
29 lines
1.4 KiB
Bash
29 lines
1.4 KiB
Bash
# punktfunk host config for Bazzite (~/.config/punktfunk/host.env).
|
|
#
|
|
# The compositor + input backend are AUTO-DETECTED per connect from the ACTIVE session: the host
|
|
# follows the box as you flip between Steam Gaming Mode (gamescope — attached to the running
|
|
# session, no churn) and a KDE/GNOME Desktop (KWin/Mutter virtual output at the client's mode).
|
|
# So nothing here forces a backend — only the trustworthy anchors stay.
|
|
|
|
XDG_RUNTIME_DIR=/run/user/1000
|
|
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
|
|
|
|
PUNKTFUNK_VIDEO_SOURCE=virtual
|
|
|
|
# GPU zero-copy capture (dmabuf -> CUDA -> NVENC). Auto-falls back to CPU if unavailable.
|
|
PUNKTFUNK_ZEROCOPY=1
|
|
|
|
#RUST_LOG=info
|
|
|
|
# --- Optional overrides (default is active-session auto-detection) ---
|
|
# Force a specific backend for testing (skips auto-detect + env retargeting):
|
|
# PUNKTFUNK_COMPOSITOR=kwin|mutter|wlroots|gamescope
|
|
# PUNKTFUNK_INPUT_BACKEND=libei|wlr|gamescope|uinput
|
|
#
|
|
# In Gaming Mode the host MANAGES a gamescope-session-plus at the CLIENT's resolution by default
|
|
# (tears the TV's autologin down on connect; restores it on a debounced idle, reused on a quick
|
|
# reconnect). To instead ATTACH to the running TV session at its own mode (couch-on-TV — gaming
|
|
# stays live on the panel, no Steam restart), set:
|
|
# PUNKTFUNK_GAMESCOPE_ATTACH=1
|
|
# PUNKTFUNK_GAMESCOPE_APP=steam -gamepadui # only for an ad-hoc bare-spawn fallback
|