-
Notifications
You must be signed in to change notification settings - Fork 2
PipeWire system mode
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.
- Give the
pipewire
user on your system a home directory!! THIS IS REQUIRED TO STORE DATA!usermod -d /var/lib/pipewire pipewire
- Install the relevant PipeWire and WirePlumber systemd units found in the backups/systemd-units directory of this repository.
- Copy
pipewire.conf
,pipewire-pulse.conf
andclient.conf
from/usr/share/pipewire/
to/etc/pipewire/
and adjust the options to your preferences. - Disable the modules
libpipewire-module-x11-bell
andlibpipewire-module-portal
. They are not relevant for system mode and don't work anyway. Also setsupport.dbus
to false, as PipeWire doesn't support the global D-Bus system bus, it always tries to connect to the session bus by default. - 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.
- Enable and start the
pipewire.service
,pipewire-pulse.service
andwireplumber.service
systemd units (as root). Permissions are automatically dropped to thepipewire
user and group. If everything worked correctly, you should see 3 processes running aspipewire
user on your system.
$ ps -u pipewire
PID TTY TIME CMD
1313473 ? 00:01:21 pipewire-pulse
1313492 ? 00:00:03 pipewire
1313493 ? 00:04:48 wireplumber
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.
Copy /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf
to /etc/asound.conf
to make ALSA clients use PipeWire for audio.
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.
Advantages of running PipeWire (or previously PulseAudio) in system mode are:
- the audio stack is completely decoupled from the user session and works standalone,
- only trusted users can play back or record audio and change sinks, volumes, etc.,
- multiple users on the system can use the same audio hardware at the same time,
- random applications can't restart or kill the audio stack on your system.
Only run PipeWire in system mode when you know what you are doing, since this mode is not officially supported.