Translation(s): none


PipeWire is a server and API for handling multimedia on Linux. Its most common use is for Wayland and Flatpak applications to implement screensharing, remote desktop, and other forms of audio and video routing between different pieces of software. Per the official FAQ, "you can think of it as a multimedia routing layer on top of the drivers that applications and libraries can use."

As opposed to PulseAudio's focus on consumer audio and JACK's focus on professional audio, PipeWire aims to work for all users at all levels. Among other techniques, PipeWire achieves this with its ability to dynamically switch between different buffer sizes, for adapting to the different latency requirements of different audio applications.

In Debian 10, PipeWire 0.2.5 is available, and should not need to manually be installed, as it's usually brought in as a dependency by applications that make use of it.

In Debian 11, PipeWire 0.3.19 is available, and can be experimentally used as a substitute for the ALSA userspace library, PulseAudio, and JACK. This is a documented but unsupported usecase.


Installation

In its most basic form, PipeWire can be installed simply by installing the pipewire package.

In Debian 10, some plugins are split into separate packages. These can be found in the libspa-bluetooth and libspa-ffmpeg packages.

In Debian 11, there is no longer a separate FFmpeg plugin package, and the Bluetooth package has been moved to libspa-0.2-bluetooth. There is also a JACK plugin in the libspa-0.2-jack package, required for using PipeWire as a JACK server (as explained below).

For Debian 11, the pipewire-audio-client-libraries package is available. As per the package description, "this package contains client libraries allowing programs designed for the ALSA, JACK and PulseAudio APIs to use a PipeWire server for audio playback and recording. They are not used by default, and are currently considered to be experimental."


Configuration

Using as a substitute for PulseAudio/JACK/ALSA

Debian 11 (Bullseye) is currently unreleased and in development. These instructions apply for anyone using it as the current testing branch or anyone using Debian Sid/Unstable.

These instructions may not always be up-to-date or even functional at all. They also may change at any time.

As per Simon McVittie, the PipeWire package maintainer, "This is not a supported scenario for Debian 11, and is considered experimental."

It may break certain applications, lack certain functionality, or not work at all.

Users may also be interested in PipeWire's capacity to be a drop-in substitute for existing Linux audio solutions, including PulseAudio and JACK. Potential benefits include lower CPU usage, better support for Bluetooth devices, and better integration between applications using JACK and PulseAudio. This is the default behavior in some other distros, notably Fedora 34 and newer.

This behavior can be experimentally enabled in Debian 11. PulseAudio and PipeWire may fight over Bluetooth devices.

Install the pipewire-audio-client-libraries package and, as desired, follow the instructions below.

For PulseAudio

In this scenario, PipeWire runs as a per-user audio service, replacing PulseAudio completely.

Create this empty file:

# touch /etc/pipewire/media-session.d/with-pulseaudio

Create a pipewire-pulse service by copying the example files:

# cp /usr/share/doc/pipewire/examples/systemd/user/pipewire-pulse.* /etc/systemd/user/

Run these three commands as your regular user (not as root):

// Check for new service files with:
systemctl --user daemon-reload
// Disable and stop the PulseAudio service with:
systemctl --user --now disable pulseaudio.service pulseaudio.socket
// Enable and start the new pipewire-pulse service with:
systemctl --user --now enable pipewire pipewire-pulse

You can check which server is in use by, as your regular user, running:

pactl info | grep '^Server Name'

If it's using PipeWire, the server name will be "PulseAudio (On PipeWire 0.3.19)"

If this doesn't work, you may need to "mask" the PulseAudio service by running:

systemctl --user mask pulseaudio

And then restarting the PipeWire services:

systemctl --user restart pipewire pipewire-pulse

This will block the PulseAudio service from being activated outright. If you wish to restore previous functionality, you'll need to run the same command again with the "unmask" action.

For ALSA

ALSA clients can be configured to output via PipeWire.

Some may describe this as "replacing ALSA", but as the PipeWire FAQ clarifies: "No, ALSA is an essential part of the Linux audio stack, it provides the interface to the kernel audio drivers. That said, the ALSA user space library has a lot of stuff in it that is probably not desirable anymore these days, like effects plugins, mixing, routing, slaving, etc. PipeWire uses a small subset of the core ALSA functionality to access the hardware. All of the other features should be handled by PipeWire."

Create this empty file:

# touch /etc/pipewire/media-session.d/with-alsa

Copy a configuration file from the PipeWire examples into your ALSA configuration directory:

# cp /usr/share/doc/pipewire/examples/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/

For JACK

JACK clients can be configured to output via PipeWire instead of JACK.

Create this empty file:

# touch /etc/pipewire/media-session.d/with-jack

Either run JACK clients using the pw-jack wrapper, or copy:

# cp /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-*.conf /etc/ld.so.conf.d/

And run:

# ldconfig

This will replace the JACK server libraries with PipeWire's replacements at application runtime, by pointing the dynamic linker at the /usr/lib/x86_64-linux-gnu/pipewire-0.3/jack/ folder.


See also

PipeWire homepage

PipeWire FAQ

PipeWire Wiki

Debian PipeWire bugs

Debian security tracker for the PipeWire package

The state of PipeWire in Summer 2020 (On GNOME Blogs)

Read the official Debian package documentation for using PipeWire as a replacement for other audio servers by viewing the /usr/share/doc/pipewire-audio-client-libraries/README.Debian file.


CategoryHardware | CategorySound | CategorySoftware