PipeWire on Ubuntu, PopOS, ElementaryOS 6

What is is PipeWire, and what can it do for me?

PipeWire is a new multimedia framework that aims for a better audio/video management in Linux. This can be compared to how audio/video devices and multimedia files and devices is handled in MacOS, as this just works, and is stable.

So what can it do for me?
Currently I have focused on the audio server. In essence it will supplement and replace other audio platforms like JACK, OSS, ALSA and Pulseaudio, which up until now has been handling all audio on Linux. It also handles Bluetooth audio so much better than previous solutions.

For me it allowed proper usage of my Apple Airpods, which now automatic switch to the correct Bluetooth profile, when my microphone is needed.

Control check before any changes

Running the command: “pactl info”, note the Server Name:, this shows we run pure pulseaudio server.

itso.dk@pop-os:~$ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 33
Server Protocol Version: 33
Is Local: yes
Client Index: 8
Tile Size: 65472
User Name: itso.dk
Host Name: pop-os
Server Name: pulseaudio
Server Version: 13.99.1
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1b.0.analog-stereo
Default Source: alsa_input.pci-0000_00_1b.0.analog-stereo
Cookie: b11c:734d

Fedora 34

Fedora 34 and up will be using PipeWire as default.

Ubuntu 18.04 – 21.10 & PopOS 20.04

Can be installed with the guide below, and requires to add a PPA Repo (3. party software repository)

sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream -y
sudo apt update
sudo apt upgrade -y
sudo apt install pipewire gstreamer1.0-pipewire pipewire-pulse libspa-0.2-bluetooth libspa-0.2-jack -y
# For each user that wants to run Pipewire run this.
systemctl --user mask pulseaudio
systemctl --user --now disable pulseaudio.service pulseaudio.socket
systemctl --user --now enable pipewire-media-session.service
systemctl reboot

PopOS 21.04

A little issue occurs, as there is a conflict with versioning from installed packages. However this can be fixed by running “sudo apt –fix-broken install -y”

BE AWARE, I have not tested, PopOS 21.04 in daily usage when running Pipewire, with fixed packages, use at own risc.

sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream -y
sudo apt update
sudo apt upgrade -y
sudo apt --fix-broken install -y
sudo apt install pipewire gstreamer1.0-pipewire pipewire-pulse libspa-0.2-bluetooth libspa-0.2-jack -y
# For each user that wants to run Pipewire run this.
systemctl --user mask pulseaudio
systemctl --user --now disable pulseaudio.service pulseaudio.socket
systemctl --user --now enable pipewire-media-session.service
systemctl reboot

ElementaryOS 6 – Odin

As ElementaryOS 6 is based on Ubuntu 20.04 Focal Fossa, but missing the add-apt-repository, we can add the signature key, and repository manually.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 25088A0359807596
sudo su -c 'echo "deb http://ppa.launchpad.net/pipewire-debian/pipewire-upstream/ubuntu focal main" > /etc/apt/sources.list.d/pipewire-debian-ubuntu-pipewire-upstream-focal.list'
sudo apt update
sudo apt upgrade -y
sudo apt install pipewire gstreamer1.0-pipewire pipewire-pulse libspa-0.2-bluetooth libspa-0.2-jack -y
# For each user that wants to run Pipewire run this.
systemctl --user mask pulseaudio
systemctl --user --now disable pulseaudio.service pulseaudio.socket
systemctl --user --now enable pipewire-media-session.service
systemctl reboot

And finally to check if PipeWire is running

pactl info

If you got something simular to this, you should be golden:

itso.dk@pop-os:~$ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 33
Server Protocol Version: 35
Is Local: yes
Client Index: 49
Tile Size: 65472
User Name: itso.dk
Host Name: pop-os
Server Name: PulseAudio (on PipeWire 0.3.34)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1b.0.analog-stereo
Default Source: alsa_input.pci-0000_00_1b.0.analog-stereo
Cookie: 4ab2:c52e

Switch back to Pulseaudio

This will not remove PipeWire packages, but only disable the services.

systemctl --user unmask pulseaudio 
systemctl --user --now disable pipewire-media-session.service
systemctl --user --now enable pulseaudio.service pulseaudio.socket
systemctl reboot