From 617c1a577aecb571500b92695bd850d26d762c7b Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Mon, 5 Sep 2022 23:45:32 -0600 Subject: [PATCH] steam: Disable udev-based joystick discovery for SDL2 Fixes #101281. (cherry picked from commit b84625ee73c35f5a6739ec6d05beb0abdae782ef) --- pkgs/games/steam/fhsenv.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix index 9db8d857f6fd..c5a4d3cbfe40 100644 --- a/pkgs/games/steam/fhsenv.nix +++ b/pkgs/games/steam/fhsenv.nix @@ -224,6 +224,14 @@ in buildFHSUserEnv rec { export TZ="$new_TZ" fi fi + + # udev event notifications don't work reliably inside containers. + # SDL2 already tries to automatically detect flatpak and pressure-vessel + # and falls back to inotify-based discovery [1]. We make SDL2 do the + # same by telling it explicitly. + # + # [1] + export SDL_JOYSTICK_DISABLE_UDEV=1 '' + extraProfile; runScript = writeScript "steam-wrapper.sh" ''