Bluetooth: Degraded Audio Quality Resolved!

My Problem
I recently tried using my old Ubuntu laptop (2012 13" MacBook Pro) to watch a movie. I connected to a Bose SoundLink Mini II, but I started experiencing audio quality issues. Approximately once every couple of minutes the audio would either drop completely or sound convoluted for about 1-2 seconds. The symptoms were identical on both Impish (21.10) and Jammy (22.04)[1].

My Resolution:
In an online forum, I found a comment that suggested that switching from the default PipeWire session manager (pipewire-media-session) to WirePlumber resolved a similar issue for someone else. Being unfamiliar with either of these applications I did some reading[2][3][4][5], and decided to give it a try.

Once I installed wireplumber and libspa-0.2-bluetooth and enabled wireplumber, my sound audio issues disappeared!

The required commands were[6]:

apt install wireplumber libspa-0.2-bluetooth
systemctl --user --now disable pipewire-media-session
systemctl --user --now enable wireplumber

It appears that multiple different Linux distros have taken the stance that “WirePlumber will probably replace pipewire-media-session, someday”. For me, that “someday” is today.

If this helps you to resolve your own audio issues on Ubuntu, please leave a comment with your experience and any additional technical details you can share that might help others!

Notes:

[1] Jammy is unreleased at the time of writing.
[2] Upstream PipeWire currently recommends WirePlumber over pipewire-media-session.
[3] libspa-0.2-bluetooth is considered experimental according to the package description.
[4] https://wiki.debian.org/PipeWire
[5] https://wiki.archlinux.org/title/PipeWire
[6] It wasn’t immediately obvious to me that libspa-0.2-bluetooth was required with wireplumber. The above commands aren’t exactly what I did while troubleshooting, but I think it accurately describes the required commands to reproduce my “fix”.

2 Likes

Thanks for the post.

Firstly, if PipeWire is being used for audio at all in jammy then that is unintentional. We intend for jammy to use PulseAudio for audio, including Bluetooth. Although how to audit that this happens when we have dependencies requiring that both are installed, is unclear.

Second, yes wireplumber is a drop-in replacement for pipewire-media-session. Where we depend on either is in gnome-remote-desktop and they’re supported equally:

Depends: ${misc:Depends},
         ${shlibs:Depends},
         gnome-shell (>= 3.37.92-2~) | budgie-desktop (>= 10.5.2),
         pipewire (>= 0.3.0),
         pipewire-media-session | wireplumber,

As you mentioned, the pipewire-media-session source code says:

PipeWire Media Session is an example session manager for PipeWire.

Note that we recommend the use of WirePlumber instead.

wireplumber is not yet in Ubuntu main though.

Thank you @holmanb for suggesting using wireplumber.
However, your installation steps did not work for me in Ubuntu 20.04, and neither could I find an installation guide on the wireplumber git, maybe because it’s not in Ubuntu main, like @vanvugt suggested .

I had audio issues similar to yours but only on Steam while using the compatibility layer Proton with a bluetooth headset, which have now been solved (hopefully) by installing pipewire instead.
I used the instructions on their website ( pipewire.org). However, I did have to install some dependencies manually (through pip), if anyone wants to follow those steps.

Maybe forget it for 20.04… Ubuntu does not support PipeWire for audio until at least version 22.10. Although you can modify 22.04 to use it.

2 Likes