-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDL 2.30.4 breaks Steam Deck gamepad on Arch Linux #10073
Comments
@smcv, any ideas? |
I don't have a Steam Deck, so I am not the right person to debug this. The most relevant change in 2.30.4 is likely to be 361cae0, which fixes a known regression since 91f8b4d (between 2.28.x and the 2.29.1 prerelease), ValveSoftware/steam-for-linux#9571. My understanding of the regression is that when using Steam Input, Steam creates a virtual Xbox 360 controller (device ID 28de:11ff) corresponding to each physical controller that is being managed by Steam Input, and then instructs SDL and Proton (Steam's version of Wine) to ignore the physical controllers and read from the virtual controllers instead. Steam assigns controller names that encode the "slot" number, based on its UI for reordering controllers, and Proton parses the name to figure out how to assign the virtual controllers to the expected XInput slot. This particularly matters for local multiplayer games that only support the 4 controllers in the first 4 XInput slots: if players have connected 4 external USB/Bluetooth gamepads (Xbox, Playstation, Switch) and do not want any player to be using the Deck's built-in gamepad, then they need to tell Steam to reorder the controllers so that the Deck's built-in gamepad is in slot 5 or later. |
With SDL 2.30.3, were you using the physical gamepad device directly; or were you running Steam in the background and letting it map the gamepad to a Steam Input virtual gamepad, and then having KDE System Settings talk to that? If you have Steam installed (it doesn't need to be running for this, only installed), then running its diagnostic tool is likely to be helpful:
This enumerates all the raw HID and evdev input devices that SDL could potentially access, together with the information that SDL would use to identify them. Run this in the same situation where you were trying to use game controllers in KDE System Settings and Wine, whatever that is (but please also clarify what that situation is!) It might also be helpful to compile SDL 2's Wine is very complicated, and I don't know what patches (if any) Lutris applies to it, so it would be better to eliminate Wine from consideration to start with, and get the controller working with native Linux software first. |
Using the physical gamepad device directly, I don't have Steam running in the background and don't have the Steam runtime initialized, though I do have the steam package installed for the udev rules. I notice this difference in KDE System Settings depending on SDL version: With SDL 2.30.3:
With SDL 2.30.4:
|
This could perhaps indicate that 2.30.3 as provided by Arch is accessing the device via raw HID, and 2.30.4 is accessing it via evdev? |
If it's that, then 793a068 might be another commit to look at. |
Can you build SDL3 and check what the output of testcontroller is? Switching from USB to hidraw shouldn't prevent the controller from working. |
Actually, since this is SDL2, using test/testgamecontroller from 2.30.4 is probably an easier way to verify using the system installed SDL. |
test/testgamecontroller output built from and using SDL 2.30.4: test/testgamecontroller output built from and using SDL 2.30.3: |
Oh, the USB driver is not used by default to prevent applications locking exclusive access to USB devices. If you want to override that behavior, try setting the environment variable SDL_HIDAPI_LIBUSB_WHITELIST=0 |
Overriding the behaviour with that environment variable does make the Steam Deck gamepad work again on SDL 2.30.4, which resolves the issue for me. Thanks. I'm unsure if this means the issue can be closed or if it is preferred to be left open. |
Okay, it sounds like it's working as intended. Thanks! |
Upon updating Arch Linux sdl2 package from 2.30.3 to 2.30.4 the Steam Deck gamepad no longer behaves properly, for example the KDE System Settings Game Controller page no longer displays activity and controller input inside Wine (Lutris build) games no longer work. The release notes say 2.30.4 is a stable bugfix release so I assume this is unexpected behaviour from commit 361cae0. I've downgraded back to 2.30.3 as a workaround.
If there are any issues with this bug report, or if more information is needed, please let me know.
The text was updated successfully, but these errors were encountered: