protonscr

Dualsense controller button mappings wrong in Hollow Knight

steamopen 3rd party gameDistro Family: ArchGeneral controller / Steam Input
ValveSoftware/steam-for-linux#8217 · opened 2021-11-09 by OleStrohm · updated 2025-09-25 · 20 comments · github
9 matching comments, n / p to jump
OOleStrohm 2021-11-09 github

Your system information

  • Steam client version (build number or date): 1635319913 (October 27 2021)
  • Distribution (e.g. Ubuntu): Arch - 5.14.16-arch1-1
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

I expect the controller buttons to map correctly, but instead the left and right triggers also trigger the select and start buttons respectively. And the actual select and start buttons do nothing at all.

The buttons are also occasionally unresponsive and the sticks require very fast movement to register.

I've used the controller on linux both in other games and on a browser controller tester and all buttons work correctly outside Hollow Knight.

I've tried every combination of settings, both running it natively and running the game through proton and nothing works correctly.

Steps for reproducing this issue:

  1. Fresh install of linux
  2. Fresh install of Hollow Knight
  3. Button mappings are wrong
Kkisak-valve maintainer 2021-11-09 github

Hello @OleStrohm, this issue should also be brought to the game's dev(s) attention if it hasn't been already.

OOleStrohm 2021-11-09 github

Yes, I've forwarded this issue to them

Mmatega 2022-03-18 github

I had the same issue. It seems to be caused by Hollow Knight grabbing the original controller and not understanding its mapping. For me this fixed it:

  • Enable Steam controller configuration for PS controllers
  • Restart Steam and connect controller
  • When Steam is running, remove/move away/alter permissions of /dev/input/eventXX (the original controller) so that HK can't access it
  • Game plays fine through Steam Input, although button prompts are Xbox-style
  • After you're done playing, restore the original controller control file (or just reconnect the controller and let the OS fix it)

Edit: Here's a python script to hide (actually just exclusively grab) the controller before running the game. Enter path/to/dualsense_hide.py %COMMAND% into custom launch options. It needs python-evdev. https://gist.github.com/matega/8c2c9b9de799745d6d1d7373d94fa8df

OOleStrohm 2022-03-19 github

This works perfectly @matega , thank you so much! Obviously it would be great to have this be fixed properly, but at least there's a reproducible workaround now!
I will leave this issue open because the issue isn't really fixed, but hopefully others with this issue will be able to find this workaround at least

OOleStrohm 2022-03-19 github

@matega I noticed an issue in the script that hinders steam from realising that the game has exited, but I've commented a tiny patch that fixes it.

Rrp86 2022-07-04 github

There's another fix described here that worked for me:

  1. Turn Steam Input off for Hollow Knight
  2. Use launch options: SDL_GAMECONTROLLERCONFIG="050000004c050000e60c000000810000,Sony DualSense ,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux," %command%
?ghost 2022-07-10 github

There's another fix described here that worked for me:

1. Turn Steam Input off for Hollow Knight

2. Use launch options: SDL_GAMECONTROLLERCONFIG="050000004c050000e60c000000810000,Sony DualSense ,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux," %command%

Works great, thank you!

Kkisak-valve maintainer 2022-07-10 github

This controller mapping issue doesn't make sense to me. The SDL_GAMECONTROLLERCONFIG workaround appears to be identical to https://github.com/libsdl-org/SDL/blame/main/src/joystick/SDL_gamecontrollerdb.h#L712, which hasn't been touched in 7 months (SDL 2.0.18+). The Steam runtime should have this or newer.

I suspect that this Unity3d game has libSDL statically linked into it with an older controller mapping baked in. I'm not really familiar with this, but it might be interesting to test setting the game's launch options to something like SDL_DYNAMIC_API=/home/CHANGEME/.steam/root/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 %command%. The intent is to try to get the game to use a newer version of SDL.

Rrp86 2022-07-18 github

I suspect that this Unity3d game has libSDL statically linked into it with an older controller mapping baked in. I'm not really familiar with this, but it might be interesting to test setting the game's launch options to something like SDL_DYNAMIC_API=/home/CHANGEME/.steam/root/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 %command%. The intent is to try to get the game to use a newer version of SDL.

Thank you - didn't work for me unfortunately.

BBLaDZer 2022-08-05 github

I suspect that this Unity3d game has libSDL statically linked into it with an older controller mapping baked in. I'm not really familiar with this, but it might be interesting to test setting the game's launch options to something like SDL_DYNAMIC_API=/home/CHANGEME/.steam/root/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 %command%. The intent is to try to get the game to use a newer version of SDL.

@kisak-valve thank you! It's working for me on manjaro, specs

Thank you - didn't work for me unfortunately.

@rp86 did you changed the user name in home path?

Mmatega 2022-08-09 github

I suspect that this Unity3d game has libSDL statically linked into it with an older controller mapping baked in. I'm not really familiar with this, but it might be interesting to test setting the game's launch options to something like SDL_DYNAMIC_API=/home/CHANGEME/.steam/root/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 %command%. The intent is to try to get the game to use a newer version of SDL.

@kisak-valve This works for me too on Ubuntu 22.04, thanks!

CCalebGartner 2022-08-12 github

@kisak-valve I can also confirm that this works (on Fedora 36). Changing the SDL version could cause problems, but I haven't encountered any ~bugs~ issues so far.

Edit: *mostly works, remapping controls via steam input doesn't work.

To add to the confusion, unloading hid_playstation (via sudo modprobe -r hid_playstation) and then running the game will cause it to use steam's "Desktop Configuration", which does support remapping, etc.

Ccylnz 2023-01-02 github

This controller mapping issue doesn't make sense to me. The SDL_GAMECONTROLLERCONFIG workaround appears to be identical to https://github.com/libsdl-org/SDL/blame/main/src/joystick/SDL_gamecontrollerdb.h#L712, which hasn't been touched in 7 months (SDL 2.0.18+). The Steam runtime should have this or newer.

I suspect that this Unity3d game has libSDL statically linked into it with an older controller mapping baked in. I'm not really familiar with this, but it might be interesting to test setting the game's launch options to something like SDL_DYNAMIC_API=/home/CHANGEME/.steam/root/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 %command%. The intent is to try to get the game to use a newer version of SDL.

this.
this actually worked after weeks of supposed fixes failing

Mmichaelgosling 2023-01-06 github

This controller mapping issue doesn't make sense to me. The SDL_GAMECONTROLLERCONFIG workaround appears to be identical to libsdl-org/SDL@main/src/joystick/SDL_gamecontrollerdb.h#L712 (blame), which hasn't been touched in 7 months (SDL 2.0.18+). The Steam runtime should have this or newer.

I suspect that this Unity3d game has libSDL statically linked into it with an older controller mapping baked in. I'm not really familiar with this, but it might be interesting to test setting the game's launch options to something like SDL_DYNAMIC_API=/home/CHANGEME/.steam/root/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 %command%. The intent is to try to get the game to use a newer version of SDL.

this worked perfectly for me on Manjaro, nothing else worked (even setting SDL_GAMECONTROLLERCONFIG). thanks for sharing this.

to future readers with this problem, I also disabled steam input.

Ggeeksville 2023-01-12 github

Thank you for this report - this bug was also appearing in Valheim (exact same behavior). The workaround by @CalebGartner worked for me!

"sudo modprobe -r hid_playstation"

Mmercuriete 2023-02-26 github

This controller mapping issue doesn't make sense to me. The SDL_GAMECONTROLLERCONFIG workaround appears to be identical to https://github.com/libsdl-org/SDL/blame/main/src/joystick/SDL_gamecontrollerdb.h#L712, which hasn't been touched in 7 months (SDL 2.0.18+). The Steam runtime should have this or newer.

I suspect that this Unity3d game has libSDL statically linked into it with an older controller mapping baked in. I'm not really familiar with this, but it might be interesting to test setting the game's launch options to something like SDL_DYNAMIC_API=/home/CHANGEME/.steam/root/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 %command%. The intent is to try to get the game to use a newer version of SDL.

Thanks @kisak-valve
I just bought a dual sense a few days ago and I hit this bug.
Your workaround worked for me on hollow knight.

Lledufff 2025-05-06 github

This controller mapping issue doesn't make sense to me. The SDL_GAMECONTROLLERCONFIG workaround appears to be identical to https://github.com/libsdl-org/SDL/blame/main/src/joystick/SDL_gamecontrollerdb.h#L712, which hasn't been touched in 7 months (SDL 2.0.18+). The Steam runtime should have this or newer.

I suspect that this Unity3d game has libSDL statically linked into it with an older controller mapping baked in. I'm not really familiar with this, but it might be interesting to test setting the game's launch options to something like SDL_DYNAMIC_API=/home/CHANGEME/.steam/root/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 %command%. The intent is to try to get the game to use a newer version of SDL.

This one works on debian 12 for my Dualshock 3, all the buttons work (remapping too), but i lost vibration/rumble, not a big deal (although i love rumble features).

Hopefully this gets optimized in the future.

Edit: Forgot to tell that the Dualshock 3 works fine with USB cable, without any extra configuration needed, just plug and play. Vibration, everything.
With Bluetooth is where it needs the SDL workaround and loses rumble.
Edit 2: works perfect with proton 9 without extra workarounds other than running it with proton 9

SStonedEdge 2025-09-01 github

Is this fixed yet on Linux? I am trying to run on aarch64 with my controller config as follows, and the start/select buttons are being mapped to L2/R2...

export SDL_GAMECONTROLLERCONFIG="0300879bfeca00000550000011010000,Retro Lite CM5 Gamepad,platform:Linux,a:b1,b:b0,x:b3,y:b2,back:b5,guide:b14,start:b4,leftstick:b12,rightstick:b13,leftshoulder:b11,rightshoulder:b10,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,"

Ddarkpumpkins 2025-09-01 github

I suspect that this Unity3d game has libSDL statically linked into it with an older controller mapping baked in. I'm not really familiar with this, but it might be interesting to test setting the game's launch options to something like SDL_DYNAMIC_API=/home/CHANGEME/.steam/root/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 %command%. The intent is to try to get the game to use a newer version of SDL.

Thanks a lot !
It worked for me too ( Ubuntu 25.04 )

Aaddei 2025-09-25 github

This controller mapping issue doesn't make sense to me. The SDL_GAMECONTROLLERCONFIG workaround appears to be identical to https://github.com/libsdl-org/SDL/blame/main/src/joystick/SDL_gamecontrollerdb.h#L712, which hasn't been touched in 7 months (SDL 2.0.18+). The Steam runtime should have this or newer.

I suspect that this Unity3d game has libSDL statically linked into it with an older controller mapping baked in. I'm not really familiar with this, but it might be interesting to test setting the game's launch options to something like SDL_DYNAMIC_API=/home/CHANGEME/.steam/root/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 %command%. The intent is to try to get the game to use a newer version of SDL.

For alls who use immutable OS (Kinoite) plus flatpak version of steam, this works too, but with following path:

SDL_DYNAMIC_API=/var/home/CHANGEME/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 %command%