PS4 controller motion sensor component causes some games to freeze/crash

Tested with Human: Fall Flat and Hollow Knight, both happen to be Unity games and Steam's console messages give me something about Unity's input detection stuff when these crashes happen.

Running Arch w/ all packages latest as of 2018-09-01T22:00Z.

A possible fix is to find out which of the devices in /dev/input is your motion sensor device and remove it. This info can be found by checking /dev/input/by-id for the link that refers to the motion sensor device. Mine happened to be usb-Sony_Computer_Entertainment_Wireless_Controller-event-if00 and the link referred to /dev/input/event29. All PS4 controller related links started with usb-Sony_Computer_Entertainment_Wireless_Controller- for me.

I reasoned that it must be the motion sensor component by the output of sdl2-jstest --list showing the motion sensor component prior to removing the device, but not after.

Hope this helps someone. If anyone knows a better place to post this info, please inform me.

EDIT: Weird issue with Hollow Knight: steam overlay must be disabled for this to work at all. The controller being connected will still cause a crash otherwise.

EDIT2: Went out and bought an Xbox One controller. Steam overlay crash bug persists when that is connected. Strange.

Posted Sep 1, 2018, 10:30 PM UTC · edited

44
falmear•

I find some games get confused because there is two joysticks which show up (one for the regular joysticks and the other for the motion sensors). They have the same ID which you can see when using sdl2-jstest --list. If you run evtest you can see the /dev/input/event* for each device. Basically I use a script which deletes /dev/input/event* for the motion sensor prior to launching any game. There's also a /dev/input/event* for the touch pad, but I don't delete that one since it doesn't affect any game or show up as a joystick. And I can use it to move the mouse if I need to like in Steam when not using Big Picture Mode.

2
scanstoneOP•

On that note, Hollow Knight did not previously crash due to this conflict, but it did pick up both button and motion input, the latter interfering pretty heavily with the former.

I wonder who it was along the chain that borked this functionality.

1
falmear•
2
scanstoneOP•

I'm having some trouble figuring out what kernel version this patch made it into, but it seems like it might be too old to account for an issue this recent. If not, it seems strange that some userspace was entirely unaffected. Is Unity poorly written with regard to handling hardware?

Guess it doesn't really matter at this point.

1