Bug 2066216 - Bluetooth cannot scan for new devices
Summary: Bluetooth cannot scan for new devices
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bluez
Version: 36
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Gopal krishna tiwari
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-21 09:31 UTC by Garrett LeSage
Modified: 2022-04-05 15:27 UTC (History)
5 users (show)

Fixed In Version: bluez-5.64-1.fc35 bluez-5.64-1.fc36 bluez-5.64-1.fc34
Clone Of:
Environment:
Last Closed: 2022-03-22 09:45:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Garrett LeSage 2022-03-21 09:31:55 UTC
Description of problem:

Bluetooth does not scan when it has contents in /var/lib/bluetooth/

During fresh installs and when /var/lib/bluetooth/* is removed (and a reboot immediately happens), scanning is possible. However, pairing a device and rebooting causes scanning for devices to not work.


Version-Release number of selected component (if applicable):

bluez-5.63-3.fc36.x86_64


How reproducible:

Every time.


Steps to Reproduce:
1. Make sure to pair a Bluetooth device.
2. Reboot.
3. Attempt to scan.


Actual results:

Scanning isn't possible.


Expected results:

Scanning for devices should work.


Additional info:

This affects multiple devices with different Bluetooth vendors, so I doubt it's related to packaged firmware updates.

ThinkPad 14s:
Bus 001 Device 008: ID 8087:0026 Intel Corp. AX201 Bluetooth

Dell XPS 13 9360:
Bus 001 Device 002: ID 0cf3:e300 Qualcomm Atheros Communications QCA61x4 Bluetooth 4.0

This is on kernel 5.17.0-0.rc7.116.fc36.x86_64 (latest for F36 pre-Beta) for both systems.


GNOME Settings uses Bluez as a backend, and has this no-scanning issue too. When running it in verbose mode (gnome-control-center -v), it reports:

10:17:36.0987                 Bluetooth:    DEBUG: Error calling StartDiscovery() on /org/bluez/hci0 org.bluez.Adapter1: Timeout was reached (g-io-error-quark, 24)


bluetoothctl, when told to scan with `scan on`, *eventually* times out (after what seems like minutes) and reports:

Failed to start discovery: org.freedesktop.DBus.Error.NoReply

Comment 1 Garrett LeSage 2022-03-21 09:33:56 UTC
I checked the Bluez website and there's a new release that isn't in F36 or on Bodhi yet. It claims to fix scanning issues:

http://www.bluez.org/release-of-bluez-5-64/

"This is another release mostly with the bug fixes on HOG, GATT, A2DP, Media, AVDTP, AVRCP, and scanning failure."

So I guess the solution is to build this new version of Bluez, most likely.

Comment 2 Peter Robinson 2022-03-21 12:31:27 UTC
Works OK on my ThinkPad X1 gen9 with "Bus 003 Device 004: ID 8087:0026 Intel Corp. AX201 Bluetooth" and 5.17.0-0.rc8.123.fc36.x86_64

Comment 3 Fedora Update System 2022-03-21 22:03:16 UTC
FEDORA-2022-bb9b2a715b has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2022-bb9b2a715b

Comment 4 Fedora Update System 2022-03-21 22:03:19 UTC
FEDORA-2022-f51c0749d8 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-f51c0749d8

Comment 5 Fedora Update System 2022-03-21 22:03:21 UTC
FEDORA-2022-8801569fee has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-8801569fee

Comment 6 Fedora Update System 2022-03-22 04:14:28 UTC
FEDORA-2022-f51c0749d8 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-f51c0749d8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-f51c0749d8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2022-03-22 04:30:56 UTC
FEDORA-2022-bb9b2a715b has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-bb9b2a715b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-bb9b2a715b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Garrett LeSage 2022-03-22 08:23:31 UTC
Thanks for builds of the new version!

I've upgraded both of my laptops (work, with Silverblue, and personal, with normal Workstation) running Fedora 36 pre-beta and I still cannot scan for devices.

For what it's worth: It's not just me and my 2 different laptops (from different manufacturers) either, others are affected as well:

https://twitter.com/CassidyJames/status/1505963891095793665
https://twitter.com/nekohayo/status/1503450327290425347

There's something different in Fedora 36 versus 35. (It's either something in Bluez (possibly even due to being compiled differently in F36 vs. F35?) or further down the stack, like something that might've changed glibc or the kernel?) I'm not sure how to further debug this, but I'm happy to try out other packages or due some debugging locally with some instructions.

Comment 9 Garrett LeSage 2022-03-22 08:46:43 UTC
I noticed "[  495.039893] Bluetooth: hci0: unexpected event 0xff length: 4 > 0" in my dmesg, so I did a search and found:

https://lore.kernel.org/all/CABBYNZ+mO1gQgfwhemY9cqbi8vNLm_60A9c1vPYT2tH4rhgFww@mail.gmail.com/T/

> Since kernel 5.17, some users are seeing problems connecting to
bluetooth devices, the problem doesn't happen with 5.16 series
kernels."
>
> So far two different devices are affected, although it's possible it's
not even device related, but could be the interface between kernel and
user space.

FWIW: I'm on the latest kernel in F36 (rc7):

kernel-5.17.0-0.rc7.116.fc36.x86_64
kernel-core-5.17.0-0.rc7.116.fc36.x86_64
kernel-modules-5.17.0-0.rc7.116.fc36.x86_64
kernel-modules-extra-5.17.0-0.rc7.116.fc36.x86_64
kernel-tools-libs-5.17.0-0.rc7.git0.1.fc36.x86_64
kernel-tools-5.17.0-0.rc7.git0.1.fc36.x86_64


There's a related issue filed against the kernel in rawhide @ https://bugzilla.redhat.com/show_bug.cgi?id=2053283 ... but it's closed. However, it has some additional related details about pairing problems too.

Comment 10 Garrett LeSage 2022-03-22 09:45:56 UTC
Kernel 5.17.0 rc8 (kernel-5.17.0-0.rc8.123.fc36.x86_64) seems to fix Bluetooth here, including scanning, on my T14s and XPS 13 9360.

The build is @
https://bodhi.fedoraproject.org/updates/FEDORA-2022-6a1a658421


(FWIW: I tested on Silverblue with `rpm-ostree override replace https://bodhi.fedoraproject.org/updates/FEDORA-2022-6a1a658421` and rebooted.)


Closing as as it seems the bug is was in the kernel (and partially in Bluez, according to release notes of the latest version). It seems fixed with both the latest bluez and the latest kernel.

Comment 11 Peter Robinson 2022-03-22 10:19:41 UTC
(In reply to Garrett LeSage from comment #10)
> Kernel 5.17.0 rc8 (kernel-5.17.0-0.rc8.123.fc36.x86_64) seems to fix
> Bluetooth here, including scanning, on my T14s and XPS 13 9360.

So the testing I had done with my X1g9 was on rc8 so that would explain why it was working for me.

Comment 12 Fedora Update System 2022-03-22 17:54:50 UTC
FEDORA-2022-8801569fee has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-8801569fee`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-8801569fee

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2022-03-24 16:15:49 UTC
FEDORA-2022-f51c0749d8 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2022-03-29 00:17:05 UTC
FEDORA-2022-8801569fee has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2022-04-05 15:27:24 UTC
FEDORA-2022-bb9b2a715b has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.