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
2.04k stars 115 forks source link

Can't connect xbox controller, (keeps disconnecting and connecting) #166

Closed felixsanz closed 3 years ago

felixsanz commented 4 years ago

I have the common problem where the controller keeps doing this:

[CHG] Device 5C:BA:37:81:C3:DC Connected: yes
[CHG] Device 5C:BA:37:81:C3:DC Connected: no
[CHG] Device 5C:BA:37:81:C3:DC Connected: yes
[CHG] Device 5C:BA:37:81:C3:DC Connected: no

I have tried everything for many months, so now i'm finally asking for some help :(

disable_ertm is set to Y (I've tried N too, same result). I'm on 5.5.7 kernel but i've tried many kernels and some kernel modules for my rtl8822be chip.

One big problem is that I can't re-pair the device, whenever i type remove, the controller is automatically paired again!

[bluetooth]# remove 5C:BA:37:81:C3:DC
[DEL] Device 5C:BA:37:81:C3:DC Xbox Wireless Controller
Device has been removed
[NEW] Device 5C:BA:37:81:C3:DC Xbox Wireless Controller
[CHG] Device 5C:BA:37:81:C3:DC Modalias: usb:v045Ep02E0d0903
[CHG] Device 5C:BA:37:81:C3:DC UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:BA:37:81:C3:DC UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:BA:37:81:C3:DC ServicesResolved: yes
[CHG] Device 5C:BA:37:81:C3:DC Paired: yes
[CHG] Device 5C:BA:37:81:C3:DC ServicesResolved: no
[CHG] Device 5C:BA:37:81:C3:DC Connected: no
[CHG] Device 5C:BA:37:81:C3:DC Connected: yes
[CHG] Device 5C:BA:37:81:C3:DC Connected: no
[CHG] Device 5C:BA:37:81:C3:DC Connected: yes
[CHG] Device 5C:BA:37:81:C3:DC Connected: no
[CHG] Device 5C:BA:37:81:C3:DC Connected: yes
[CHG] Device 5C:BA:37:81:C3:DC Connected: no
[CHG] Device 5C:BA:37:81:C3:DC Connected: yes

If i type pair, i get this:

[bluetooth]# pair 5C:BA:37:81:C3:DC
Attempting to pair with 5C:BA:37:81:C3:DC
Failed to pair: org.bluez.Error.AlreadyExists

I don't know what else to do! I have 2 controllers that works fine on Windows but never worked on Linux. So frustrating so I hope someone could give me some direction.

Thanks!

Kzimir commented 3 years ago

I played 1 hour with my XBox gamepad + bluetooth and i had 3 disconnections (The pad reconnect alone).

kakra commented 3 years ago

Should be fixed by https://github.com/atar-axis/xpadneo/pull/288

AnimatedFreak commented 2 years ago

Hello I'm sorry if this isn't the right place to ask this, but I can't find answers anywhere. I followed the guide that @kakra posted and it worked, my controller is finally connected. However no application seem to find it despite the bluetooth applet on KDE saying that it is connected as an input device. Emulators like Kega and Dolphin don't find it, Steam doesn't find it and even the settings on KDE for testing game controllers can't find it. It just says No joystick device automatically found on this computer. Checks were done in /dev/js[0-4] and /dev/input/js[0-4] If you know that there is one attached, please enter the correct device file. Am I doing something wrong? I've tried rebooting several times. Is this the wrong place to ask for help?

kakra commented 2 years ago

Please first check with evtest and the output of dmesg, /dev/js* is only a secondary device building upon the controller device itself. You may want to head over to our Discord channels for detailed help.

AnimatedFreak commented 2 years ago

Thank you for the reply Using evtest it did not finding the controller. But dmesg however found it and listed it three times. At the end like this:

[   18.311630] input: Xbox Wireless Controller as /devices/virtual/misc/uhid/0005:045E:0B13.0007/input/input30
[   18.311724] hid-generic 0005:045E:0B13.0007: input,hidraw6: BLUETOOTH HID v5.01 Gamepad [Xbox Wireless Controller] on 00:19:d2:ff:a7:4d
[  908.469842] input: Xbox Wireless Controller as /devices/virtual/misc/uhid/0005:045E:0B13.0008/input/input31
[  908.470130] hid-generic 0005:045E:0B13.0008: input,hidraw6: BLUETOOTH HID v5.01 Gamepad [Xbox Wireless Controller] on 00:19:d2:ff:a7:4d
[ 2058.534314] input: Xbox Wireless Controller as /devices/virtual/misc/uhid/0005:045E:0B13.0009/input/input32
[ 2058.534565] hid-generic 0005:045E:0B13.0009: input,hidraw6: BLUETOOTH HID v5.01 Gamepad [Xbox Wireless Controller] on 00:19:d2:ff:a7:4d

I've looked on the github and other places for a link to a discord channel but I cannot find it. Would you mind sending me an invite link?

kakra commented 2 years ago

dmesg indicates that the device did not properly pair to Bluetooth. Also, xpadneo doesn't bind to the device so it probably detaches before anything else can happen.

The Discord invite is at the top of the project frontpage: It's the chat badge.

Jach commented 1 year ago

Apologies for the necro, just wanted to note my own stupidity and maybe save similarly dull people a bit of time if they stumble on this thread since it was the first search result.

My controller was constantly connecting and disconnecting, until I got it very close to my PC case, then it would stay connected. It was then that I realized I never bothered plugging in antennas into the back of my motherboard. $6 later and everything is peachy.

yosh-se commented 11 months ago

I had the same symptoms, and after adding Privacy = device into the [General] section of /etc/bluetooth/main.conf followed by a restart of my bluetooth service the pairing issue went away instantly.

koodistrom commented 4 months ago

This is still one of top google results when searching with these symptoms so just dropping a comment to inform what was the solution in my case in hope that it might help some one else:

I updated the controller's firmware (it requires a windows machine and xbox accessories app :disappointed: ) and then when I removed the controller from the Bluetooth devices and reconnected everything worked normally.