From 0f5d234ee035c6d1b05ee9f133f8686b3ff232dc Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Mon, 14 Sep 2026 21:35:15 +0200 Subject: [PATCH] Pass SDL_JOYSTICK_HIDAPI_LG4FF=0 to Steam so the G29 keeps force feedback SDL3's HIDAPI lg4ff driver advertises an effect-status query it cannot answer; BeamNG.drive 0.39 native treats the failed query as a dead effect and the wheel goes limp (12k "Failed to get joystick3 FFB effect status" lines per session). Steam's environment on this box is exactly this allowlist, so the hint has to live here, not in /etc/environment. The narrow hint only demotes the Logitech wheel to the kernel driver; gamepads keep HIDAPI (rumble, LEDs over Bluetooth). Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01SS8M5wk88nJTXxDWz61KKk --- steam_backlog_enforcer/_desktop_env.py | 7 +++++++ steam_backlog_enforcer/tests/test_desktop_env.py | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/steam_backlog_enforcer/_desktop_env.py b/steam_backlog_enforcer/_desktop_env.py index e5fd8cc..673d815 100644 --- a/steam_backlog_enforcer/_desktop_env.py +++ b/steam_backlog_enforcer/_desktop_env.py @@ -77,6 +77,13 @@ def desktop_env_args(user: str, uid: int) -> list[str]: # Steam still keeps its own logs/console-linux.txt; this only stops # the copy into journald. "SRT_LOGGER_USE_JOURNAL=0", + # SDL3's HIDAPI lg4ff driver has no effect-status query; BeamNG 0.39 + # native treats the failed query as a dead effect and the G29 goes + # limp (12k "Failed to get joystick3 FFB effect status" lines per + # session). Narrow hint so gamepads keep HIDAPI (rumble/LEDs); only + # the Logitech wheel falls back to the kernel driver. Name verified + # against BeamNG's SDL 3.4.12 strings, 2026-09-14. + "SDL_JOYSTICK_HIDAPI_LG4FF=0", ] diff --git a/steam_backlog_enforcer/tests/test_desktop_env.py b/steam_backlog_enforcer/tests/test_desktop_env.py index ac5e1c6..dc05238 100644 --- a/steam_backlog_enforcer/tests/test_desktop_env.py +++ b/steam_backlog_enforcer/tests/test_desktop_env.py @@ -65,6 +65,16 @@ class TestDesktopEnvArgs: args = desktop_env_args("bob", 1000) assert _env_value(args, "SRT_LOGGER_USE_JOURNAL") == "0" + def test_logitech_wheel_uses_kernel_driver_not_sdl_hidapi(self) -> None: + """Every SDL3 game must see SDL_JOYSTICK_HIDAPI_LG4FF=0. + + SDL3's hidapi lg4ff driver cannot answer effect-status queries, which + BeamNG 0.39 native reads as a dead effect: zero force on the G29. The + narrow hint keeps HIDAPI for gamepads and only demotes the wheel. + """ + args = desktop_env_args("bob", 1000) + assert _env_value(args, "SDL_JOYSTICK_HIDAPI_LG4FF") == "0" + def test_dbus_address_defaults_to_uid_path(self) -> None: """DBUS falls back to the uid-derived socket when unset.""" env_copy = os.environ.copy()