paroj / xpad

Linux Kernel Driver for the Xbox/ Xbox 360/ Xbox One Controllers
823 stars 182 forks source link

Microsoft Xbox 360 USB controller does not get properly initialized, automatically reconnects and gets erroneously recognized as a PS3 controller #249

Closed Z3em closed 1 year ago

Z3em commented 1 year ago

When the controller is connected normally it fails to initialize and after a couple seconds it "reboots", after which it gets recognized as a PS3 controller with Move and the LED ring starts flashing all 4 segments. evtest reports no input events from the device. An example of dmesg output when this occurs:

[17077.477319] usb 1-3: new full-speed USB device number 81 using xhci_hcd
[17077.611062] usb 1-3: New USB device found, idVendor=045e, idProduct=028e, bcdDevice= 1.10
[17077.611068] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[17077.611070] usb 1-3: Product: Controller
[17077.611071] usb 1-3: Manufacturer: Sony
[17077.611073] usb 1-3: SerialNumber: ㈀㈀㔀 㔀㜀\xe3\x84\x80
[17077.614918] input: Microsoft X-Box 360 pad as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/input/input160
[17078.961170] usb 1-3: USB disconnect, device number 81
[17078.961426] xpad 1-3:1.0: xpad_try_sending_next_out_packet - usb_submit_urb failed with result -19
[17080.185075] usb 1-3: new full-speed USB device number 82 using xhci_hcd
[17080.314719] usb 1-3: not running at top speed; connect to a high speed hub
[17080.317562] usb 1-3: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 1.00
[17080.317577] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[17080.317584] usb 1-3: Product: PS3 Controller
[17080.317589] usb 1-3: Manufacturer: Sony
[17080.324947] input: Sony PS3 Controller Motion Sensors as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:054C:0268.0021/input/input162
[17080.377370] input: Sony PS3 Controller as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:054C:0268.0021/input/input161
[17080.378299] sony 0003:054C:0268.0021: input,hiddev2,hidraw3: USB HID v81.11 Joystick [Sony PS3 Controller] on usb-0000:00:14.0-3/input0

If I run this script immediately after the controller is connected (before it "reboots") it gets correctly identified as an Xbox 360 controller, but evtest reports no input events from it and the LED indicator does not light up at all. Example dmesg output when that happens:

[17576.947693] usb 1-2: new full-speed USB device number 87 using xhci_hcd
[17577.082851] usb 1-2: New USB device found, idVendor=045e, idProduct=028e, bcdDevice= 1.10
[17577.082861] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[17577.082865] usb 1-2: Product: Controller
[17577.082867] usb 1-2: Manufacturer: Sony
[17577.082870] usb 1-2: SerialNumber: ㈀㈀㔀 㔀㜀\xe3\x84\x80
[17577.086146] input: Microsoft X-Box 360 pad as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/input/input170
[17578.767118] input: Microsoft X-Box 360 pad 0 as /devices/virtual/input/input171

I'm running Void Linux with kernel 6.3.6. I have tested the gamepad on the same machine under WIndows 10 and it worked flawlessly there. A generic xinput gamepad (Sven) also work flawlessly with aforementioned script.

Z3em commented 1 year ago

Turns out it's a cheap chinese replica rather than an original gamepad and the problem stems from that.