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