Skip to content

PipeWire system mode

マギルゥーベルベット edited this page Jun 28, 2023 · 5 revisions

To use PipeWire in system mode, rather than user mode, it is required to use custom systemd units and change some default settings in WirePlumber.

  1. Give the pipewire user on your system a home directory!! THIS IS REQUIRED TO STORE DATA! usermod -d /var/lib/pipewire pipewire
  2. Install the relevant PipeWire and WirePlumber systemd units found in the backups/systemd-units directory of this repository.
  3. Copy pipewire.conf, pipewire-pulse.conf and client.conf from /usr/share/pipewire/ to /etc/pipewire/ and adjust the options to your preferences.
  4. Disable the modules libpipewire-module-x11-bell and libpipewire-module-portal. They are not relevant for system mode and don't work anyway.
  5. Make the following changes to these files:
    • /etc/wireplumber/main.lua.d/50-default-access-config.lua => ["enable-flatpak-portal"] = false
    • /etc/wireplumber/main.lua.d/50-alsa-config.lua => ["alsa.reserve"] = false
    • /etc/wireplumber/bluetooth.lua.d/50-bluez-config.lua => ["with-logind"] = false

These settings don't work in system mode, and WirePlumber will complain with cryptic error messages during startup.

  1. Enable and start the pipewire.service, pipewire-pulse.service and wireplumber.service systemd units (as root). Permissions are automatically dropped to the pipewire user and group. If everything worked correctly, you should see 3 processes running as pipewire user on your system.

PulseAudio compatibility

Change the default-server option in /etc/pulse/client.conf to /var/run/pipewire/native and disable autospawn. If you previously used PulseAudio in system mode, you should already have autospawn disabled. A PulseAudio system mode systemd unit file can be found in the backups/systemd-units directory for reference.

PipeWire socket permission

Add all users which should be able to use audio to the pipewire group to give them read/write access to the pipewire-0 socket.

usermod -a -G pipewire your_user

Test if you have access to PipeWire by running pw-dump, wpctl status and pactl list (for PulseAudio compatibility). If you did everything correctly, applications with PipeWire audio output should be able to play audio.

Clone this wiki locally