forked from unom/punktfunk
fix(host): a host with no host.env streams a screen, not a test pattern
`PUNKTFUNK_VIDEO_SOURCE` had no default, and unset fell through to the synthetic
test pattern. That was invisible while the systemd unit made host.env mandatory —
you could not start the host without the file, and every copy of the file sets
`virtual`. Now that the unit treats host.env as optional (020306b5), unset is
reachable, and a packaged Linux install with no host.env would serve a test
pattern to Moonlight clients.
Default it to `virtual`, the flagship per-client virtual output — which is what
every setter in the tree already says: packaging/bazzite/host.env,
packaging/kde/host.env, both host.env.example files, the host.env the Windows
installer generates, and scripts/bench/gpu-stream.sh. Nothing sets `synthetic`
and nothing relied on unset. `synthetic` stays reachable by naming it, since any
unrecognised value lands in that arm.
Only one of the three readers changes behaviour: stream.rs's
`== Some("virtual")` now matches when the variable is absent. gamestream/mod.rs
already folded None and Some("virtual") into the same `_` arm for the HDR
capability probe, and rtsp.rs only tests for `portal`.
The native punktfunk/1 plane never read this — it always builds a virtual
display — so this only ever affected GameStream/Moonlight sessions.
host.env.example's header no longer claims this key is the one non-optional
setting; the file is now overrides only, and the host runs without it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
# YOU BARELY NEED THIS FILE. The host AUTO-DETECTS the live session per connect — which compositor
|
||||
# is running (KWin / Mutter / sway / Hyprland / gamescope), its Wayland socket, session bus, and the
|
||||
# matching input backend — and FOLLOWS the box when it switches between a desktop and Steam Gaming
|
||||
# Mode, even mid-stream. Everything below except PUNKTFUNK_VIDEO_SOURCE is an optional override.
|
||||
# Mode, even mid-stream. EVERYTHING below is an optional override — the host runs with sane
|
||||
# defaults if this file does not exist at all (its systemd unit no longer requires it).
|
||||
#
|
||||
# Two rules that save debugging sessions:
|
||||
# * Keys are CASE-SENSITIVE. `punktfunk_gamescope_attach=1` sets nothing — use the exact
|
||||
@@ -13,9 +14,10 @@
|
||||
# Mode mid-stream then kills the stream instead of being followed), and stale session vars
|
||||
# point detection at dead sockets. Those knobs are for CI and dedicated appliances (below).
|
||||
|
||||
# Video source: `virtual` creates a per-client virtual output at the client's exact
|
||||
# resolution+refresh (the flagship mode); `portal` captures an existing monitor.
|
||||
PUNKTFUNK_VIDEO_SOURCE=virtual
|
||||
# Video source (GameStream/Moonlight sessions only): `virtual` creates a per-client virtual
|
||||
# output at the client's exact resolution+refresh (the flagship mode, and the default);
|
||||
# `portal` captures an existing monitor.
|
||||
#PUNKTFUNK_VIDEO_SOURCE=virtual
|
||||
|
||||
# GPU zero-copy capture (dmabuf → CUDA → NVENC / VAAPI / Vulkan) is ON by default and falls back to
|
||||
# CPU automatically. No need to set it. Set to 0 only to force the CPU path.
|
||||
|
||||
Reference in New Issue
Block a user