on 20. January 2024
- Bug: https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/2085162
- Patch: https://launchpadlibrarian.net/757506303/bluez-fix-address.patch
Bose QC45 headphones won't reconnect after reboot - running bluez
version 5.72-0ubuntu5
before patch.
mkdir bluez-noble-fix && cd bluez-noble-fix
wget https://launchpadlibrarian.net/757506303/bluez-fix-address.patch
# start container
docker run -it --rm -v "$(pwd)":/build ubuntu:24.04 /bin/bash
# add src repositories
cd /build
cat /etc/apt/sources.list.d/ubuntu.sources | sed 's/^Types: deb$/Types: deb deb-src/g' > ubuntu.sources
mv ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources
# update, upgrade and install build tools
apt-get update && apt-get upgrade -y && apt-get install -y dpkg-dev devscripts build-essential fakeroot vim
# install bluez build dependencies
apt-get install -y debhelper-compat flex bison libdbus-1-dev libglib2.0-dev libdw-dev libudev-dev libreadline-dev libical-dev libasound2-dev libell-dev libjson-c-dev python3-docutils python3-pygments udev check systemd systemd-dev
# get bluez source and patch src/adapter.c
apt-get source bluez
cd bluez-5.72
patch -u src/adapter.c ../bluez-fix-address.patch
# commit, update changelog and build new package
dpkg-source --commit
dch -i
debuild -us -uc
# exit container
exit
sudo dpkg -i bluez_5.72-0ubuntu6_amd64.deb
Works like a charm. Thank you!