How to improve Bluetooth audio quality
Hi @fernando_c_m,

oh thanks for your feedback. I don't know how this error has crept in! I've fixed the original post.

Here's an updated version of

# Note: Bluetooth headset must be connect when running this script.

# Enable auto connection of the bluetooth device (add "load-module module-switch-on-connect" to /etc/pulse/ first):
MACADDR=`pactl list cards | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'`
bluetoothctl trust $MACADDR

# Increase latency:
BLUEZCARD=`pactl list cards short | egrep -o bluez.*[[:space:]]`
SNDDEVICE=`pactl list | grep '\-output:' | head -n1 | cut -d ":" -f1 | xargs`
pactl set-port-latency-offset $BLUEZCARD $SNDDEVICE 100000

# Restart bluetooth:
sudo service bluetooth restart

# Reconnect:
bluetoothctl connect $MACADDR

# Show current settings:
pactl list | grep -Pzo '.*bluez_card(.*\n)*'

Notice that the script now tries to reconnect the bluetooth device after restarting the bluetooth service. It also tries to setup an automatic bluetooth reconnection (you need to edit /etc/pulse/ first, see script).

This sort of works, but is not perfect! Sometimes there is a loud hum after reconnecting, this has happend with both of my bluetooth headsets. Using delays in the script could potentially help.

What I haven't figured out yet is how to get the buttons on the headsets working. According to, this should work with "mpris-proxy". The tool recognizes the bluetooth connections and the players (I've tried Lollypop and Rhythmbox), but it does not work.


Messages In This Thread
RE: How to improve Bluetooth audio quality - by CyberSeb - 07-28-2020, 01:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  podcast shuts down after 10 minutes or perhaps bluetooth motox6 10 1,045 09-17-2021, 11:37 AM
Last Post: ragreenburg
  Is there a better audio / podcast player? motox6 15 4,149 08-24-2021, 04:08 PM
Last Post: ragreenburg
  phone call using built it app will not go to bluetooth motox6 3 551 06-28-2021, 11:03 AM
Last Post: wibble
  Jerky wifi and bluetooth motox6 0 324 06-22-2021, 12:50 AM
Last Post: motox6
  audio quality on phone Rainer 0 330 05-28-2021, 09:25 AM
Last Post: Rainer
Information Bluetooth DIsconnect Problems? RTP 3 1,618 05-20-2021, 09:28 AM
Last Post: Emichel2020
  Bluetooth audio stalling (maybe the whole phone) motox6 1 440 05-18-2021, 10:15 AM
Last Post: wibble
  Any trick to fix terrible audio? daniel 2 798 02-18-2021, 06:29 PM
Last Post: natasha
  Audio over USB 3x5co 1 750 01-05-2021, 06:21 PM
Last Post: wibble
  Keep phone awake when audio is playing 3x5co 2 1,009 12-27-2020, 11:25 PM
Last Post: 3x5co

Forum Jump:

Users browsing this thread: 1 Guest(s)