openSUSE:Pipewire

Jump to: navigation, search
PipeWire Is a graph-based audio and video processing engine developed by Wim Taymans, as part of the GNOME project. It's designed to work with devices from containers and flatpak applications. It aims to work alongside Wayland as audio system on top of ALSA

Usage

When used to process audio, PipeWire works on top of the ALSA kernel infrastructure like PulseAudio or JACK and can offer compatibility layers for PulseAudio, JACK, and even ALSA-only applications. The respective supporting packages are named as follows:

pipewire-pulseaudio
pipewire-libjack-0_3
pipewire-alsa

It's also used to provide screen capture support under Wayland for video conferencing applications for example. As a result, both Gnome and KDE DEs are using it by default now.

PipeWire provides a systemd user service and socket. The systemd socket unit is enabled by default so the service is started automatically when required which should be usually sufficient. In any case, to start the services manually you can use:

systemctl --user start pipewire.service

WirePlumber is the session/policy manager for PipeWire and should run together with it. Just like PipeWire, the WirePlumber service is enabled by default so there's no need to start it manually but you can also start/stop it if needed with:

systemctl --user start wireplumber.service



Installation

PipeWire is available from the main openSUSE repositories as pipewire. It's installed by default without audio support in openSUSE Leap. In order to enable it and use PipeWire as an audio engine (replacing PulseAudio, which is the default audio engine in Leap) the pipewire-pulseaudio package needs to be installed. To install it use:

zypper in pipewire-pulseaudio
Since the 20220708 openSUSE Tumbleweed release, new installations use PipeWire as the default audio engine instead of PulseAudio so there's no need to do any manual installation. Note that a system upgrade from a previous release won't automatically replace PulseAudio since that would be too intrusive for an installed system so in that case you'll need to enable the audio support just as in Leap.

This will install the pipewire-pulseaudio and wireplumber-audio packages. If pulseaudio is installed, zypper will warn you with a message along the lines of:

Problem: the installed pulseaudio-15.0-150400.2.10.x86_64 conflicts with 'pulseaudio-daemon' provided by the to be installed pipewire-pulseaudio-0.3.49-150400.1.5.x86_64
 Solution 1: Following actions will be done:
  deinstallation of pulseaudio-15.0-150400.2.10.x86_64
  deinstallation of pulseaudio-gdm-hooks-15.0-150400.2.10.x86_64
  deinstallation of pulseaudio-lang-15.0-150400.2.10.noarch
  deinstallation of pulseaudio-module-bluetooth-15.0-150400.2.10.x86_64
  deinstallation of pulseaudio-module-gsettings-15.0-150400.2.10.x86_64
  deinstallation of pulseaudio-module-jack-15.0-150400.2.10.x86_64
  deinstallation of pulseaudio-module-lirc-15.0-150400.2.10.x86_64
  deinstallation of pulseaudio-module-x11-15.0-150400.2.10.x86_64
  deinstallation of pulseaudio-module-zeroconf-15.0-150400.2.10.x86_64
  deinstallation of alsa-plugins-pulse-1.2.6-150400.1.10.x86_64
 Solution 2: do not install pipewire-pulseaudio-0.3.49-150400.1.5.x86_64

You should choose Solution 1 (deinstall pulseaudio).

When the installation finishes, reboot the computer. The pipewire-pulse socket unit should be automatically enabled and active after that which will make PulseAudio applications to believe PulseAudio is running while PipeWire is actually used.



Tools

Additionally, pipewire-tools is available. This package contains many tools to use PipeWire.

pw-cat includes a collection of tools to play and record media using PipeWire natively. pw-play and pw-midiplay to play audio and MIDI files, pw-record and pw-recordmidi to record raw audio and MIDI data.

pw-cli Is a command line interface (CLI), it loads and removes modules, lists objects and devices in the instance, connects to and interacts with a remote instance of PipeWire-managed nodes and links.

pw-dot prompts the PipeWire graph in a .dot-formatted file. It can be read with

pw-dot -o file.dot
dot -Tpng file.dot -o output.png

pw-dump does the same as pw-dot, but it prompts in the standard output instead of a file.

pw-mon is a monitor for PipeWire, it monitors objects in a pipewire instance.

pw-mon

pw-profiler: with the profiler module loaded, connect and log the data from a local/remote instance. This program can be executed as

pw-profiler -o name

the option -o is optional and by default the program outputs to profiler.log.

When the program is stopped, it uses gnuplot to generate an .svg file alongside an .html to better view the profile from a browser.

Wireplumber is the modular session/policy manager for PipeWire, and the following command provides useful status information with respect to active clients, devices, sinks, sources, and streams.

wpctl status

More info:

https://pipewire.pages.freedesktop.org/wireplumber/index.html

https://wiki.archlinux.org/title/WirePlumber



JACK compatibility

Icon-warning.png
Warning: Both compatibility packages (for PulseAudio and JACK) are in conflict with PulseAudio and JACK respectively so either each official daemon or the compatibility layers can be installed at the same time and what is installed will be what's used. It's also possible to install both compatibility packages at the same time so that both PulseAudio and JACK applications will work together through PipeWire.

In order to install the JACK compatibility layer, use:

zypper in pipewire-libjack-0_3 wireplumber-audio

If zypper shows a conflict because jack is installed, choose the option to deinstall it. Once the packages are installed, JACK applications will work with PipeWire as if the JACK daemon was running in the system.



How to replace PipeWire with PulseAudio?

To go back to using PulseAudio instead of PipeWire just install the pulseaudio package with:

zypper install pulseaudio

And reboot your computer. That will re-enable the pulseaudio automatically.



How to disable PipeWire and use plain ALSA?

You probably want to use either PipeWire or PulseAudio but if you want to use plain ALSA do

systemctl --user disable --now pipewire.{socket,service}
systemctl --user disable --now pipewire.{socket,service}
rm /etc/alsa/conf.d/99-pipewire-default.conf /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf

and to get it back later, do

zypper in -f pipewire
systemctl --user enable --now pipewire.{socket,service}



External links