Open rotilho opened 4 months ago
If useful, there is the output of udevadm info --query=all --attribute-walk --name=/dev/hidraw7
:
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/virtual/misc/uhid/0005:045E:0B22.0008/hidraw/hidraw7':
KERNEL=="hidraw7"
SUBSYSTEM=="hidraw"
DRIVER==""
ATTR{power/control}=="auto"
ATTR{power/runtime_active_time}=="0"
ATTR{power/runtime_status}=="unsupported"
ATTR{power/runtime_suspended_time}=="0"
looking at parent device '/devices/virtual/misc/uhid/0005:045E:0B22.0008':
KERNELS=="0005:045E:0B22.0008"
SUBSYSTEMS=="hid"
DRIVERS=="microsoft"
ATTRS{country}=="00"
ATTRS{power/control}=="auto"
ATTRS{power/runtime_active_time}=="0"
ATTRS{power/runtime_status}=="unsupported"
ATTRS{power/runtime_suspended_time}=="0"
looking at parent device '/devices/virtual/misc/uhid':
KERNELS=="uhid"
SUBSYSTEMS=="misc"
DRIVERS==""
ATTRS{power/control}=="auto"
ATTRS{power/runtime_active_time}=="0"
ATTRS{power/runtime_status}=="unsupported"
ATTRS{power/runtime_suspended_time}=="0"
Can confirm this fixes the issues I currently have using my Elite 2 controller under Debian 12 w/Plasma.
Another note, 60-steam-input.rules seems to be missing on my Steam Deck and I have had no issues there so that makes sense. I wonder how it is implemented on the deck and why that is not rolled into the regular Steam install.
I think I'm the opener of the original issue (https://github.com/ValveSoftware/steam-for-linux/issues/7852). After I added the line in the file and restarted udev it was recognized correctly. Now it has the wrong name under USB (Elite instead of Elite 2). Maybe it would be fruitful to add the fix to this PR to create full cover of both cases, Bluetooth and USB, but I don't know if this is possible.
Here's an alternative approach that doesn't require punching additional holes via steam-input: https://github.com/systemd/systemd/pull/35023
The problem is that the Elite 2 is simultaneously a gamepad and a keyboard. The operating system (specifically: udev) generally doesn't let apps (in this case: Steam) have unrestricted access to keyboards. For reasons, udev prevents itself from marking a device as both a keyboard and a gamepad; such a device is always marked as just a keyboard. So the fix is to mark the device as a gamepad too, which makes it available to Steam
Whoops, scratch my previous comment. This is the right approach.
There's a subtle difference between the two: this PR gives Steam direct raw HID access to the controller, whereas my PR gives Steam access to the evdev event stream for the controller. Raw HID supports Elite-specific buttons like the back paddles, but evdev does not.
So, with this PR the controller shows up with all of its features, and with my PR the controller shows up in Steam like a basic Xbox controller.
I can confirm that this rule resolves detection of "Xbox Elite Series 2 Controller" (on latest "BLE" firmware).