Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#78943 - Bluetooth Audio Devices Instantly Disconnect At Start of Any Audio Playback

Attached to Project: Arch Linux
Opened by Isaac Milarsky (Krabs) - Saturday, 01 July 2023, 17:20 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 01 July 2023, 19:47 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Bluetooth no longer works as expected following an update applied yesterday on June 30th. Whenever I pair and connect any of my audio devices via Bluetooth using the bluedevil Bluetooth client it appears to connect and change to the newly connected audio device for a time, only to immediately disconnect and reset the bluedevil system tray icon and disconnect from the Bluetooth device whenever I try to actually play any audio.

When checking the logs for the systemd Bluetooth service it appears like some errors appear but nothing too different then the usual error messages that appear when Bluetooth is working. The main unusual thing is the unexpected crashing that is logged whenever I try to play any audio at all. Here is an example:
Jul 01 11:16:51 bluebird systemd[1]: bluetooth.service: Main process exited, code=dumped, status=11/SEGV
Jul 01 11:16:51 bluebird systemd[1]: bluetooth.service: Failed with result 'core-dump'.

I suspected at first that it has to do with an update to the linux-firmware package breaking the functionality of my Bluetooth adapter. But, after downgrading to a previously working version of the linux-firmware package I am still facing the same issue.

I also thought it might be the version of the zen kernel that I am using but after investigating it turns out that the offending update did not update the kernel.

I then tried to fix the problem through downgrading the version of bluez that I was using from version 5.68 to 5.66. This did the trick and it worked perfectly after the downgrade. So it seems as if there is some yet to be fixed bug in bluez that was introduced in version 5.68.


Additional info:
* I am using arch with kde on a wayland session
* I am using the linux-zen kernel
* I am using pipewire with pipewire-media-session for audio
* I am using a Realtek USB Bluetooth adapter with device id: 0bda:2550
* The issue happens with literally any audio source
* I have attached logs from before and after the downgrade from bluez and bluez-libs version 5.68 to 5.66
* I wasn't sure how to submit a bug report to the bluez team so I did not submit an upstream bug report

Steps to reproduce:

Login to a kde session on an arch linux machine with bluez version 5.68 and bluez-libs version 5.68. Set up Bluetooth like normal or make sure it is setup (if it already is) and use the bluedevil Bluetooth client to connect to a Bluetooth audio device. To see the issue play any audio at all after the device is connected and shows up as an audio device. Then, the device should instantly disconnect as the bluetooth daemon appears to crash and restart. This happens again if the attempt to connect the audio device and play audio is repeated.

This task depends upon

Closed by  Andreas Radke (AndyRTR)
Saturday, 01 July 2023, 19:47 GMT
Reason for closing:  Fixed
Additional comments about closing:  5.68
Comment by loqs (loqs) - Saturday, 01 July 2023, 18:06 GMT
btoothlogs.log contains logs for both 5.67 and 5.68 with the core-dumps all occurring under 5.67?
Comment by Isaac Milarsky (Krabs) - Saturday, 01 July 2023, 18:25 GMT
Oh it looks like I updated the system when I was upgrading linux-firmware after I downgraded it. That explains why the logs for 5.68 and 5.67 showed up. I thought that after I updated on the 30th I had updated to version 5.68 but I had updated to 5.67 and I was mistaken since I had done a system update.

I was mistaken when I said that the issues were only with version 5.68 it seems that the problem was introduced with version 5.67 and also appear in version 5.68. Sorry about that.

Fwiw the issue is the exact same on version 5.67 as it is on 5.68.
Comment by loqs (loqs) - Saturday, 01 July 2023, 18:29 GMT
The coredump under 5.67  FS#78937  was fixed in 5.68. Please post a log or preferably a backtrace for a coredump from 5.68.
Comment by Isaac Milarsky (Krabs) - Saturday, 01 July 2023, 18:44 GMT
Well it seems I was confused on the version that was giving me trouble since I just re-upgraded to bluez version 5.68 and it works like a charm. Sorry for making a duplicate bug report. I thought that I had tested the 5.68 version and had the same problems as 5.67 but I was mistaken.

Loading...