FS#73394 - [bluez] bluetoothd 5.63 segfaults after suspend and reconnect

Attached to Project: Arch Linux
Opened by Sergey Kvachonok (ravenexp) - Monday, 17 January 2022, 16:24 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 19 February 2022, 16:19 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Description:

My bluetooth speaker doesn't reconnect automatically after suspend and bluetoothd segfaults after a manual reconnect attempt.

Upstream issues:

https://github.com/bluez/bluez/issues/272
https://github.com/bluez/bluez/issues/269

Possible fix:

https://github.com/bluez/bluez/commit/8edd9ff4e4ea85c80bee00a4a46b1cae3678dea6
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Saturday, 19 February 2022, 16:19 GMT
Reason for closing:  Fixed
Comment by nya (nya) - Friday, 28 January 2022, 19:10 GMT
I can confirm this behaviour.
Comment by kmille (kmille) - Monday, 07 February 2022, 09:26 GMT
There is currently no new upstream version containing the fix. Applying the patch fixes the segfault but I automatically gets disconnected (error: Connection Failed: br-connection-unknown) and can't use my BT device:

asp checkout bluez
cd bluez/repos/extra-x86_64
gpg --recv-key 06CA9F5D1DCF2659
makepkg -s --nobuild
curl https://github.com/bluez/bluez/commit/8edd9ff4e4ea85c80bee00a4a46b1cae3678dea6.patch -o /tmp/bluez.patch
src/bluez-5.63
patch -p1 < /tmp/bluez.patch
cd ../..
makepkg -i --noextract
sudo systemctl restart bluetooth

What actually worked for me was downgrading to 5.61/5.62.

You can also check if you have an old package locally cached and use pacman -U /var/cache/pacman/pkg/blu???.zst
ls -l /var/cache/pacman/pkg/bluez*

cd bluez/repos/extra-x86_64
git checkout 5303f48bcc78f1167842e95fa8a4b67b7fc8aac8
makepkg -si
sudo systemctl restart bluetooth

EDIT:
Building bluez after the latest glibc update fails:pld-cvs-commit@lists.pld-linux.org/msg477789.html"> https://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg477789.html
wget https://archive.archlinux.org/packages/b/bluez/bluez-5.61-1-x86_64.pkg.tar.zst
sudo pacman -U bluez-5.61-1-x86_64.pkg.tar.zst
Comment by Sergey Kvachonok (ravenexp) - Friday, 18 February 2022, 19:28 GMT Comment by Andreas Radke (AndyRTR) - Saturday, 19 February 2022, 09:11 GMT
Please try 5.63-2- it also has now debug symbols available for testing.
Comment by Marcell Meszaros (MarsSeed) - Saturday, 19 February 2022, 12:36 GMT
I can confirm that the patched v5.63-2 no longer exhibits the mentioned issue and Bluetooth now works just as it should after suspend/wake.
Comment by Sergey Kvachonok (ravenexp) - Saturday, 19 February 2022, 14:08 GMT
I've tested v5.63-2 and can also confirm that the -2 patch fixed the issue.

Loading...