Linux build inputs break on Steam Deck (but Windows builds work on Steam Deck)

Godot Version

4.6 stable

Question

I’ve been testing my application on the Steam Deck via the official SteamDeck Dev Kit, and while giving it a Windows build via proton the game works fine, Linux builds have only partial controller mapping functioning, and this is both with the Steam Deck’s built in controls and when using my Steam Hori pad controller. (for example, I’m getting Y button, X button, but no joysticks or A button).

Running the Linux build on my PC with an xbox controller works without issues, even when running the game as a non-steam game so that it’s using Steam Input. There seems to be some weird stuff going on with the Steam Deck in particular where most of the custom inputs are discarded. Oddly the builtin UI mapping in Godot still works perfectly regardless. Possibly the Steam Deck doesn’t like buttons being mapped to multiple inputs and the Builtin UI ones are killing mine, but only if it’s a native Linux application?

I’ve seen mention of Steam Deck input issues in the past, but those have since been closed as fixed.

If you check the console output on the SteamDeck, are you getting XInput errors ?

Otherwise it’s maybe a mapping issue, Godot has a list of controller mappings here but the SteamDeck is notably absent, maybe you can try adding a custom mapping

Sadly the steamworks doc is quite light about the SteamDeck inputs

What Input APIs does the Steam Deck support?
The Deck supports all major input APIs - XInput, Raw Input, DirectInput, as well as Steam Input.

I’m not getting any errors in the devkit logs. I added a print for the input events, and it’s coming out as normal Joypad inputs that you’d expect, meaning it should be doing things. The game itself just isn’t responsive, unless it’s a Builtin UI Input event. Those still work perfectly fine.

I figured out why I was getting problems. I’d originally copied my input map from an older project, and that input map had explicit Device0 mappings rather than for all controllers, thus why the Steam Deck had problems as any controller will always have a Device ID of 1 due to the Deck having builtin controllers. Changing all inputs to “Any Device” fixed all the issues.