-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support For Xbox Elite Series 2 Wireless #144
Conversation
@@ -22,3 +22,8 @@ ACTION=="add", \ | |||
KERNEL=="0005:045E:02FD.*|0005:045E:02E0.*", \ | |||
SUBSYSTEM=="hid", \ | |||
RUN:="/bin/sh -c 'echo xpadneo udev: $kernel > /dev/kmsg; modprobe hid_xpadneo; echo $kernel > /sys/bus/hid/drivers/hid-generic/unbind; echo $kernel > /sys/bus/hid/drivers/microsoft/unbind; echo $kernel > /sys/bus/hid/drivers/xpadneo/bind; echo xpadneo udev: ok > /dev/kmsg'" | |||
|
|||
ACTION=="add", \ | |||
KERNEL=="0005:045E:0B05.*|0005:045E:0B05.*", \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe there is no need for double add action. You can extend hardware addresses in 1st rule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so too, could you please change that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
I would need the HID report descriptor too, please provide me |
I'm not really sure what that command-line is supposed to do, but here's the contents of /sys/kernel/debug/hid/0005:045E:0B05.000A/rdesc:
|
thanks, that's the HID report descriptor ;) it tells us how to handle the new buttons on the new controller |
I should probably mention that this is with the hid-microsoft driver on kernel 5.4.8. |
That's not a problem, the report descriptor is the same - the driver just cares about the "how to interpret the descriptor" |
Code Climate has analyzed commit 896ebce and detected 0 issues on this pull request. View more on Code Climate. |
Actually, I think that's not true for xpadneo. Xpadneo already fixes the mappings for the controllers supported, so it should also do it for this. Fixing it in user-space doesn't work correctly because all the fixes at different layers sometimes collide with each other (Steam, native SDL, and Wine pop into mind), and apps using the old If you don't want to fix the mappings at kernel level, xpadneo should not be your first choice of driver. In the end it fixes the problem that the controller exposes different mappings depending on whether it was linked via Bluetooth in Windows or in Linux (you could actually link the controller in Windows, then copy over the BT authorization from the registry to the Linux BT stack and it would be paired there and expose a different mapping). I guess it would also expose the "correct" mapping when used via USB cable. So, xpadneo is working around this difference. Apparently, SDL and Chrome already started fixing this in user space, Steam brought it's own mappings, Wine games in Steam sometimes didn't see those. It's a mess. Chrome ignores our device serial hack, so xpadneo cannot be used with Stadia. |
I'm on this branch. The controller works for like 30s after I follow the instructions in Any thoughts?
|
Side note, could you tell me what driver it uses in USB mode? If I had that, I'd just use it plugged in. I don't need bluetooth_, though it would be nice. Mine just tries to use a generic driver (which doesn't work at all) and I can't figure out how to make it use something else.
|
It seems to me that Xbox controller BT connections have become more unstable in later kernel versions... But with my Xbox One S controller it's connecting more reliable again with latest 5.4 series kernel and updated bluez lib. So maybe it depends also on updated bluez lib? |
I think I'm stuck on Linux kernel 5.3 right now. Hopefully 20.04 will come out soon. |
There should be a PPA available for 5.4 or 5.5... But you'd probably also need a newer bluez. |
xpad |
I'm using a similar patch locally for Elite 2 Series over Bluetooth. FYI I'm using this SDL mapping: The biggest annoyance is that I have to disable all rumble; if I play Borderlands 3 with rumble in lutrix->wine then the controller appears to hang the first time I get a rumble while pulling the left trigger. The game, BT stack and xpadneo don't seem to notice a disconnect or report anything unusual, but the controller stops responding in this or any other program until I force a reconnect from blueman-manager. |
FYI I'm happy to report this as an issue but it seemed premature to report a bug in a controller which xpadneo doesn't even officially support yet. :) |
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
A very similar or even the same problem exists with my "Xbox One S" controller and I'm trying to improve this in #178 but currently it looks like a issue between the BT dongle and the controller itself: Whenever the rumble problem occurs (and this doesn't need pulling any trigger, the directional rumble test program included in the repo is enough to reproduce most of the times) and looking in Wireshark BT monitor, it seems to make some sort of incomplete reconnect. The BT stack no longer syncs and after a timeout, the host side will initiate a reconnect successfully. |
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
This commit may be incomplete as we may need to fix button mappings specifically for this controller. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
This commit may be incomplete as we may need to fix button mappings specifically for this controller by faking the correct Windows mode device PID. The mapping itself should be okay after a follow-up commit as it was derived from the device descriptor. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
This commit may be incomplete as we may need to fix button mappings specifically for this controller by faking the correct Windows mode device PID. The mapping itself should be okay after a follow-up commit as it was derived from the device descriptor. This squashes the pull request consisting of: commit 3f3860b ("Add Support For Xbox Elite Series 2 Wireless") commit 896ebce ("Add support for the Xbox Elite 2 controller") Closes: atar-axis#144 Affects: atar-axis#142 Signed-off-by: Kai Krakow <[email protected]>
I hate to necro-bump, but I'm seeing this this same behavior on the latest master. (041e8d8). Any idea what might be happening? Happy to provide btmon log/dmesg stuff as mentioned in the debugging guide, just need to know what would be most useful. |
We should really open an new issue for this. This report was about adding support, not working around bugs in the firmware. But here are a few tips you could test out while opening a new report: Disabling trigger rumble mode may work around this (as you probably already found out). Personally, since we worked around a firmware bug, I no longer see this bug on XB1S. But XBE2 may need a different timing. You could adjust the timing at around line 110 with this define: #define XPADNEO_RUMBLE_THROTTLE_DELAY (10L * HZ / 1000) The value Any higher value than 50ms makes no sense and we're chasing a different problem then. 50ms would be only 20 rps (rumbles per second) - you will really feel a lag then, that's probably not intended by the makers of the firmware - while 100 rps (10ms intervals) is probably reasonable. FWIW, this is probably purely about the rumble itself. There's no relation to using the trigger rumble, it just happens we're sending a lot more rumble commands in trigger rumble mode, and probably also more packets due to the triggers being in motion. So the problem may still occur with trigger rumble disabled. OTOH, we may need to use higher intervals for trigger rumble... Put your findings into the new report. Thanks. |
For #142
On my Fedora 31 system, this does get xpadneo working with my Xbox Elite Series 2 over Bluetooth. "udevadm info -a -n /dev/input/js0" and "hwinfo" both show that xpadneo is indeed the driver being used for gamepad.
I confirmed with evtest that every button on the gamepad generates events.
Are the control mappings right? No, but that should be fixed in userspace (using SDL2's controller mappings) and not in the kernel driver.