1 |
On Tue, 2022-07-26 at 21:08 +0100, Sam James wrote: |
2 |
> Bug: https://bugs.gentoo.org/744622 |
3 |
> Bug: https://bugs.gentoo.org/859280 |
4 |
> Signed-off-by: Sam James <sam@g.o> |
5 |
> --- |
6 |
> .../2022-07-28-pipewire-sound-server.en.txt | 130 |
7 |
> ++++++++++++++++++ |
8 |
> 1 file changed, 130 insertions(+) |
9 |
> create mode 100644 2022-07-28-pipewire-sound-server/2022-07-28- |
10 |
> pipewire-sound-server.en.txt |
11 |
> |
12 |
> diff --git a/2022-07-28-pipewire-sound-server/2022-07-28-pipewire- |
13 |
> sound-server.en.txt b/2022-07-28-pipewire-sound-server/2022-07-28- |
14 |
> pipewire-sound-server.en.txt |
15 |
> new file mode 100644 |
16 |
> index 0000000..6ebe676 |
17 |
> --- /dev/null |
18 |
> +++ b/2022-07-28-pipewire-sound-server/2022-07-28-pipewire-sound- |
19 |
> server.en.txt |
20 |
> @@ -0,0 +1,130 @@ |
21 |
> +Title: Pipewire sound server migration |
22 |
> +Author: Sam James <sam@g.o> |
23 |
> +Posted: 2022-07-28 |
24 |
> +Revision: 1 |
25 |
> +News-Item-Format: 2.0 |
26 |
> +Display-If-Installed: media-video/pipewire |
27 |
> +Display-If-Installed: media-sound/pulseaudio |
28 |
> +Display-If-Installed: media-sound/pulseaudio-daemon |
29 |
> +Display-If-Installed: media-libs/libpulse |
30 |
> + |
31 |
> +PipeWire has gained a new USE flag "sound-server" for |
32 |
> enabling/disabling its |
33 |
> +sound server capabilities. |
34 |
> + |
35 |
> +This change is needed to avoid PipeWire and PulseAudio conflicting |
36 |
> over control |
37 |
> +of audio devices. Before this change, OpenRC users were in some cases |
38 |
> accidentally |
39 |
> +migrated to PipeWire which was difficult to override without manually |
40 |
> editing |
41 |
> +launcher files. |
42 |
> + |
43 |
> +For non-audio purposes, PipeWire is installed in many configurations |
44 |
> as more |
45 |
> +and more software depends on it for e.g. screensharing, sandboxing, |
46 |
> +and window previews, so users will need to act based on their |
47 |
> preferred |
48 |
> +setup rather than simply avoiding installing PipeWire, as it is |
49 |
> +increasingly required as a dependency. |
50 |
> + |
51 |
> +Packages needing PulseAudio's APIs will be migrated from the now-meta |
52 |
> package |
53 |
> +media-sound/pulseaudio to depending on media-libs/libpulse. The |
54 |
> runtime |
55 |
> +PulseAudio server can be provided by either PipeWire (media- |
56 |
> video/piepwire) |
57 |
> +or the original PulseAudio (media-sound/pulseaudio-daemon). |
58 |
> + |
59 |
> +The new sound-server USE flag for PipeWire allows easily controlling |
60 |
> +this behavior. |
61 |
> + |
62 |
> +There are several options available: |
63 |
> + |
64 |
> +1. To use PipeWire for sound, users should enable USE=sound-server |
65 |
> for PipeWire: |
66 |
> + |
67 |
> + Place the following entries in /etc/portage/package.use: |
68 |
> + ``` |
69 |
> + media-video/pipewire sound-server |
70 |
> + media-sound/pulseaudio -daemon |
71 |
> + ``` |
72 |
> + |
73 |
> + First, sync: |
74 |
> + $ emerge --sync |
75 |
> + |
76 |
> + Deselect media-sound/pulseaudio-daemon: |
77 |
> + $ emerge --deselect media-sound/pulseaudio-daemon |
78 |
> + |
79 |
> + Then perform a world upgrade: |
80 |
> + $ emerge --ask --update --changed-use --deep @world |
81 |
> + |
82 |
> + Then depclean: |
83 |
> + $ emerge --ask --depclean |
84 |
> + |
85 |
> + OpenRC users on an XDG-compliant desktop which respects autostart |
86 |
> files |
87 |
> + will not need to take any further action. |
88 |
> + |
89 |
> + OpenRC users using a minimal desktop which does not respect |
90 |
> autostart |
91 |
> + files will need to run `gentoo-pipewire-launcher &` in e.g. |
92 |
> + `~/.xprofile`. |
93 |
> + |
94 |
> + systemd users will also need to run the following commands: |
95 |
> + $ systemctl --user --now disable pulseaudio.service |
96 |
> pulseaudio.socket |
97 |
> + $ systemctl --user --now enable pipewire.socket pipewire- |
98 |
> pulse.socket |
99 |
> + $ systemctl --user --now disable pipewire-media-session.service |
100 |
> + $ systemctl --user --force enable wireplumber.service |
101 |
> + |
102 |
> +2. To use PulseAudio's daemon for sound, users should disable |
103 |
> USE=sound-server for PipeWire, |
104 |
> + enable USE=daemon on media-sound/pulseaudio, and add media- |
105 |
> sound/pulseaudio-daemon to |
106 |
> + their world file: |
107 |
> + |
108 |
> + Place the following entries in /etc/portage/package.use: |
109 |
> + ``` |
110 |
> + media-video/pipewire -sound-server |
111 |
> + media-sound/pulseaudio daemon |
112 |
> + ``` |
113 |
> + |
114 |
> + Add media-sound/pulseaudio-daemon to @world: |
115 |
> + $ emerge --noreplace media-sound/pulseaudio-daemon |
116 |
> + |
117 |
> + Then perform a world upgrade: |
118 |
> + $ emerge --ask --update --changed-use --deep @world |
119 |
> + |
120 |
> + Then depclean: |
121 |
> + $ emerge --ask --depclean |
122 |
> + |
123 |
> + OpenRC users on an XDG-compliant desktop which respects autostart |
124 |
> files |
125 |
> + will not need to take any further action. |
126 |
> + |
127 |
> + OpenRC users using a minimal desktop which does not respect |
128 |
> autostart |
129 |
> + files should consider adding `gentoo-pipewire-launcher &` in e.g. |
130 |
> + `~/.xprofile` but it's not strictly required in terms of audio |
131 |
> + handling. It may be required in future for the non-audio usecases |
132 |
> + described above. |
133 |
> + |
134 |
> + systemd users will also need to run the following commands: |
135 |
> + $ systemctl --user --now enable pulseaudio.service |
136 |
> pulseaudio.socket |
137 |
> + $ systemctl --user --now disable pipewire.socket pipewire- |
138 |
> pulse.socket |
139 |
> + |
140 |
> +3. For users without sound on their system, those using JACK without |
141 |
> + PipeWire, or those using pure ALSA without PipeWire, the following |
142 |
> steps |
143 |
> + are recommended: |
144 |
> + |
145 |
> + Place the following entries in /etc/portage/package.use: |
146 |
> + ``` |
147 |
> + media-video/pipewire -sound-server |
148 |
> + media-sound/pulseaudio -daemon |
149 |
> + ``` |
150 |
> + |
151 |
> + Then perform a world upgrade: |
152 |
> + $ emerge --ask --update --changed-use --deep @world |
153 |
> + |
154 |
> + Then depclean: |
155 |
> + $ emerge --ask --depclean |
156 |
> + |
157 |
> + OpenRC users on an XDG-compliant desktop which respects autostart |
158 |
> files |
159 |
> + will not need to take any further action. |
160 |
> + |
161 |
> + OpenRC users using a minimal desktop which does not respect |
162 |
> autostart |
163 |
> + files will need to run `gentoo-pipewire-launcher &` in e.g. |
164 |
> + `~/.xprofile`. |
165 |
> + |
166 |
> + systemd users will also likely want to run the following commands, |
167 |
> again |
168 |
> + for the purposes of non-audio PipeWire use: |
169 |
> + $ systemctl --user --now enable pipewire.socket |
170 |
> + $ systemctl --user --now --force enable wireplumber.service |
171 |
> + |
172 |
> + |
173 |
> +Further resources: |
174 |
> +* https://wiki.gentoo.org/wiki/PipeWire |
175 |
|
176 |
LGTM |