SDL: Haptic ioctl freezes on Steam Deck

Repro:

  1. Reboot a Steam Deck, plug in an Xbox controller via Bluetooth
  2. Using an existing Steam app, run testhaptic. The test should run successfully
  3. Exit the test, disconnect the Xbox controller (the easiest method is holding the guide button until it powers off)
  4. Run testhaptic again, should freeze on the very first HapticNewEffect

The root cause is this ioctl freezing: https://github.com/libsdl-org/SDL/blob/main/src/haptic/linux/SDL_syshaptic.c#L930

I’m pretty sure this is the Steam Virtual Gamepad not responding, as this doesn’t come up anywhere except SteamOS when Steam is handling gamepad support. But, maybe there’s a way to prevent this freeze within SDL, and we can share that fix with the Rewired team who are also seeing this freeze.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 24

Most upvoted comments

Vicki found some kernel bugs related to this and has submitted patches upstream. In addition the root cause of this issue was a bug in Steam, which should be fixed in the next beta.

Thanks for the detailed troubleshooting!