fix(host): stop force-disabling zero-copy on Mutter+NVIDIA by default
apply_session_env unconditionally forced PUNKTFUNK_FORCE_SHM=1 for every GNOME/Mutter session, added 2026-06-14 after a same-day stale-frame bug hunt found Mutter has no implicit dmabuf fence on NVIDIA. That override silently contradicted the documented "zero-copy is on by default for all Linux GPU backends" behavior and left Mutter+NVIDIA hosts on the slower CPU/SHM path unconditionally, with no way to opt back in. Live retesting (192.168.1.21, RTX 5070 Ti, real client with cursor movement/window drag/typing — the historical trigger) shows no visible staleness with the override removed. Drop the automatic force; PUNKTFUNK_FORCE_SHM stays as a manual escape hatch for anyone who does hit flashing/stale frames on a Mutter+NVIDIA host. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1278,9 +1278,13 @@ mod pipewire {
|
||||
} else {
|
||||
None
|
||||
};
|
||||
// PUNKTFUNK_FORCE_SHM=1 forces the race-free download path (SHM, no dmabuf) — required on
|
||||
// Mutter+NVIDIA where dmabuf capture has no working sync and shows stale frames. KWin/
|
||||
// gamescope don't need it (they blit into the buffer, so no read-before-render race).
|
||||
// PUNKTFUNK_FORCE_SHM=1 forces the race-free download path (SHM, no dmabuf) — a manual
|
||||
// escape hatch, mainly for Mutter+NVIDIA: that combo has no implicit dmabuf fence, so
|
||||
// zero-copy capture can in principle race the compositor's render and show stale frames.
|
||||
// Zero-copy is the Mutter+NVIDIA default (no unconditional override) since live retesting
|
||||
// found no visible staleness; set this if you do see flashing/stale content on such a
|
||||
// host. KWin/gamescope don't need it (they blit into the buffer, so no read-before-render
|
||||
// race).
|
||||
let force_shm = std::env::var("PUNKTFUNK_FORCE_SHM").as_deref() == Ok("1");
|
||||
// VAAPI zero-copy passthrough: zero-copy on, no EGL→CUDA importer (any non-NVIDIA host), and
|
||||
// the encoder backend is VAAPI → hand the raw dmabuf to the encoder (it imports + GPU-CSCs).
|
||||
|
||||
Reference in New Issue
Block a user