I like my desktop but some things really drive me mad. I recently switched to an AM5 board (yeah yeah first world problems) which came with an integrated adapter. Which sucks. Badly. Dunno if it’s the driver or interference from the board itself or due to the case shielding the signal. I don’t really care as well. It can however not be deactivated in the UEFI settings.

I’m using a BT adapter plugged in via USB for years now and moved this over to my new system. It works _excellent_ even with multiple devices. I get clear sound without crackling on my headphones, which is what I really care for to stay “in the zone” for work.

Alas Gnome does not let you choose which BT adapter is used – unlike we know this e.g. from the NetworkManager. Apparently it even defaults to the _first_ adapter it finds, which is by design the integrated one – that I do not want in my case. I can basically only tell them apart by their addresses that I can obtain via the hcitool command:

$ hcitool dev
Devices:
	hci1	10:B1:DF:AA:63:50
	hci0	00:1A:7D:DA:71:06

The full details on this can be extracted from this [closed] 5 years old feature request: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/263 (let user choose one bluetooth device from several in gnome control center)

And everything mentioned there is still true and while I usually can understand Bastien’s reasoning in this case I can’t. Alas not all is lost. It’s a little tedious but the following example script was added to unbind an adapter:

#!/bin/sh

ADAPTER_TO_DISABLE=${1:-hci0}
SYSFS_PATH=/sys/class/bluetooth/$ADAPTER_TO_DISABLE

if [ ! -h $SYSFS_PATH ] ; then
	echo "Could not find adapter $ADAPTER_TO_DISABLE"
	echo "Usage: $0 [hciX]"
	exit 1
fi

USB_DEVICE_PATH=`realpath $SYSFS_PATH/device`
USB_DEVICE=`basename $USB_DEVICE_PATH`
echo $USB_DEVICE > $SYSFS_PATH/device/driver/unbind

The adapter will be back on the next reboot so it’s a little tedious but at least I can now kill the malfunctioning one. It’s a hammer to a nail but it works. Put in a script it may be called like this:

sudo unbind-bluetooth-driver.sh hci1

Oddly enough something in the gnome-shell extension acts up now and duplicates the device list.

BT quick selection modal of Gnome duplicating the list of known devices

I can live with that though and it may even be fixed with a more recent version already. I’m still on 44.9 and somewhat behind on this currently.

2 thoughts on “What about a second Bluetooth adapter

  1. Pretty sure it’s the same driver and I couldn’t find out how to explicitly disable a single device. I take any hints though so I can improve on my tedious workaround here!

    (this time from the correct user – I hope? xD)

Leave a Reply