@@ -11,10 +11,7 @@ $ pipewire
1111
1212When pipewire works as expected, use the autostarting mechanism of your desktop
1313environment or [ startx] ( ../graphical-session/xorg.md#startx ) . The ` pipewire `
14- package provides ` pipewire ` and ` pipewire-pulse ` system services, but they are
15- not recommended for a typical setup.
16-
17- The ` pipewire ` package ships [ Desktop
14+ package ships [ Desktop
1815Entry] ( https://specifications.freedesktop.org/desktop-entry-spec/latest/ ) files
1916for ` pipewire ` and ` pipewire-pulse ` in ` /usr/share/applications ` . If your
2017environment supports the [ Desktop Application Autostart
@@ -26,6 +23,95 @@ directory:
2623# ln -s /usr/share/applications/pipewire.desktop /etc/xdg/autostart/pipewire.desktop
2724```
2825
26+ ## Session Management
27+
28+ In PipeWire, a session manager assumes responsibility for interconnecting media
29+ sources and sinks as well as enforcing routing policy. Without a session
30+ manager, PipeWire will not function. The reference
31+ [ ` pipewire-media-session ` ] ( https://gitlab.freedesktop.org/pipewire/media-session )
32+ was originally provided in the Void ` pipewire ` package and configured to run by
33+ default to satisfy this requirement. However, ` pipewire-media-session ` is
34+ deprecated and the authors recommend using
35+ [ WirePlumber] ( https://pipewire.pages.freedesktop.org/wireplumber/ ) in its
36+ place. Install the ` wireplumber ` package to use this session manager with
37+ PipeWire.
38+
39+ The standard Void configuration, which causes ` pipewire ` to launch
40+ ` pipewire-media-session ` automatically, must be overridden to use ` wireplumber ` .
41+ The only change necessary is to comment out the ` pipewire-media-session `
42+ invocation in the ` context.exec ` section, which can be done with a single ` sed `
43+ substitution. To make this configuration change visible to all users, place the
44+ new configuration file in ` /etc/pipewire ` :
45+
46+ ```
47+ # mkdir -p /etc/pipewire
48+ # sed '/path.*=.*pipewire-media-session/s/{/#{/' \
49+ /usr/share/pipewire/pipewire.conf > /etc/pipewire/pipewire.conf
50+ ```
51+
52+ Alternatively, place the new configuration file in the expected location for a
53+ single user:
54+
55+ ```
56+ $ : "${XDG_CONFIG_HOME:=${HOME}/.config}"
57+ $ mkdir -p "${XDG_CONFIG_HOME}/pipewire"
58+ $ sed '/path.*=.*pipewire-media-session/s/{/#{/' \
59+ /usr/share/pipewire/pipewire.conf > "${XDG_CONFIG_HOME}/pipewire/pipewire.conf"
60+ ```
61+
62+ > A custom ` pipewire.conf ` in either ` /etc/pipewire ` or
63+ > ` ${XDG_CONFIG_HOME}/pipewire ` will prevent entirely the use of the default
64+ > system configuration. Users who override the default configuration to enable
65+ > ` wireplumber ` are encouraged to monitor the default configuration and
66+ > reconcile any changes with each ` pipewire ` update.
67+
68+ Now, configure ` wireplumber ` to start alongside ` pipewire ` . If your window
69+ manager or desktop environment auto-start mechanism is used to start
70+ ` pipewire ` , it is recommended to use the same mechanism for starting
71+ ` wireplumber ` . The ` wireplumber ` package includes a ` wireplumber.desktop `
72+ Desktop Entry file that may be useful in this situation.
73+
74+ > Be aware that ` wireplumber ` must launch * after* the ` pipewire ` executable.
75+ > The Desktop Application Autostart Specification makes no provision for
76+ > ordering of services started via Desktop Entry files. When relying on these
77+ > files to launch ` pipewire ` and ` wireplumber ` , consult the documentation for
78+ > your window manager or desktop environment to determine whether proper
79+ > ordering of services can be achieved.
80+
81+ If proper ordering of separate ` pipewire ` and ` wireplumber ` services is
82+ infeasible, it is possible to configure ` pipewire ` to launch the session
83+ manager directly. This can be accomplished by running
84+
85+ ```
86+ # mkdir -p /etc/pipewire/pipewire.conf.d
87+ # echo 'context.exec = [ { path = "/usr/bin/wireplumber" args = "" } ]' \
88+ > /etc/pipewire/pipewire.conf.d/10-wireplumber.conf
89+ ```
90+
91+ for system configurations or, for per-user configurations, running
92+
93+ ```
94+ $ mkdir -p "${XDG_CONFIG_HOME}/pipewire/pipewire.conf.d
95+ $ echo 'context.exec = [ { path = "/usr/bin/wireplumber" args = "" } ]' \
96+ > "${XDG_CONFIG_HOME}/pipewire/pipewire.conf.d/10-wireplumber.conf"
97+ ```
98+
99+ With either of these configurations, launching ` pipewire ` should be sufficient
100+ to establish a working PipeWire session that uses ` wireplumber ` for session
101+ management.
102+
103+ In its default configuration, WirePlumber requires an active [ D-Bus
104+ session] ( ../session-management.md#d-bus ) . If your desktop environment or window
105+ manager is configured to provide a D-Bus session as well as launch ` pipewire `
106+ and ` wireplumber ` , no further configuration should be required. Users wishing
107+ to launch ` pipewire ` on its own, * e.g.* , in a ` .xinitrc ` script, may find it
108+ necessary to configure ` pipewire ` to launch ` wireplumber ` directly and wrap the
109+ ` pipewire ` invocation as
110+
111+ ```
112+ dbus-run-session pipewire
113+ ```
114+
29115## PulseAudio replacement
30116
31117Before starting ` pipewire-pulse ` , make sure that the PulseAudio service is
0 commit comments