Open OleStrohm opened 3 years ago
Hello @OleStrohm, this issue should also be brought to the game's dev(s) attention if it hasn't been already.
Yes, I've forwarded this issue to them
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:
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
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
@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.
There's another fix described here that worked for me:
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!
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.
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.
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?
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!
@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.
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
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.
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"
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.
Your system information
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: