Apart from my Linux boxen, I have a Nintendo Switch with both its official wireless joy-cons and an unofficial wired pro controller.
The wireless joy-cons over bluetooth are probably too complex to figure out how to get to work, but at least the wired controller should be fine, I guess.
In fact, I can use and calibrate it fine in KDE’s System Settings. But neither in Steam nor in stuff ran with steam-run do I seem to get it running.
I had a few problems getting my PS4 controller recognized correctly and found a semi working fix by adding a few udev rules. One of those is for the Switch controller but I haven’t tested it.
services.udev.extraRules = ''
# NS PRO Controller USB
KERNEL=="hidraw*", ATTRS{idVendor}=="20d6", ATTRS{idProduct}=="a711", MODE="0660", TAG+="uaccess", GROUP="input"
'';
Other rules can be found in my configuration at
I’m not sure where I got them from, but Gamepad - ArchWiki might help you.
I’m encountering perhaps a related issue where a program I’m trying to launch with steam-run exits with the error:
This program needs capability CAP_DAC_OVERRIDE and CAP_SYS_RAWIO to run.
Please either run "setcap cap_dac_override,cap_sys_rawio=ep" on this program to set capabilities, or run it as root.
Running it with steam-run sudo or directly as root yeilds:
/nix/store/wn9pjyjq0srh6mrg7ajwy9zh6db3v2m7-steam-run: line 9: /path/to/executable: Permission denied
/nix/store/wn9pjyjq0srh6mrg7ajwy9zh6db3v2m7-steam-run: line 9: exec: /path/to/executable: cannot execute: Permission denied