atar-axis / xpadneo

Advanced Linux Driver for Xbox One Wireless Controller (shipped with Xbox One S)
https://atar-axis.github.io/xpadneo/
GNU General Public License v3.0
1.87k stars 110 forks source link

Series X|S Controller Not Recognized (Error -22) #407

Closed BorisBrock closed 1 year ago

BorisBrock commented 1 year ago

Version of xpadneo

0.9.5-2

Controller Model

Connection mode

Installed Software

Protocol Information

Please help us identify at which layer the problem can be found if you want to report mapping errors or if the controller fails to be detected:

Please describe how it is failing below in the next sections.

Severity / Impact

Describe the Bug

The controller pairs fine via bluetooth. But after that it is not usable as a gamepad. sudo dmesg shows the following error:

[ 656.036595] xpadneo 0005:045E:0B13.000B: BLE firmware version 5.13 [ 656.036601] xpadneo 0005:045E:0B13.000B: pretending XB1S Windows wireless mode (changed PID from 0x0B13 to 0x028E) [ 656.036604] xpadneo 0005:045E:0B13.000B: working around wrong SDL2 mappings (changed version from 0x00000513 to 0x00001130) [ 656.036606] xpadneo 0005:045E:0B13.000B: report descriptor size: 110 bytes [ 656.036608] xpadneo 0005:045E:0B13.000B: fixing up Rx axis [ 656.036609] xpadneo 0005:045E:0B13.000B: fixing up Ry axis [ 656.036610] xpadneo 0005:045E:0B13.000B: fixing up Z axis [ 656.036612] xpadneo 0005:045E:0B13.000B: fixing up Rz axis [ 656.036663] xpadneo 0005:045E:0B13.000B: unbalanced collection at end of report description [ 656.036669] xpadneo 0005:045E:0B13.000B: parse failed [ 656.036671] xpadneo: probe of 0005:045E:0B13.000B failed with error -22

Steps to Reproduce

  1. Turn on series X|s controller
  2. Pair gamepad via Bluetooth

Expected Behavior

After pairing the gamepad I would expect it to be visible in the system and fully usable for gaming.

Screenshots / GIFs / Videos

N.a.

System Information

# uname -a
Linux gaming-pc 6.1.9-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Feb  1 20:38:52 UTC 2023 x86_64 GNU/Linux
# xxd -c20 -g1 /sys/module/hid_xpadneo/drivers/hid:xpadneo/0005:045E:*/report_descriptor | tee >(cksum)
zsh: correct 'xxd' to 'xsd' [nyae]?

Controller and Bluetooth Information

Additional Context

xpadneo-btmon.txt xpadneo-dmesg.txt xpadneo-lsusb.txt

kakra commented 1 year ago

Is this the latest firmware? I didn't try it yet...

BorisBrock commented 1 year ago

Is this the latest firmware? I didn't try it yet...

I've updated my controller the last time I was on a Windows machine, which was roughly one month ago (if I remember correctly). So the firmware should be pretty up-to-date.

kakra commented 1 year ago

Okay, so I'll need to update my XBXS controller to reproduce... The version (some months) old I still have installed on it works just fine.

grafgooseman commented 1 year ago

Even the wired Xbox X controller connection doesn't work for me. (doesn't matter that the Wiredly Connection Xbox X controller is identified as XBox 360 by Gamepad Tester Website)

kakra commented 1 year ago

For some unknown reason, I couldn't update the firmware yet via my KVM Windows. All my Windows VMs are somehow broken by complaining not being able to create the swap file - resulting in all kinds of errors and stalling when starting applications. I'll test it as soon as updating works again for me.

kakra commented 1 year ago

Okay, I managed to find what was causing the issues with my VMs (disk IO timeouts, vioscsi seems to not be usable currently in Windows). I successfully booted my Windows 11 VM and updated all my controllers to the latest version. Each one (XB1S, XBE2, XBXS) seems stable, they reliably connect to Bluetooth, connection mode switching (by double-clicking the connect button) works flawlessly (controller goes back and forth to the Windows VM via Xbox dongle and Linux via Bluetooth), connecting via USB works fine, there's no input delay or dropped packets, no errors or warnings in dmesg.

@grafgooseman I wonder if there's an issue with your Bluethooth chipset. For using USB, that doesn't go through xpadneo at all, and gamepad tester websites may not be compatible with some of the custom drivers, e.g. it doesn't play well with Chrome and xpadneo). xpadneo only supports HID devices, and that is only for Bluetooth connections, xpadneo even doesn't know about Bluetooth, it just sees the HID interface provided by Bluetooth user-space (5.x firmware) or by the kernel input layer (4.x firmware).

@BorisBrock I cannot reproduce your issue here (unbalanced collection at end of report description) on the same kernel branch (6.1) and latest Xbox Acc updates from Microsoft. Can you retry with the xpadneo master branch? Distributions may have a package xpadneo-git which installs the latest development version. Maybe your Bluetooth stack is improperly patched in the HID code, so maybe check if you can upgrade or downgrade Bluez.

OTOH, I do not see this log in the dmesg file you've attached:

[ 656.036671] xpadneo: probe of 0005:045E:0B13.000B failed with error -22

In your dmesg log, everything looks fine. According to the timestamps, the log even seems to be from another boot or another system.

kakra commented 1 year ago

Closing due to no feedback, this is a driver issue, cannot reproduce here with current firmware.

BogdanTheGeek commented 2 months ago

I was running into the same issue, only 1 of my 3 xbox one s controllers would connect and work. I managed to (somehow) fix it by just plugging them into a windows 10 machine and waiting for the drivers to install. After that, they just connected on linux.

kakra commented 2 months ago

I was running into the same issue, only 1 of my 3 xbox one s controllers would connect and work. I managed to (somehow) fix it by just plugging them into a windows 10 machine and waiting for the drivers to install. After that, they just connected on linux.

This is strange... But I think I remember the early firmware versions did something similar: After being connected to Windows once, they worked differently.