protonscr

Ps5 Controller Weird behabior with native linux games only

steamopen 3rd party gameDistro Family: ArchGeneral controller / Steam Input
ValveSoftware/steam-for-linux#8467 · opened 2022-03-09 by Lunatik00 · updated 2022-03-18 · 4 comments · github
LLunatik00 2022-03-09 github

Operating System Version:
"Arch Linux" (64 bit)
Kernel Name: Linux
Kernel Version: 5.16.12-zen1-1-zen
X Server Vendor: The X.Org Foundation
X Server Release: 12101003
X Window Manager: KWin
Steam Runtime Version: steam-runtime_0.20220119.0

  • Opted into Steam client beta?: [No]
  • Have you checked for system updates?: [Yes]

Please describe your issue in as much detail as possible:

The PS5 controller doesn't work properly with linux native games only, it works fine trough proton and it works fine if i use tools to emulate an xbox controller, but if i try to configure it trough steam the config goes back to the default immediately, if i try to use it in a native game (any native game, i tried several) start and select don't work and when i use R2 it also reads as if i pressed the start button, same thing with L2 and select. I can't remap the controller trough steam.

To be clear because steam support keep insisting in this pointart the gamet, the tool was installed and used AFTER i encountered the problem and AFTER i tried any other solution, included installing the official sony drivers for the ps5 controller even when the controller itself was working fine with the kernel, i just wanted to be sure that the problem was steam itself. The same games work fine trough proton, but i shouldn't have to use the windows version when the linux version runs fine except for a steam bug.

Steps for reproducing this issue:

  1. Connect a PS5 controller
  2. Install any native linux game that supports controllers
  3. Start the game
  4. use R2 or L2 to see that it also registers start or select respectively
Kkisak-valve maintainer 2022-03-10 github

Possible duplicate of #8217.

LLunatik00 2022-03-10 github

Possible duplicate of #8217.

Kinda, I also noticed it in hollow knight and then i proceeded to try other games to see if it was something in the game, the same problem was present in other games, so the problem is general, not just hollow knight, I then tried to remap the controller using steam, the remapping trough steam is broken for the ps5 controller, any change that i did was gone when i saved it, then i decided to try games trough proton and they worked (only trough proton), then i tried installing the ps5 sony drivers instead of having the default from the kernel, the problem persisted, then i tried the emulated controller and it worked fine, that is how i narrowed it down to a problem between steam and the controller

It is not limited to a single game, the controller works trough proton but not in native games, it can't be remapped using the steam UI and it is limited to the ps5 controller only (ps4 controller works fine), I tried portal 2 now since the 3rd party game tag was added and it doesn't happen in that game

Mmatega 2022-03-18 github

I think the problem is between the native game and the controller. Hollow Knight seems to use the controller natively and fail to make sense of it. As I've said in #8217, if you prevent HK from using the native controller by removing its access to/dev/input/eventXX, everything works well through Steam input.

A thought I just had: maybe Steam doesn't issue an exclusive grab to the event device?

(Also, not every native Linux game is broken. Celeste works fine without any workaround. It was the only other game I tried so I assumed the problem is exclusive to Hollow Knight)

Mmatega 2022-03-18 github

I wrote a little python script to hide the controller, run the game and then unhide it with one command. Enter dualsense_hide.py %COMMAND% into the custom launch options box in Steam. Needs a Sudoers rule to function.

https://gist.github.com/matega/8c2c9b9de799745d6d1d7373d94fa8df

Edit: Turns out it's enough to exclusively grab the device, so the updated script is shorter and safer, no sudo needed.

Nothing extracted yet.