Thank you @kakra for creating this issue. I'm also experiencing this.
A difference for me is that I only use one controller (Xbox Elite Series 2) on my machine.
The controller works fine until I stop playing and I close the game and disconnect / turn off the controller.
When I then attempt to reconnect the controller, it does connect and evtest shows that input is registered. Steam big picture and games do not recognize it however. This is fixed by restarting the computer.
A difference for me is that I only use one controller (Xbox Elite Series 2) on my machine.
So maybe your issue is different, or there's some other HID component on your system which acts like a controller - some onboard RGB controllers appear as a HID device and may look like a controller.
But I'll try to test your case, too.
Update: The initial reporter states that it is not necessary to have multiple controllers connected at the same time, they just used a second controller to show that one still works and the other doesn't. It may still be an issue with "ghost controllers" because bluez may not immediately free the original input device if a device disconnects and connects again. Usually, it's expected that lingering input nodes are re-used once the device comes back on the radio, but I'm not sure if this is always working properly.
The issue is not limited to proton/steam. The inputs are also not recognized by the plasma game controller menu in the plasma settings (I am running plasma 6.6 on cachyos).
Moving the sticks or clicking any button does not show any controller activity on this menu, however if I were to enable "Allow using as pointer and keyboard" I can control the desktop just fine with the controller, but the menu still shows no input from any button.
If I reload xpadneo using:
sudo rmmod hid-xpadneo
sudo modprobe hid-xpadneo
A few times (often on first try) the KDE controller menu than detects input fine and so does steam.
I am using an xbox elite 2 wireless controller over bluetooth although the controller is detected as an xbox 360 controller by xpadneo.
Attached is an image of the controller menu in question:
Seeing as so many applications are not detecting controller input and that the issue started happening recently, I started looking more into it and believe I have found the issue.
It seems that the /dev/hidrawX interface the hid-generic kernel driver exposes and the /dev/input/eventX interface that xpadeo exposes are clashing.
More specifically it seems that even after xpadneo is loaded, applications are still reading /dev/hidrawX instead of /dev/input/eventX for controller input. This can be seen in the image above where the Device: was still pointing to /dev/hidraw12, and this is the only entry available in the drop down list as well:
Reloading the driver causes the plasma controller menu to detect and use the proper /dev/input/eventX interface and detect input fine as seen below:
It is important to note that even when the plasma controller menu does not detect /dev/input/event17, xpadneo is correctly setting up this interface since running cat /dev/input/event17 when controller input is not working, correctly prints bytes to the screen when buttons are pressed.
I think than that the issue affecting steam is caused also by reading the wrong device in /dev and that seeing as steam, proton and the plasma controller menu are all affected by it, it must be a common library or API that is being used here returning the wrong device.
A few times (often on first try) the KDE controller menu than detects input fine and so does steam.
I wonder if you would see more than one evdev instance for the controller while the problem persists. Could you run sudo libinput list-device before and after fixing the issue, including a log from dmesg -w before you try to fix it until it is fixed?
xpadneo is correctly setting up this interface since running cat /dev/input/event17 when controller input is not working
A better way is running evtest which will actualy decode the buttons - so you can check whether the mapping is actually correct.
I found that Steam may temporarily grab the device (and maybe create a virtual input device) the moment the controller reconnects. But in my tests, it always released it 1-2 seconds later.
More specifically it seems that even after xpadneo is loaded, applications are still reading /dev/hidrawX instead of /dev/input/eventX for controller input.
This is a good theory and explains what I am seeing.
I suspect what may be happening here, is: The controller reconnects, hid-microsoft grabs the device first, Steam then grabs it through hidraw, and only then our udev rules rebind the controller to hid-xpadneo, and then some systems won't detect this incident. Our rules revoke access to the hidraw device, so input might stop working as a result.
But usually, if hid-xpadneo is loaded first, this rebinding should never happen in the first place. Seeing the dmesg log may reveal what is going on, and with what timing.
As a first try working around it, we could try disabling hidraw access always, no matter which driver binds, using MODE:="0000" unconditionally on the hidraw device.
Thank you @kakra, I will run the tests you recommended and upload the data.
But first I though I would clarify how I am getting this issue reliably.
I first ran into this issue yesterday where I turned on my controller and noticed the behavior. However what I have been doing to reproduce it reliably now is quite odd.
I noticed that I can reliably reproduce it by unloding the kernel module and than uninstalling it through pacman, cloning the xpadneo source code from github, and than install it straight from the git repo by running the install.sh script on any version that is 0.9.8 or newer (older ones don't build on my kernel).
After doing so I would unload the kernel module again, run the uninstall.sh script, checkout a different version of xpadneo than the one I just uninstalled and install it, run `sudo modprobe hid-xpadneo' and the issue would reproduce.
From this point on reloading the module would resolve the issue, and switching xpadneo versions would reproduce the bug again. I know it is an odd way of reproducing it and I accidentally discovered this reproducer while bisecting xpadneo yesterday.
In short a reproducer would be:
install.sh script from the git repo that is v0.9.8 or newer. Let's say for this example we install v0.10sudo modprobe hid-xpadneosudo rmmod hid-xpadneouninstall.sh scriptinstall.sh scriptsudo modprobe hid-xpadneoAlso the issue can only be resolved by reloading the module, turning the controller off and back on will not resolve the issue.
I find it weird that the reproducer requires a version change to happen but at least I have a reliable way of reproducing it for tests
~ ❯ sudo libinput list-devices 6s
Device: Logitech PRO X 2 LIGHTSPEED Consumer Control
Kernel: /dev/input/event4
Id: usb:046d:0af7
Group: 1
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap button map: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Scroll button: n/a
Scroll button lock: n/a
Click methods: none
Clickfinger button map: n/a
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: 0.0
Area rectangle: n/a
Device: Logitech G915 TKL
Kernel: /dev/input/event2
Id: usb:046d:408e
Group: 2
Seat: seat0, default
Capabilities: keyboard pointer
Tap-to-click: n/a
Tap-and-drag: n/a
Tap button map: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: disabled
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Scroll button: n/a
Scroll button lock: n/a
Click methods: none
Clickfinger button map: n/a
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: 0.0
Area rectangle: n/a
Device: Logitech PRO X 2
Kernel: /dev/input/event1
Id: usb:046d:40a9
Group: 3
Seat: seat0, default
Capabilities: keyboard pointer
Tap-to-click: n/a
Tap-and-drag: n/a
Tap button map: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: disabled
Calibration: n/a
Scroll methods: button
Scroll button: BTN_MIDDLE
Scroll button lock: disabled
Click methods: none
Clickfinger button map: n/a
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: flat *adaptive custom
Rotation: 0.0
Area rectangle: n/a
Device: Video Bus
Kernel: /dev/input/event9
Id: host:0000:0006
Group: 4
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap button map: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Scroll button: n/a
Scroll button lock: n/a
Click methods: none
Clickfinger button map: n/a
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: 0.0
Area rectangle: n/a
Device: Power Button
Kernel: /dev/input/event0
Id: host:0000:0001
Group: 5
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap button map: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Scroll button: n/a
Scroll button lock: n/a
Click methods: none
Clickfinger button map: n/a
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: 0.0
Area rectangle: n/a
the xbox controller is nowhere to be seen in libinput output.
[ 190.337381] loaded hid-xpadneo v0.11-pre-42-gb514bd4 #### <----- the controller works fine here until I switch to v0.9.8
[ 190.337419] xpadneo 0005:045E:0B22.000C: BLE firmware version 5.23
[ 190.337422] xpadneo 0005:045E:0B22.000C: expecting HOGP protocol, this will cause rumble issues if the controller does not use BLE
[ 190.337425] xpadneo 0005:045E:0B22.000C: pretending XB1S Windows wireless mode (changed PID from 0x0B22 to 0x028E)
[ 190.337426] xpadneo 0005:045E:0B22.000C: working around wrong SDL2 mappings (changed version from 0x00000523 to 0x00001130)
[ 190.337431] xpadneo 0005:045E:0B22.000C: report descriptor: length 464 crc16 0x28fa
[ 190.337433] xpadneo 0005:045E:0B22.000C: report descriptor: OUI C0:D6:D5 (0xC0) - globally-assigned, unicast
[ 190.337435] xpadneo 0005:045E:0B22.000C: fixing up Rx axis
[ 190.337435] xpadneo 0005:045E:0B22.000C: fixing up Ry axis
[ 190.337436] xpadneo 0005:045E:0B22.000C: fixing up Z axis
[ 190.337436] xpadneo 0005:045E:0B22.000C: fixing up Rz axis
[ 190.337436] xpadneo 0005:045E:0B22.000C: fixing up button mapping
[ 190.337504] xpadneo 0005:045E:0B22.000C: gamepad detected
[ 190.337505] xpadneo 0005:045E:0B22.000C: enabling compliance with Linux Gamepad Specification
[ 190.337565] input: Xbox Wireless Controller as /devices/virtual/misc/uhid/0005:045E:0B22.000C/input/input41
[ 190.337626] xpadneo 0005:045E:0B22.000C: consumer control detected
[ 190.337646] input: Xbox Wireless Controller Consumer Control as /devices/virtual/misc/uhid/0005:045E:0B22.000C/input/input42
[ 190.337665] xpadneo 0005:045E:0B22.000C: keyboard detected
[ 190.337676] input: Xbox Wireless Controller Keyboard as /devices/virtual/misc/uhid/0005:045E:0B22.000C/input/input43
[ 190.337719] xpadneo 0005:045E:0B22.000C: input,hidraw11: BLUETOOTH HID v11.30 Gamepad [Xbox Wireless Controller] on c8:a3:e8:4e:18:20
[ 190.337733] input: Xbox Wireless Controller Mouse as /devices/virtual/misc/uhid/0005:045E:0B22.000C/input/input44
[ 190.337763] xpadneo 0005:045E:0B22.000C: mouse added
[ 190.337765] xpadneo 0005:045E:0B22.000C: controller quirks: 0x00000050
[ 190.337767] xpadneo 0005:045E:0B22.000C: Xbox Wireless Controller [c0:d6:d5:eb:73:b8] connected
[ 190.337770] xpadneo rumble_welcome start
[ 190.337773] xpadneo 0005:045E:0B22.000C: testing weak motor: sustain 50ms release 50ms loop 2 wait 30ms
[ 190.692131] xpadneo 0005:045E:0B22.000C: testing strong motor: sustain 50ms release 50ms loop 2 wait 30ms
[ 191.044123] xpadneo 0005:045E:0B22.000C: testing trigger motors: sustain 50ms release 50ms loop 2 wait 30ms
[ 191.396094] xpadneo rumble_welcome took 1059ms
[ 191.396099] xpadneo 0005:045E:0B22.000C: please report a bug if your controller did not rumble: uses_hogp 1
[ 191.396101] xpadneo 0005:045E:0B22.000C: rumble streaming enabled
[ 192.170095] xpadneo 0005:045E:0B22.000C: mapping profiles detected
[ 192.170098] xpadneo 0005:045E:0B22.000C: switching profile to 1
[ 195.139320] xpadneo 0005:045E:0B22.000C: reverting to original version (changed version from 0x00001130 to 0x00000523)
[ 195.139324] xpadneo 0005:045E:0B22.000C: reverting to original product (changed PID from 0x028E to 0x0B22)
[ 195.139325] xpadneo 0005:045E:0B22.000C: rumble streaming disabled
[ 195.139327] xpadneo 0005:045E:0B22.000C: removing controller quirks: 0x00000058
[ 195.139328] xpadneo 0005:045E:0B22.000C: battery removed
[ 195.165942] xpadneo 0005:045E:0B22.000C: mouse removed
[ 195.258073] input: Xbox Wireless Controller as /devices/virtual/misc/uhid/0005:045E:0B22.000C/input/input45
[ 195.258128] input: Xbox Wireless Controller Consumer Control as /devices/virtual/misc/uhid/0005:045E:0B22.000C/input/input46
[ 195.258149] input: Xbox Wireless Controller Keyboard as /devices/virtual/misc/uhid/0005:045E:0B22.000C/input/input47
[ 195.258185] hid-generic 0005:045E:0B22.000C: input,hidraw11: BLUETOOTH HID v5.23 Gamepad [Xbox Wireless Controller] on c8:a3:e8:4e:18:20
[ 237.899293] loaded hid-xpadneo v0.9.8 #### <---- Starting at this point the controller stops working
[ 237.899322] xpadneo 0005:045E:0B22.000C: BLE firmware version 5.23
[ 237.899324] xpadneo 0005:045E:0B22.000C: pretending XB1S Windows wireless mode (changed PID from 0x0B22 to 0x028E)
[ 237.899325] xpadneo 0005:045E:0B22.000C: working around wrong SDL2 mappings (changed version from 0x00000523 to 0x00001130)
[ 237.899327] xpadneo 0005:045E:0B22.000C: report descriptor size: 464 bytes
[ 237.899328] xpadneo 0005:045E:0B22.000C: fixing up Rx axis
[ 237.899328] xpadneo 0005:045E:0B22.000C: fixing up Ry axis
[ 237.899329] xpadneo 0005:045E:0B22.000C: fixing up Z axis
[ 237.899329] xpadneo 0005:045E:0B22.000C: fixing up Rz axis
[ 237.899329] xpadneo 0005:045E:0B22.000C: fixing up button mapping
[ 237.899377] xpadneo 0005:045E:0B22.000C: enabling compliance with Linux Gamepad Specification
[ 237.899377] xpadneo 0005:045E:0B22.000C: unmapping bogus buttons
[ 237.899421] input: Xbox Wireless Controller as /devices/virtual/misc/uhid/0005:045E:0B22.000C/input/input48
[ 237.899495] xpadneo 0005:045E:0B22.000C: input,hidraw11: BLUETOOTH HID v11.30 Gamepad [Xbox Wireless Controller] on c8:a3:e8:4e:18:20
[ 237.899498] xpadneo 0005:045E:0B22.000C: controller quirks: 0x00000058
[ 237.899499] xpadneo 0005:045E:0B22.000C: testing weak motor: sustain 50ms release 50ms loop 2 wait 30ms
[ 238.229652] xpadneo 0005:045E:0B22.000C: testing strong motor: sustain 50ms release 50ms loop 2 wait 30ms
[ 238.559797] xpadneo 0005:045E:0B22.000C: testing trigger motors: sustain 50ms release 50ms loop 2 wait 30ms
[ 238.889967] xpadneo 0005:045E:0B22.000C: Xbox Wireless Controller [c0:d6:d5:eb:73:b8] connected
I have added two comments in the dmesg output to show when the controller was working and when it stopped.
evtest /dev//input/event17 6s
Input driver version is 1.0.1
Input device ID: bus 0x5 vendor 0x45e product 0x28e version 0x1130
Input device name: "Xbox Wireless Controller"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 304 (BTN_SOUTH)
Event code 305 (BTN_EAST)
Event code 307 (BTN_NORTH)
Event code 308 (BTN_WEST)
Event code 310 (BTN_TL)
Event code 311 (BTN_TR)
Event code 314 (BTN_SELECT)
Event code 315 (BTN_START)
Event code 316 (BTN_MODE)
Event code 317 (BTN_THUMBL)
Event code 318 (BTN_THUMBR)
Event code 548 (?)
Event code 549 (?)
Event code 550 (?)
Event code 551 (?)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 1686
Min -32768
Max 32767
Fuzz 32
Flat 3072
Event code 1 (ABS_Y)
Value -1292
Min -32768
Max 32767
Fuzz 32
Flat 3072
Event code 2 (ABS_Z)
Value 0
Min 0
Max 1023
Fuzz 4
Event code 3 (ABS_RX)
Value 561
Min -32768
Max 32767
Fuzz 32
Flat 3072
Event code 4 (ABS_RY)
Value -3985
Min -32768
Max 32767
Fuzz 32
Flat 3072
Event code 5 (ABS_RZ)
Value 0
Min 0
Max 1023
Fuzz 4
Event code 16 (ABS_HAT0X)
Value 0
Min -1
Max 1
Event code 17 (ABS_HAT0Y)
Value 0
Min -1
Max 1
Event code 33 (?)
Value 1
Min 0
Max 3
Event code 40 (ABS_MISC)
Value 0
Min -1023
Max 1023
Fuzz 3
Flat 63
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Event type 21 (EV_FF)
Event code 80 (FF_RUMBLE)
Event code 81 (FF_PERIODIC)
Event code 88 (FF_SQUARE)
Event code 89 (FF_TRIANGLE)
Event code 90 (FF_SINE)
Event code 96 (FF_GAIN)
Properties:
Testing ... (interrupt to exit)
Event: time 1777142278.477687, type 3 (EV_ABS), code 1 (ABS_Y), value -1400
Event: time 1777142278.477687, type 3 (EV_ABS), code 3 (ABS_RX), value 556
Event: time 1777142278.477687, -------------- SYN_REPORT ------------
Event: time 1777142278.501685, type 3 (EV_ABS), code 1 (ABS_Y), value -1505
Event: time 1777142278.501685, -------------- SYN_REPORT ------------
Event: time 1777142278.507689, type 3 (EV_ABS), code 1 (ABS_Y), value -1586
Event: time 1777142278.507689, -------------- SYN_REPORT ------------
Event: time 1777142278.522676, type 3 (EV_ABS), code 1 (ABS_Y), value -1693
Event: time 1777142278.522676, -------------- SYN_REPORT ------------
Event: time 1777142278.530667, type 3 (EV_ABS), code 1 (ABS_Y), value -1771
Event: time 1777142278.530667, -------------- SYN_REPORT ------------
Event: time 1777142278.553687, type 3 (EV_ABS), code 1 (ABS_Y), value -1777
Event: time 1777142278.553687, -------------- SYN_REPORT ------------
Event: time 1777142278.575662, type 3 (EV_ABS), code 1 (ABS_Y), value -1932
Event: time 1777142278.575662, -------------- SYN_REPORT ------------
Event: time 1777142278.590663, type 3 (EV_ABS), code 1 (ABS_Y), value -2093
Event: time 1777142278.590663, -------------- SYN_REPORT ------------
Event: time 1777142278.597659, type 3 (EV_ABS), code 0 (ABS_X), value 1507
Event: time 1777142278.597659, type 3 (EV_ABS), code 1 (ABS_Y), value -2176
Event: time 1777142278.597659, type 3 (EV_ABS), code 3 (ABS_RX), value 3
Event: time 1777142278.597659, -------------- SYN_REPORT ------------
Event: time 1777142278.612659, type 3 (EV_ABS), code 0 (ABS_X), value 1392
Event: time 1777142278.612659, type 3 (EV_ABS), code 1 (ABS_Y), value -2204
Event: time 1777142278.612659, type 3 (EV_ABS), code 3 (ABS_RX), value -685
Event: time 1777142278.612659, -------------- SYN_REPORT ------------
Event: time 1777142278.620662, type 3 (EV_ABS), code 0 (ABS_X), value 1302
Event: time 1777142278.620662, type 3 (EV_ABS), code 1 (ABS_Y), value -2211
Event: time 1777142278.620662, type 3 (EV_ABS), code 3 (ABS_RX), value -1544
Event: time 1777142278.620662, -------------- SYN_REPORT ------------
Event: time 1777142278.635659, type 3 (EV_ABS), code 0 (ABS_X), value 1151
Event: time 1777142278.635659, type 3 (EV_ABS), code 1 (ABS_Y), value -2290
Event: time 1777142278.635659, type 3 (EV_ABS), code 3 (ABS_RX), value -2125
Event: time 1777142278.635659, type 3 (EV_ABS), code 4 (ABS_RY), value -3093
Event: time 1777142278.635659, -------------- SYN_REPORT ------------
Event: time 1777142278.643662, type 3 (EV_ABS), code 0 (ABS_X), value 949
Event: time 1777142278.643662, type 3 (EV_ABS), code 3 (ABS_RX), value -2248
Event: time 1777142278.643662, type 3 (EV_ABS), code 4 (ABS_RY), value -2188
Event: time 1777142278.643662, -------------- SYN_REPORT ------------
Event: time 1777142278.658665, type 3 (EV_ABS), code 3 (ABS_RX), value -2276
Event: time 1777142278.658665, type 3 (EV_ABS), code 4 (ABS_RY), value -1876
Event: time 1777142278.658665, -------------- SYN_REPORT ------------
Event: time 1777142278.665660, type 3 (EV_ABS), code 1 (ABS_Y), value -2372
Event: time 1777142278.665660, type 3 (EV_ABS), code 3 (ABS_RX), value -2283
Event: time 1777142278.665660, type 3 (EV_ABS), code 4 (ABS_RY), value -1649
Event: time 1777142278.665660, -------------- SYN_REPORT ------------
Event: time 1777142278.680660, type 3 (EV_ABS), code 3 (ABS_RX), value -2288
Event: time 1777142278.680660, type 3 (EV_ABS), code 4 (ABS_RY), value -1641
Event: time 1777142278.680660, -------------- SYN_REPORT ------------
Event: time 1777142278.688671, type 3 (EV_ABS), code 1 (ABS_Y), value -2378
Event: time 1777142278.688671, type 3 (EV_ABS), code 3 (ABS_RX), value -2403
Event: time 1777142278.688671, type 3 (EV_ABS), code 4 (ABS_RY), value -1635
Event: time 1777142278.688671, -------------- SYN_REPORT ------------
Event: time 1777142278.770678, type 3 (EV_ABS), code 1 (ABS_Y), value -2383
Event: time 1777142278.770678, type 3 (EV_ABS), code 4 (ABS_RY), value -1534
Event: time 1777142278.770678, -------------- SYN_REPORT ------------
Event: time 1777142278.815684, type 3 (EV_ABS), code 3 (ABS_RX), value -2297
Event: time 1777142278.815684, type 3 (EV_ABS), code 4 (ABS_RY), value -1470
The only steps taken here after reproducing the issue was reloading the same module using rmmod and modprobe.
sudo libinput list-devices
Device: Logitech PRO X 2 LIGHTSPEED Consumer Control
Kernel: /dev/input/event4
Id: usb:046d:0af7
Group: 1
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap button map: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Scroll button: n/a
Scroll button lock: n/a
Click methods: none
Clickfinger button map: n/a
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: 0.0
Area rectangle: n/a
Device: Logitech G915 TKL
Kernel: /dev/input/event2
Id: usb:046d:408e
Group: 2
Seat: seat0, default
Capabilities: keyboard pointer
Tap-to-click: n/a
Tap-and-drag: n/a
Tap button map: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: disabled
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Scroll button: n/a
Scroll button lock: n/a
Click methods: none
Clickfinger button map: n/a
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: 0.0
Area rectangle: n/a
Device: Logitech PRO X 2
Kernel: /dev/input/event1
Id: usb:046d:40a9
Group: 3
Seat: seat0, default
Capabilities: keyboard pointer
Tap-to-click: n/a
Tap-and-drag: n/a
Tap button map: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: disabled
Calibration: n/a
Scroll methods: button
Scroll button: BTN_MIDDLE
Scroll button lock: disabled
Click methods: none
Clickfinger button map: n/a
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: flat *adaptive custom
Rotation: 0.0
Area rectangle: n/a
Device: Video Bus
Kernel: /dev/input/event9
Id: host:0000:0006
Group: 4
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap button map: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Scroll button: n/a
Scroll button lock: n/a
Click methods: none
Clickfinger button map: n/a
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: 0.0
Area rectangle: n/a
Device: Power Button
Kernel: /dev/input/event0
Id: host:0000:0001
Group: 5
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap button map: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Scroll button: n/a
Scroll button lock: n/a
Click methods: none
Clickfinger button map: n/a
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: 0.0
Even after resolving the issue and confirming that plasma is reading controller input from /dev/input/event17, libinput does not detect the controller.
evtest /dev//input/event17
Input driver version is 1.0.1
Input device ID: bus 0x5 vendor 0x45e product 0x28e version 0x1130
Input device name: "Xbox Wireless Controller"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 304 (BTN_SOUTH)
Event code 305 (BTN_EAST)
Event code 307 (BTN_NORTH)
Event code 308 (BTN_WEST)
Event code 310 (BTN_TL)
Event code 311 (BTN_TR)
Event code 314 (BTN_SELECT)
Event code 315 (BTN_START)
Event code 316 (BTN_MODE)
Event code 317 (BTN_THUMBL)
Event code 318 (BTN_THUMBR)
Event code 548 (?)
Event code 549 (?)
Event code 550 (?)
Event code 551 (?)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 636
Min -32768
Max 32767
Fuzz 32
Flat 3072
Event code 1 (ABS_Y)
Value -2880
Min -32768
Max 32767
Fuzz 32
Flat 3072
Event code 2 (ABS_Z)
Value 0
Min 0
Max 1023
Fuzz 4
Event code 3 (ABS_RX)
Value -3056
Min -32768
Max 32767
Fuzz 32
Flat 3072
Event code 4 (ABS_RY)
Value -2738
Min -32768
Max 32767
Fuzz 32
Flat 3072
Event code 5 (ABS_RZ)
Value 0
Min 0
Max 1023
Fuzz 4
Event code 16 (ABS_HAT0X)
Value 0
Min -1
Max 1
Event code 17 (ABS_HAT0Y)
Value 0
Min -1
Max 1
Event code 33 (?)
Value 1
Min 0
Max 3
Event code 40 (ABS_MISC)
Value 0
Min -1023
Max 1023
Fuzz 3
Flat 63
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Event type 21 (EV_FF)
Event code 80 (FF_RUMBLE)
Event code 81 (FF_PERIODIC)
Event code 88 (FF_SQUARE)
Event code 89 (FF_TRIANGLE)
Event code 90 (FF_SINE)
Event code 96 (FF_GAIN)
Properties:
Testing ... (interrupt to exit)
Event: time 1777142798.238676, type 3 (EV_ABS), code 0 (ABS_X), value -57
Event: time 1777142798.238676, -------------- SYN_REPORT ------------
Event: time 1777142798.247706, type 3 (EV_ABS), code 0 (ABS_X), value -173
Event: time 1777142798.247706, -------------- SYN_REPORT ------------
Event: time 1777142798.253660, type 3 (EV_ABS), code 0 (ABS_X), value -189
Event: time 1777142798.253660, -------------- SYN_REPORT ------------
Event: time 1777142798.261670, type 3 (EV_ABS), code 0 (ABS_X), value -323
Event: time 1777142798.261670, type 3 (EV_ABS), code 1 (ABS_Y), value -2733
Event: time 1777142798.261670, -------------- SYN_REPORT ------------
Event: time 1777142798.268664, type 3 (EV_ABS), code 0 (ABS_X), value -522
Event: time 1777142798.268664, type 3 (EV_ABS), code 1 (ABS_Y), value -2725
Event: time 1777142798.268664, -------------- SYN_REPORT ------------
Event: time 1777142798.283660, type 3 (EV_ABS), code 0 (ABS_X), value -664
Event: time 1777142798.283660, type 3 (EV_ABS), code 1 (ABS_Y), value -2719
[ 2711.492588] xpadneo 0005:045E:0B22.000E: reverting to original version (changed version from 0x00001130 to 0x00000523)
[ 2711.492593] xpadneo 0005:045E:0B22.000E: reverting to original product (changed PID from 0x028E to 0x0B22)
[ 2711.509505] input: Xbox Wireless Controller as /devices/virtual/misc/uhid/0005:045E:0B22.000E/input/input51
[ 2711.509562] input: Xbox Wireless Controller Consumer Control as /devices/virtual/misc/uhid/0005:045E:0B22.000E/input/input52
[ 2711.509593] input: Xbox Wireless Controller Keyboard as /devices/virtual/misc/uhid/0005:045E:0B22.000E/input/input53
[ 2711.509629] hid-generic 0005:045E:0B22.000E: input,hidraw12: BLUETOOTH HID v5.23 Gamepad [Xbox Wireless Controller] on c8:a3:e8:4e:18:20
[ 2780.807863] loaded hid-xpadneo v0.9.8
[ 2780.914356] xpadneo 0005:045E:0B22.000E: BLE firmware version 5.23
[ 2780.914359] xpadneo 0005:045E:0B22.000E: pretending XB1S Windows wireless mode (changed PID from 0x0B22 to 0x028E)
[ 2780.914360] xpadneo 0005:045E:0B22.000E: working around wrong SDL2 mappings (changed version from 0x00000523 to 0x00001130)
[ 2780.914361] xpadneo 0005:045E:0B22.000E: report descriptor size: 464 bytes
[ 2780.914362] xpadneo 0005:045E:0B22.000E: fixing up Rx axis
[ 2780.914362] xpadneo 0005:045E:0B22.000E: fixing up Ry axis
[ 2780.914363] xpadneo 0005:045E:0B22.000E: fixing up Z axis
[ 2780.914363] xpadneo 0005:045E:0B22.000E: fixing up Rz axis
[ 2780.914363] xpadneo 0005:045E:0B22.000E: fixing up button mapping
[ 2780.914407] xpadneo 0005:045E:0B22.000E: enabling compliance with Linux Gamepad Specification
[ 2780.914408] xpadneo 0005:045E:0B22.000E: unmapping bogus buttons
[ 2780.914428] input: Xbox Wireless Controller as /devices/virtual/misc/uhid/0005:045E:0B22.000E/input/input54
[ 2780.914488] xpadneo 0005:045E:0B22.000E: input,hidraw11: BLUETOOTH HID v11.30 Gamepad [Xbox Wireless Controller] on c8:a3:e8:4e:18:20
[ 2780.914491] xpadneo 0005:045E:0B22.000E: controller quirks: 0x00000058
[ 2780.914492] xpadneo 0005:045E:0B22.000E: testing weak motor: sustain 50ms release 50ms loop 2 wait 30ms
[ 2781.244643] xpadneo 0005:045E:0B22.000E: testing strong motor: sustain 50ms release 50ms loop 2 wait 30ms
[ 2781.574795] xpadneo 0005:045E:0B22.000E: testing trigger motors: sustain 50ms release 50ms loop 2 wait 30ms
[ 2781.904942] xpadneo 0005:045E:0B22.000E: Xbox Wireless Controller [c0:d6:d5:eb:73:b8] connected
[ 2783.070291] xpadneo 0005:045E:0B22.000E: switching profile to 1
[ 237.899377] xpadneo 0005:045E:0B22.000C: unmapping bogus buttons
This is not from an official/original xpadneo version.
Could you retry with only official xpadneo version tags from the git repository?
@kakra isn't this the official xpadneo github repo: https://github.com/atar-axis/xpadneo ?
The version I ran when triggering the issue was tag v0.9.8:
git checkout v0.9.8
It also shows up in the dmesg logs as v0.9.8:
[ 237.899293] loaded hid-xpadneo v0.9.8
I grepped through the source code and saw that the line [ 237.899377] xpadneo 0005:045E:0B22.000C: unmapping bogus buttons exists in the v0.9.8 tag and was added 2 years ago with commit atar-axis/xpadneo@ce02d36
Maybe I am misunderstanding something here?
It also shows up in the dmesg logs as v0.9.8
Hmm, good catch.
I wonder why my git log -S didn't find it. Looks like my release/v0.9 branch is out of sync... I fixed that locally, thanks.
Let's get back onto track then, I assume you're thus using genuine checkouts from atar-axis/xpadneo then.
Between v0.9.x and v0.10.x there is a change regarding initialization timing. xpadneo (hopefully) fixed an issue by doing the init phase faster which previously could lead to rumble no longer working if some games used SDL (directly or indirectly). We do that by running the welcome rumble sequence asynchrounous now. I wonder if that causes any issues? But by running the init phase faster, we should actually lower the window of race condition, but your (and other) observations suggest the opposite - but only if this is really the issue.
If you want to bisect this, I'd suggest to focus around that change in the v0.10 branch. Personally, on my system, I cannot reproduce it. I can only reproduce a similar issue if I use multiple controllers at the same time. But this doesn't seem to be exactly the same situation.
We received only few reports on this:
If you want to compile older version of xpadneo for testing, you need to add these patches in reverse order, depending on how far back you go (from the v0.9 branch, the v0.10 branch might need slightly different patches due to refactoring):
I didn't test if all patches apply cleanly to older kernels, neither I could check if this includes all the patches needed.
Is it possible that you log the reconnect incident with udevadm monitor -p? It may create a lot of noise, tho. I would be interested if access to hidraw is properly revoked.
I did try to bisect originally between 0.9.8 and v0.10, as I though it was introduced post v0.9.8, however I am also able to reproduce the issue on v0.9.8 just as described in the original post on atar-axis/xpadneo/issues/605:
Note: This was not an issue on 0.9.8. The bug only occurred after upgrading to v0.10. However, I attempted to resolve it by downgrading to 0.9.8 again which worked until I rebooted my computer and the bug appeared again, this time on 0.9.8. This behaviour was replicated by another user in discord.
What I found interesting and from what I have experienced is that even v0.9.8 which worked fine is now also affected. Also all those affected seem to be running the xbox elite 2 controller including me (at least all comments I've read seem to mention that they are running this controller). I will probably try with the normal xbox series controller as well to make sure its not just an elite 2 controller problem.
Another note on the controller used, I only recently switched from using a normal elite 2 controller to the elite 2 core controller (the white one) , I always assumed that they are the same controllers hardware wise but I will also double check and see if my old normal elite 2 also hits this bug.
I will try to apply the patches mentioned above and do another round of test probably tomorrow or soon at least, I will also have to modify the dkms.conf file as as I am running dkms 3.
Is it possible that you log the reconnect incident with udevadm monitor -p.
I will run this test as well.
What I found interesting and from what I have experienced is that even v0.9.8 which worked fine is now also affected.
Are there any left-over files in the system, especially udev rules? Did our udev rules get installed properly?
Also all those affected seem to be running the xbox elite 2 controller
I noticed that, too. Interestingly, my model says "firmware 5.15" although I updated it to 5.23 using the Xbox Accessories app. So it looks like this depends on the hardware revision of the controller.
So we may very well see something which is special about the new hardware revision.
My current suspicion focuses on the udev rules:
MODE:="0000" on the hidraw device always, not only if the driver is xpadneo, to avoid a possible race with games/Steam grabbing the hidraw device before udev runs the rebind to xpadneo.A workaround was discovered here: https://github.com/atar-axis/xpadneo/issues/605#issuecomment-4530993156
A workaround was discovered here: atar-axis/xpadneo#605 (comment)
Yeah, the workaround says that SDL_JOYSTICK_HIDAPI=0 steam fixed the issue.
But I'm not sure if this is the proper scope. I run all my games - not the Steam Client - with SDL_JOYSTICK_HIDAPI=0 %command% and could never reproduce the problem (actually, I added it years ago and forgot about it). So the source of the behavior may not be inside Steam but inside Proton or one of its components (SDL?).
I completed the requested style of raw hotplug capture (udevadm monitor --kernel --udev --property, synchronized btmon btsnoop, kernel/BlueZ/Steam logs, and per-instance evdev/hidraw) on a related two-controller setup.
Setup: two identical Xbox Elite Series 2 Bluetooth controllers (045e:0b22, firmware 5.17), Nobara 44, kernel 7.2.0-202.nobara.fc44.x86_64, BlueZ 5.86. Importantly, hid_xpadneo was blacklisted and unloaded; both used hid-generic, so there was no xpadneo rebind or PID/version spoofing in this run.
The failure did not reproduce in six controlled reconnects. This gives a useful successful baseline:
.001C through .0021.sdl://15 through sdl://20) but consistently reused index 0 / XInput slot 0 and synthetic ID 45e-b22-3ec3d0.There is a concrete identity discrepancy: Linux HID_UNIQ and InputPlumber expose distinct Bluetooth addresses, and direct SDL_hid_enumerate(045e, 0b22) calls against both system SDL 3.4.14 and Steam's bundled SDL3 return those distinct addresses as serial numbers. Steam's own controller log still reports serial_number: - 0 / Invalid or missing unit serial number and invents VID/PID-based synthetic IDs. This points to Steam's controller import/identity layer, and matches the persistent slot/name bug in ValveSoftware/steam-for-linux#12413.
We previously saw one nondeterministic failure with xpadneo absent: after controller 2 reconnected while controller 1 remained active, both showed connected but only controller 1 worked in Steam. Controller 2 remained unusable through another power cycle until both were turned off and controller 2 was started first. Unfortunately that single failing interval preceded the raw capture.
HCI was healthy in this successful baseline: all 14 LE Set Scan Enable commands completed in 0.927-11.924 ms, with no command timeout or USB reset. One LE connection attempt returned 0x3e; automatic retry succeeded. I can provide a sanitized extract or the full raw capture if useful; I did not attach btsnoop publicly because it contains Bluetooth addresses.
I'm the maintainer of xpadneo, and we recently received reports of input no longer working if you disconnect and reconnect a controller, e.g. an idle Bluetooth controller may turn off, and if you turn it back on, input will no longer work.
A common fact seems to be that all affected users have a second controller connected.
I could confirm that this happens if said controllers have different input mappings, as reported here:
https://github.com/atar-axis/xpadneo/issues/605#issuecomment-4214974159
This doesn't look like xpadneo is causing it but I didn't verify if it will also happen with hid-microsoft. It rather looks like Steam Input, SDL, or wine become confused when disconnecting/reconnecting one of multiple similar controllers which have different input mappings or different HID descriptors.
Examples of racing combinations:
Example of non-racing combination:
Effects in game:
The bug report in xpadneo state that the game no longer receives input, but that doesn't seem to be correct.
evtestwhich means, xpadneo still works fine with all mappings correctOne special behavior of xpadneo may actually trigger the confusion: xpadneo presents all controllers via the same VID:PID, so if SDL/Proton/wine try to match controllers by just these properties, things may become mixed up or racy. I didn't verify if this is actually the cause but software should probably not expect that mapping is exactly identical between devices based on VID:PID because different firmware versions of Xbox controllers may actually ship a slightly different HID descriptor with slightly different button bits but with the same VID:PID. Yes, there's also a version field, and xpadneo also spoofs that to a single value.
Reports also wrote that they need to reboot to fix this. I couldn't confirm this. It seems to be enough to disconnect the controllers in the correct order until you only have the original controller connected. Usually I could get out of the situation by simply restarting the game without restarting the Steam client, so I'd rule out any sticky state inside the Steam client.
I don't have a reliable reproducer yet, well, at least in terms of determinism. Randomly reconnecting controllers with different internal mappings is usually enough to trigger the effect.
I'm not sure if this should go to steam-for-linux or steam-runtime. I feel like most likely the problem is somewhere in the Proton stack, so I'm reporting it here. Please migrate the issue if needed.
I didn't test with native Linux games yet.