This guide explains how to set your Bluetooth audio device to high fidelity automatically in Ubuntu 20.04 when it connects.
- Ubuntu 20.04
- A Bluetooth audio device
- The
bluez-tools
package, which provides thebt-device
command.sudo apt-get install blueztools
.
-
Add executable permissions to
set-bluetooth-a2dp-quality.py
-
Change
bt_device_name
in the script to match your device. -
Create a Udev rule
sudo vim /etc/udev/rules.d/99-bluetooth-a2dp-high-fidelity.rules
ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci0", ATTRS{name}=="Your Bluetooth Device Name", RUN+="/path/to/set-bluetooth-a2dp-quality.sh"
-
Replace "Your Bluetooth Device Name" with the actual name of your Bluetooth audio device.
-
Save the file and restart your computer for the changes to take effect.
Your Bluetooth audio device should now be set to high fidelity automatically when it connects.