-
Notifications
You must be signed in to change notification settings - Fork 114
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
[NOT FOR QUESTIONS] Bluetooth connection stability broken #198
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Identified two possible problems for connection stability and initial connection: |
See-also: #198 Signed-off-by: Kai Krakow <[email protected]>
Updated initial post regarding Bluetooth LE issues. |
In my case, this is the solution
|
Some general updates on the topic since I was finally able to test the issue on a Windows system which had multiple Bluetooth dongles connected (that system is extensively used for VR, and the user connected all the Bluetooth dongles that came with the various accessories):
The tests included an XB1S controller which we updated to the latest firmware first. Connection with the internal AX200 Bluetooth was almost always impossible, the connection was unreliable, and most of the time it connected in some limbo state where Windows would say "connected" but the controller keeps flashing. This reminds me a lot of the behavior we can see in Linux. The other Bluetooth devices had similar issues: While they usually were able to connect, pairing and connected took a long time, some devices needed several tries before they worked. This results in the conclusion that the AX200 chipset is just borked and incompatible. Don't use it. With only one CSR 4.0 dongle connected, all devices were able to pair and connect almost instantly. Even the XB1S controller connected instantly. This works a lot better than I'm used to it in Linux: In Linux, it CAN connect instantly, but often it takes several seconds. This results in the conclusion that there are still issues with the bluez daemon. The kernel drivers for the chipsets may have an impact on that but I think most of the drivers are using btusb anyways, the driver should be in good shape, and only some new chipset revisions or cheap China clones may need btusb driver updates or quirk fixes. This leads to the conclusion that you want to use CSR chipsets most likely because those are supported very well and work with the gamepad. There's only the problem with a lot of CSR China clones on the market which you should try to avoid (but may not be possible because who knows). |
See-also: atar-axis#198 Signed-off-by: Kai Krakow <[email protected]>
See-also: #198 Signed-off-by: Kai Krakow <[email protected]>
I don't know if someone can see help with this but I felt the need to share it. Before, I made several attempts in order to get this controller to work on BT mode, but it never any success. This is my Bluetooth main conf file, that I'm using, and as I say, it's working like some kind of magic after updated the firmware. PD: excuse me my bad English, it is not my mother language.
|
same issue, it does not work on Ubuntu 22.04 |
NOTE: Do not report here if you cannot reproduce a working state with a previous kernel version.
This is a information collection issue to pinpoint the kernel change that broke the Bluetooth stability with the controller. I'll ask anyone who wants to help to provide the following information:
Stay updated
Subscribe to this thread to stay updated about Bluetooth issues with Xbox controllers. Use the button on the right to subscribe, no need to leave a comment.
Observations
btmgmt
to find that discovery is continuously active or switches off and back on almost immediately to run for around 10s each cycle. Then log out of your desktop environment to observe that this is no longer an issue, and now your controller may connect just fine and the connection is stable. The kdeconnectd daemon may be (directly or indirectly) involved here. Runningpkill kdeconnectd
may resolve the issue for you until the clients spawns it again (e.g., kdeconnectd/Plasma browser integration).Prerequisites
Information collection
Please provide kernel versions as shown by
uname -a
if possible because distributions often implement their own patchlevel versioning.zgrep '^CONFIG_HZ' /proc/config.gz
lsusb
and take note of the device number of your USB Bluetooth donglelsusb -v -s## | tee xpadneo-lsusb.txt
where##
is the device number picked in the previous step, post the resulting file.sudo btmon | tee xpadneo-btmon.txt
and connect the controller, post the resulting file.Thanks!
Kernel bug reports
Bluez bug reports (maybe also kernel bug reports)
KDE Plasma bug reports
Changelog
This documents some of the changes found with some kernel updates.
Kernels 5.4.72, 5.8.16, 5.9.1, 5.10...
Contains some Bluetooth pairing fixes. Doesn't seem to affect XB1S. Some XBE2 users report the 20s connection delay gone but I cannot confirm that. Bluetooth commits:
Some users reported a broken Bluetooth connection with these latest patches except for 5.9.1 or higher.
Kernels 5.9, 5.10
The kernel Bluetooth stack solved a bug for BLE devices in privacy mode: https://bugzilla.kernel.org/show_bug.cgi?id=209745, seen since 5.9, solved since 5.10.4, not sure if it has been backported yet but it usually gets fixed, too, in all kernel versions chronologically newer than 5.10.4 so 5.9.17 should be fine, too.
Update: The
Privacy=device
setting is actually not needed and should not be used - leave it at its default setting.Continuous discovery caused by desktop environments
At least KDE Plasma seems to exhibit a behavior that causes it to continuously trying to discover nearby devices which in turn makes Bluetooth connections from Xbox controllers unstable and hardly possible to connect. The problem was discovered while investigating this report: bluez/bluez#123
The bug is not in KDE Bluedevil itself but rather another component which probably triggers it by listing the contents of the
bluetooth:/
kio virtual directory: https://bugs.kde.org/show_bug.cgi?id=435444If your controllers connect without problems and the connection is stable after logging out of your desktop environment, you're probably affected by this behavior. Different Xbox controller models act slightly different when affected by this behavior: Sometimes it pairs and connects just fine but input events get lost or laggy, sometimes the connecting or pairing may just take 30-60s but the input event transport itself is unaffected.
We currently know of only one way to work around this if KDE or kdeconnect is used: Kill kdeconnectd (
pkill kdeconnectd
) or install kdeconnectd without Bluetooth support.HCI event ordering
There may be an issue with the ordering of HCI events exchanged between the Bluetooth stack and the gamepad:
btmon
log between a failed and a successful connectBluetooth LE issues
Latest Xbox controllers use Bluetooth LE. While the pairing and connecting is much more reliable IF it works, the Bluetooth stack of Linux still seems to see a lot of changes and fixes for it. If you're experiencing issues, ensure updating to the latest controller firmware, and also kernel and bluez version. Some manual tuning may still be needed to fix latency issues, see bluez/bluez#156 (comment).
Upstreaming efforts
Reported by @hadess in #44 (comment):
The text was updated successfully, but these errors were encountered: