-
Notifications
You must be signed in to change notification settings - Fork 115
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
Xbox One Series X|S Controller bluetooth Connection Loop or Disconnects when controller exits pair mode (timeout) #295
Comments
Which kernel version? |
|
Okay, 5.12 no longer needs the ERTM work-around. Can you check that ERTM is actually enabled as it should be (aka Also, I'm seeing something similar currently with kernel 5.10 LTS. To connect the gamepad, I have to force it back into pairing mode (by holding the connect button), then issue a manual connect from user space. If you are using KDE, you may need to uninstall kdeconnect as it interferes with the Bluetooth RF environment due to a bug when interacting with KIO. If it works when going the manual connect mode, you are probably seeing bluez/bluez#127. If it works after uninstalling kdeconnect, you are probably seeing bluez/bluez#123. If you want to test the gamepad after connection, |
With To connect I have forced it back into pairing mode and connected using |
If the controller paired already, do not use ERTM is probably set back on reboot because there's a config file somewhere in |
I have the same issue - doesn't connect without pairing mode and is in a connect/disconnect loop when in pairing mode. I'm on manjaro testing running 5.12.8 edit: just tried another (realtek RTL8761B) bluetooth-adapter instead of the Intel Corp. Wireless-AC 3168 Bluetooth my mainboard offers - same result :/ |
I only run pair again after running |
Yes, this is what I currently have to do, too: Force the already paired controller into pairing mode, then send a connect command from the PC. But then it connects just fine and the connection is stable. I'll look into the Bluetooth kernel patches during the next kernel release cycle to see if there are any patches that may affect this behavior. Unfortunately, it doesn't look like Bluetooth patches are back-ported to older or LTS kernels very often, usually only some critical bug fixes or supporting some new Bluetooth adapters on specific request.
The problem with just killing it is that it may just respawn too easily. If you don't want to uninstall it, you could try making the daemon |
i checked, it didn't respawn but i had to start it manually again after the test :) To be clear: for me, the controller only connects in pairing mode (but automatically so), but enters a connect-disconnect-loop. If i exit pairing mode again, it is disconnected again. Unpairing it and manually pairing/connecting in pairing mode yields the exact same result. At no point (besides using a usb-cable) is the controller usable :/ |
Please run |
thats a log when i activate the pairing mode on the already paired controller and it enters the connect/disconnect loop. Just in case that this is more useful, this is one where i removed the controller in bluetoothctl, then pair, trust, connect while controller is in pairing mode. let me know if any other log variant might be useful, too :) |
Okay, this is a BLE controller variant, probably the new one with the Share button. To properly investigate this, I need such a gamepad myself and thanks to ko-fi, I already ordered it. Should be delivered within the next 6 weeks, the order information has been just updated today. But it differs from the model of the original reporter, so I cannot figure out yet if it is the same problem. What I can say already: Unfortunately, we cannot fix this in xpadneo, but I'll try my best to come up with a work-around and trying kernel Bluetooth patches. |
Yes, it's a new Series X/S type with a share button (i thought thats what "one X" in the title is refering to?). Had an "old" xbox one wireless before (sadly RMA'd without replacement but refund instead) that worked well. Connected with a usb-cable, it works well, too (not sure if xpadneo is used in that case?). |
Hmm, maybe. I'm not sure. I should add some checkboxes to the issue template to identify the exact model. The first Bluetooth version of the controller was the Xbox One S controller. The new should have "Series X|S" in the name. The original report doesn't match either of these.
No, most probably xpad is used then, and that creates an input device itself. xpadneo is a HID driver and depends on the kernel to create a HID device for us. I'm currently planning on the idea to make a USB device driver which exposes the controller USB connection as a HID device, then xpadneo would do the HID part. Since USB and the GIP dongle use an almost identical protocol, adding support for the GIP dongle later would be easy then and you'd no longer need to rely on the buggy Bluetooth implementation of the gamepad (if you own such a dongle). OTOH, the gamepad works just fine on Android via Bluetooth (and it was probably designed only with Android Bluetooth in mind), and it works mostly fine with Windows Bluetooth (it shows some of the same bugs and Linux there but usually it connects just fine). So I think there's something important missing in the Linux Bluetooth stack. Android uses the same Bluetooth kernel drivers but a different Bluetooth user-space stack (not bluez but fluoride) so the needed fixes are most probably missing in bluez (except for some chip quirks that may exist in some Bluetooth kernel drivers). |
I have the same issue... Connected with a usb-cable, it works well. Model Number: 1914 $ uname -a
$ journalctl -f
# bluetooth
# btmgmt
$ btmgmt info
Bluez just does not connect, with or without xpadneo... Xbox controller works fine on Windows and Android. |
@RuiGuilherme Unfortunately, xpadneo cannot control the Bluetooth connection, it won't see the device unless bluez has successfully paired/connected it. That's why it doesn't matter if you use or don't use xpadneo. The problem should be reported to the bluez project if you're using kernel 5.12 or above, because with previous kernel versions, the xpadneo installation disabled ERTM which deviates from the default bluez settings. |
Today, the controller finally arrived. Thanks to all my supporters on ko-fi. On the first try, the controller seemed to connect just fine and rumbled, but it didn't send any input. On successive tries some hours later (I've just let it idle until it gave up on the connection and turned off), it now is in a reconnect loop when I put it into pairing mode. Without pairing mode, it won't connect. So I finally got the real hardware to play with and test things out. Next try will be to update the firmware first. |
The firmware update did not improve things but it reset the controller back into a state where it would connect once and rumble, but not send any input. Successive connects just result in a reconnect loop, so the same problem as #295 (comment) even after a firmware update. My Android phone (Pixel 3 XL) has a similar problem: The controller won't pair at all. OTOH, on the packaging is a sticker that says iOS support is coming later - maybe this includes proper Bluetooth connectivity for Android, too. I didn't try Windows Bluetooth connectivity yet. But at the current state, I'd say that this is a problem that should be reported to the bluez project if the controller just works using Bluetooth in Windows on the same system, i.e. same Bluetooth adapter. If it doesn't work on either OS, we may need to wait until MS releases a firmware with official iOS support. In the meantime, I'll take a look at the Bluetooth protocol but I really don't know much about it. If anyone does, help would be appreciated on how to inspect and debug the problem. |
While i don't have windows on my system, i already created https://bugzilla.kernel.org/show_bug.cgi?id=213431 after your explanation in #295 (comment) - no response yet though. |
I did that months ago and received no reply, once to kernel bugzilla (which seems considered mostly read-only by the kernel devs, I think, most reports should go to the mailing lists), and once to the bluez mailing list. I received some attention on the bluez github project but just once, and for a very different problem. I'm not sure how to tackle that from here. Does the bluez project need some proper support? Maybe hardware to test with? Whom would we need to get in contact with? Every documentation about bluez (how to contact/support/report bugs) seems pretty sparse. I have the feeling that project only consists of very few (but dedicated) people, and what they really need is some more developers. Unfortunately, docs about Bluetooth specs are pretty hard to read and understand, so it would have a steep learning curve at best. |
I agree that the bluez website is not really clear about bugreports. I first tried their IRC channel but got no answer there (only 10 or so people there anyway), so i created the bugzilla report. |
@Termuellinator There are already two reports by me. Feel free to add your report to an existing one if you see fit, otherwise just open a new one referencing this. Github will automatically crosslink the issue here then, so everyone participating will be aware of it. |
If your issues are already tackling the issues here, then there'd be no real benefit for another one i guess - i wasn't sure if bluez/bluez#127 may have the same root as this issue? |
What @bruno-fs posted works - I think we can update https://wiki.archlinux.org/title/Gamepad#Xbox_Wireless_Controller_/_Xbox_One_Wireless_Controller to match this new information? |
I'm pretty sure Latest bluez (5.62+) seems to fix some things. But that's actually the version used by @bruno-fs. But actually, I've seen other reports where Realtek BT chipsets are still problematic. So maybe there are kernel driver issues left. The thing is: We are still seeing people enabling ERTM unconditionally just because it's written in some wiki guides. But modern kernels (5.12+) do no longer need that work-around because underlying L2CAP features have been added - and in reality, disabling ERTM actually causes trouble with rumble on some models/chipsets and has never been a good work-around. |
Next month I should get a bluetooth card with intel AX 210 chipset. I'll report here how it goes (or is there a better place to send this?) |
Testing new device BT adapter. Same behavior as before. Manjaro Linux: 5.16.14-1-MANJARO
Vanilla bluetooth confWith stock config on /etc/bluetooth/main.conf the controller ended up on loop connecting/disconnecting steps to reproduce: "forget" all previously paired bluetooth devices (did this through kde-plasma ui) > change /etc/bluetooth/main.conf > systemctl restart bluetooth > btmon | tee > pair/trust/connect controller > turn off/on controller Custom configThe following config was enough to stablish a stable connection.
steps to reproduce: "forget" all previously paired bluetooth devices (did this through kde-plasma ui) > change /etc/bluetooth/main.conf > systemctl restart bluetooth > btmon | tee > pair/trust/connect controller > turn off/on controller |
Yeah, |
For completion: I got a TP-LINK BT400 and disabled the Bluetooth from my PCI WLAN Card - i upgraded my Linux Mint 20.3 with 5.4 Kernel to 5.15 and sadly it didnt work for me. I got other Problems with the 5.15 Kernel so i have to downgrade it back to the official supported 5.4 Kernel. So atm i have a unusable Gamecontroller brick :( |
BT400 is working just fine for me... I wonder if something else plays into this, maybe some kernel setting? |
It's a Time ago i try around this - but the only kernel modification i remember was the deactivation of the PCI Bluetooth (not sure about this was really on kernel side) - else i never modify the kernel But anyway i got System Instability Issues with the 5.15 Kernel on my Mint 20.3 - so that isn't a Option so far Linux Mint officially Support this Kernel Version The latest Kernel Version Linux Mint 20.3 officially Supports atm are 5.13.0-37 |
So 5.10 would be a newer LTS kernel than 5.4... My system is running fine with 5.15 LTS but I'm pretty sure back with 5.10 it was also working well. 5.4 is really old. |
If you mean the Controller will may work properly with 5.10 i give it another try with this Kernel |
Is there any working solution for this problem? My xbox series controller arrived today and I can't get it connected, same issue as OP described. |
@DavidFencl Not really. First ensure you're running the latest controller firmware, you can do this by connecting the controller to a Windows machine and using the Xbox Accessories app from the Windows Store, or by connecting the controller to an Xbox. After I updated my firmware, one model just worked connecting but I had to try 3-5 times for a different model by removing it from bluez pairing DB and start over with the pairing process. I used the KDE Bluetooth GUI for this. It may matter a lot if other nearby devices use Bluetooth at the same time during pairing, I suggest turning Bluetooth off in all other devices within the perimeter while you pair the controller if it wasn't successful after a few attempts. We collected a few issues (some with solutions) in the projects tab of the repository (see beginning of web page). |
@kakra Thanks for input! Second firmware update solved everything. Strangly it only worked after upgrading on actual Win, when I tried to upgrade my firmware in Win VM It said it's up to date but clearly wasn't. |
In case it helps to have another data point, I tried connecting an Xbox Series X|S controller (the one with the share button) via Bluetooth and it kept disconnecting/reconnecting. I updated the controller firmware to the latest version via the Xbox Accessories App in Windows. I didn't make any other changes, and the controller seems to connect and work just fine now. I'm not sure what the original version of the firmware was, because the Xbox Accessories app wouldn't tell me the firmware version until I updated. The new firmware version is 5.13.3143.0 I did run
Maybe Lastly, I don't know how to see what kernel module a bluetooth device is using, but my best guess is I'm using vanilla xpad, in case it matters:
I'm using Ubuntu 20.04 with this kernel:
|
Yes, you can probably assume that.
xpad does not support Bluetooth devices. It was probably loaded when you connected the controller via USB: Over cable, it acts as a GIP device, over Bluetooth it acts as a HID device. You can probably look in |
Tests showed that device privacy is actually not needed for the Xbox BLE controller. But the device seems to support JustWorks re-pairing. See-also: #295 See-also: #259 Signed-off-by: Kai Krakow <[email protected]>
Thanks to everybody on #295. Fixes: #308 [style fixes by Kai Krakow, changed commit description] Closes: #309 Signed-off-by: Kai Krakow <[email protected]>
So on a fresh install today, had this issue crop up. I fixed it with the
under [General] of |
I think Additionally, the troubleshooting docs have a section about this: Actually, Does |
Bluez 5.53, ZEXMTE Bluetooth USB Dongle, Kernel 5.17.12-xanmod1 No dmesg warnings. I tried what you suggested, and removed |
Please run |
Bus 003 Device 002: ID 0bda:a725 Realtek Semiconductor Corp. Bluetooth 5.1 Radio |
I think there was one report with at least another Realtek dongle before, so we might add a troubleshooting note especially for that chipset. But I think this better needs to be resolved in bluez or the kernel drivers (or the controller firmware itself for that matter). Many other dongles seem to work now without problems (especially after the latest firmware updates). |
Closing old Bluetooth issues, please report to the bluez project if the problem persists. |
Working for me on Debian 12 |
Not working for me on Debian 12 with KDE X11, I had to use xone instead and instantly worked. There also no safe way to uninstall kdeconnect (as suggested by a contributer above), since it's a system package. |
Using bluetoothctl the Xbox one X controller either enters a connect/disconnect loop or connects and even shows in jstest but disconnects when the controller leaves pairing move from a timeout. When the second of those two happens it vibrates when it says it is cconnected but the light does not stop fast blinking until it times out and disconnects. In jstest the controller shows on /dev/input/js0 but does not actually send any button presses. The controller works on android and is the most recent version, updated on Win 10.
I have already set disable_ertm to Y and have ControllerMode set to dual and tried with Privacy set to device in /etc/bluetooth/main.conf.
The output of
btmgmt info
showing that I have le and br/edr set:When I run
sudo dmesg | grep Bluetooth | grep Firmware
I getBluetooth: hci0: Firmware revision 0.0 build 118 week 15 2021
which I have confirmed with another person to be working for connecting the controller on the same model laptop (asus g14).Dmesg immedeatly after connecting:
Bluetoothctl once connected and once controllertimes out:
The text was updated successfully, but these errors were encountered: