From a9677966cf57e1bf8926841c79d908b1cb2206ce Mon Sep 17 00:00:00 2001 From: Wanjohi Date: Sun, 25 Oct 2026 13:27:45 +0300 Subject: [PATCH] fix(nescope): give Xwayland the box's GL driver selection --- apps/nescope/src/state.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/nescope/src/state.rs b/apps/nescope/src/state.rs index 4915d636..86fe3bb3 100644 --- a/apps/nescope/src/state.rs +++ b/apps/nescope/src/state.rs @@ -438,7 +438,15 @@ impl NescopeState { let (xwayland, client) = XWayland::spawn( &self.display_handle, display, - std::iter::empty::<(String, String)>(), + // The GL selection the box was given, or Xwayland's glamor cannot + // find a driver for the card, falls back to software, and offers + // no GLX: Steam then dies on glXChooseVisual. + std::env::vars().filter(|(k, _)| { + matches!( + k.as_str(), + "MESA_LOADER_DRIVER_OVERRIDE" | "GALLIUM_DRIVER" | "__GLX_VENDOR_LIBRARY_NAME" + ) + }), true, std::process::Stdio::null(), // XWayland stdout (very noisy) std::process::Stdio::null(), // XWayland stderr (very noisy)