Ubuntu – Bluetooth audio lag Ubuntu 17.10

17.10bluetooth

There seems to be a consistent problem with Ubuntu (any release) and Bluetooth, namely any device is consistently presenting lags and delays when it comes to audio play. The prominent solution around the internet seems to be this one: essentially, it is claimed that switching audio profiles back and forth – in a nutshell – gets rid of the latency. While this is true for the next few seconds after the "switch", the delay occurs again after, say, 20 seconds: it is unfeasible to just switch profiles 3 times per minute and consider this a workaround.

I have seen there are many similar questions (this, this and this, just to point some) mentioning different bluetooth devices, different Ubuntu distributions, however at the end of the day no satisfactory answer exist. There was the impression that 17.10 would fix once and for all this infamous thread, nevertheless it does not seem to be the case.

Is there any more or less official solution to the problem that does not involve manual switch of audio settings back and forth to manually "force" the auto-sync every now and then (say, every minute)? For the sake of the context I consider any script that forces the manual switch still a manual solution.

Best Answer

There is a, still running, 2012 PulseAudio bug: "bluetooth audio out of sync when connection temporarily drops"

In a nutshell anytime there is a drop in the connection quality, audio packets accumulate in the buffer, causing a delay. Connection quality drop can happen very easily, passing your hand in front of the receiver might cause it. In my case this problem also cause a computer crash after a few repetitions.

However if, instead of using high quality audio A2DP sink, I use "HSP/HFP", when connection quality drop I get a very bad, speaking in a tin box-like sound, but no delay is building. Like audio packets are dropped instead of being hogged.

However the audio quality of "HSP/HFS" is very poor and is only suitable for "one speaker at a time"-like audio.

It seems to me some, at least, of the similar questions you gathered, are related to this PulseAudio Buffering Issue (buffering is legitimate, but what is to be done when connection quality drop; and is it actually legitimate in a real time setting?).

Anyway, IMO the only solution is to wait for a proper solution to this issue. Even though it's opened since 2012.