CRUX : Home

Home :: Documentation :: Download :: Development :: Community :: Wiki :: Ports :: Bugs :: Links :: About

Back to wiki start page

Categories: General

contrib/pipewire how to

Author: Tim Biermann

Table of contents

1. Intro

pipewire is a modern multimedia server. Quoting gentoo wiki, itís strenghts are:

- Minimal latency capture/playback of audio and video
- Real-time multimedia processing 
- Multi-process architecture allowing multimedia content sharing between applications
- Seamless support for PulseAudio, JACK, ALSA, and GStreamer
- applications sandboxing support with Flatpak 

Getting pipewire to run is relatively easy on CRUX. This is a simple guide and relies on further reading upon official and unofficial resources.

This might also be considered a WIP entry. You can help by sharing your experiences and thoughts.

2. Prerequisites

2.1. Optional prerequisites

3. Running pipewire

pipewire will always leverage alsa, so you should configure that first. Use alsactl store to store those settings, and configure /etc/rc.conf to start /etc/rc.d/alsa by default. While you are in rc.conf, make sure you start /etc/rc.d/dbus too, if you haven't already.

Resources:

Currently, pipewires default config format might always change, so it is advised to keep an eye on rejmerge to keep your configs updated. The default config can be modified in directly /etc/pipewire. The configuration of /etc/pipewire can be copied over to $XDG_CONFIG_HOME/pipewire, which should most likely point you to $HOME/config/pipewire.

Normally, you wouldn't need to change anything to run pipewire as an a/v-server, so in the simplest setup it should suffice to run /usr/bin/pipewire from a users shell or script (for example I have this in my i3 config: exec "/usr/bin/pipewire"), just make sure that whatever session you are running will be executed as a dbus-user-session too (for example from my ~/.xinitrc: exec dbus-run-session -- i3)

3.1. Running pipewire-pulse as a pulseaudio-server

If you are a pulseaudio-user, make sure it won't autostart with your session. For pipewire to handle pulse-clients, you will need to run /usr/bin/pipewire-pulse as well. Verify that it is working with pactl info which should now report: Server Name: PulseAudio (on PipeWire 0.3.22). Now you can use tools like contrib/pavucontrol or contrib/ncpamixer to control your typical sources and sink settings, ports like opt/firefox-bin and whatever else uses pulseaudio should work ootb for you too.

3.2. Running jack applications through pipewire

to be expanded

3.3. Debugging pipewire

You can run pipewire like that from a terminal: PIPEWIRE_DEBUG=3 pipewire

4. Further configuration and fine-tuning

To help configuring, consider reading through the following resources alongside the extensive comments in the default config:

5. tl;dr

"I don't have any time to read up on stuff myself, tell me what I need to do right now to get this hot mess!" -some user, probably