FS#78980 - [linux] bluetooth errors on every kernel starting from 6.4

Attached to Project: Arch Linux
Opened by Mariusz Smołka (Freyon77) - Tuesday, 04 July 2023, 12:55 GMT
Last edited by Jan Alexander Steffens (heftig) - Wednesday, 19 July 2023, 21:31 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Levente Polyak (anthraxx)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Device: Intel Corporation Dual Band Wireless-AC 3165 Plus Bluetooth (rev 99)

Error log

journal ctl -p 3 -b

bluetoothd[317]: src/adapter.c:reset_adv_monitors_complete() Failed to reset Adv Monitors: Failed (0x03)
bluetoothd[317]: Failed to clear UUIDs: Failed (0x03)
bluetoothd[317]: Failed to add UUID: Failed (0x03)
bluetoothd[317]: Failed to add UUID: Failed (0x03)
bluetoothd[317]: Failed to add UUID: Failed (0x03)

It works on 6.3.9

Steps to reproduce:

Install any kernel starting from 6.4 and up

This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Wednesday, 19 July 2023, 21:31 GMT
Reason for closing:  Fixed
Additional comments about closing:  linux 6.4.4.arch1-1
Comment by Toolybird (Toolybird) - Wednesday, 05 July 2023, 00:30 GMT
> It works on 6.3.9

Therefore it's an upstream kernel regression. General advice for debugging kernel regressions [1]. You might have better luck reporting this upstream to the relevant kernel folks because it's not an Arch packaging issue. Please let us know what you find out.

[1] https://wiki.archlinux.org/title/Kernel#Debugging_regressions
Comment by John Holland (jbtotheh) - Sunday, 09 July 2023, 23:29 GMT
this device Bluetooth: hci0: BCM: product 05ac:8289
works on my macbook pro early 2014 with Linux archlinux 6.1.38-1-lts. it is not seen by 6.4.2.
Comment by Nick Bates (nick4linux) - Tuesday, 11 July 2023, 13:06 GMT
First, a question: do we have an upstream ticket number (and/or a URL)?

Known working config: kernel 6.3.9-arch1-1, with {bluez,bluez-libs,bluez-utils} 5.66-1, {pulseaudio,pulseaudio-bluetooth} 16.1-6, {pipewire,libpipewire} 1:0.3.71-2
Broken config: kernel 6.4.2-arch1-1, with {bluez,bluez-libs,bluez-utils} 5.68-1, {pulseaudio,pulseaudio-bluetooth} 16.1-6, {pipewire,libpipewire} 1:0.3.73-1

In the meantime, to assist, I have contributed several files from my Dell Latitude E7240 where I have a very similar problem. It is pairing with a Plantronics BackBeat GO 600 headphones. Most files have the command that produced the output in their first line. I have tweaked the /etc/bluetooth/main.conf file as a kludge/workaround.

bluetoothctl.txt and bluetoothd-n-d.txt: these two files come from a session where I "sudo systemctl stop bluetooth" then start bluetooth manually in one window. In another window, I execute bluetoothctl, and within, I "power on". Then I switch on my headphones, which responds verbally with "power on", "phone 1 connected" (as it normally does). Then it continues abnormally with "phone 1 disconnected", "phone 2 connected". After that I'm able to play YouTube. Then I switch off my headphones and exit from bluetoothctl. Note that bluetoothctl has a lot more output than normal.

main.conf: this is my config file. Note non-standard edits at line 123-124, 261-269, and 332 (the first two were put in while diagnosing this problem, the last has been there for some time: to disable auto-power up). I currently have GATT.Channels = 3 (which seems to function as a workaround). If I remove it, the default is supposedly Channels = 1, which seems to cause bluetoothd to crash and not restart.

lsusb-v.txt: output from lsusb -v for the Bluetooth controller.

systool.txt, modinfo_btusb.txt, and lsmod.txt: output from these tools showing information/parameters for the btusb module (for lsmod I use sed, not grep, so I can output line 1 as well).

uname-a.txt: output from uname -a; the kernel version is 6.4.2-arch1-1. As an aside, the previous (working) kernel was 6.3.9-arch1-1 .

journalctl-kernel-642-workaround.txt: this is the output from journalctl after the update/reboot that installed the 6.4.2 kernel. Note how line 5 says "GATT.Channels = 3 is out of range (> 5)", which conflicts with the possible values documented in the main.conf as supplied.

journalctl-kernel-639-working.txt: this is the output from journalctl from an earlier boot (while it was running the 6.3.9 kernel), during which I used the headphones.

Edit: add package versions for key modules; clarify kernel versions; grouped lsmod.txt for brevity. Edit 2: correction to pipewire version.
Comment by John Holland (jbtotheh) - Wednesday, 12 July 2023, 10:59 GMT
https://bugzilla.kernel.org/show_bug.cgi?id=217651 I created this on kernel.org and have been bisecting the commits to determine which commit caused my bluetooth controller to not be detected. Bisecting and testing is taking a while.....
Comment by John Holland (jbtotheh) - Wednesday, 12 July 2023, 23:51 GMT
Hi, I was able to reproduce the problem as I see it on my 2014 MacBook, using the kernels from kernel.org. I updated the bugzilla there (see above). The problem is due to a pretty simple commit early in 6.4 development. I don’t know what this commit would benefit but reverting it fixes the problem in 6.3/4 and 6.5. See the bugzilla for more information. Thanks for your extensive testing.
Comment by Toolybird (Toolybird) - Thursday, 13 July 2023, 00:48 GMT
Nice work on the bisection! This might explain quite a few of the recent kernel BT issues that have cropped up around the place. Please let us know when upstream have addressed and/or solved the problem.
Comment by loqs (loqs) - Friday, 14 July 2023, 10:57 GMT

Loading...