@who@feddit.org pointed me to the solution. Since XInput is implemented using SDL2, it can be told to selectively ignore devices by setting the SDL_GAMECONTROLLER_IGNORE_DEVICES environment variable. The value should be a hexadecimal VID/PID pair separated by /, or a comma-separated list of VID/PID pairs for multiple devices.
For the 2026 Steam Controller:
SDL_GAMECONTROLLER_IGNORE_DEVICES='0x28de/0x1304'
For other devices using a USB cable or dongle, the VID/PIDs can be listed using this command:
lsusb | sed -E 's/.*: ID ([a-z0-9]{4}):([a-z0-9]{4})/0x\1\/0x\2/'
cross-posted from: https://lemmy.world/post/47349151
There are some non-Steam games that I can’t run through Steam because of its sandboxing (bubblewrap, Steam Linux Runtime, pressure-vessel and such). For those, I’ve set up SISR to capture the SC’s input and remap it to a virtual controller.
While SISR itself works (and quite well with both the touchpads and the gyro), the game ends up receiving inputs from both the virtual and the physical controllers simultaneously.
Running
wine control joy.cplshows both the real SC and the virtual Xbox 360 controllers as DirectInput devices. The XInput list is empty, but the XInput tab shows that it receives input events from both the SC and the virtual controller. Disabling hidraw or the individual DInput devices has no effect.I’d like to find a way to either hide the device from Wine’s XInput driver, or to prevent the XInput device (within Wine) from sending input events to the game. So far, no luck. Any help would be appreciated.


This worked perfectly, thanks a lot! I’ll update the main post.