[neon/neon/settings/Neon/release-lts] /: preset pipewire

Harald Sitter null at kde.org
Tue Nov 17 12:09:12 GMT 2020


Git commit 62212da409f68151e93cc315cac12550211efab5 by Harald Sitter.
Committed on 17/11/2020 at 12:08.
Pushed by sitter into branch 'Neon/release-lts'.

preset pipewire

by default pipewire.service would get auto-started on login but for our
purposes that's not necessary as we only need it for wayland and lazy
activation via the socket should be entirely sufficient there as we
aren't in any form or fashion requiring timely sound output.

meanwhile on x11 it seems to step on pulseaudio's toes for unknown
reasons.

this adds a global neon service preset and forces pipewire to follow the
preset rather than debian's determined defaults (which are in fact
derived from the service itself and awkward to change in our pipewire
packaging)

CCBUG: 426108

M  +10   -0    debian/neon-settings-2.postinst
A  +19   -0    usr/lib/systemd/user-preset/10-neon-default.preset

https://invent.kde.org/neon/neon/settings/commit/62212da409f68151e93cc315cac12550211efab5

diff --git a/debian/neon-settings-2.postinst b/debian/neon-settings-2.postinst
index fb5a7ac..f18aae6 100644
--- a/debian/neon-settings-2.postinst
+++ b/debian/neon-settings-2.postinst
@@ -75,4 +75,14 @@ if [ -d /run/systemd/system ]; then
     systemctl --system start neon-flathub.service || true
 fi
 
+# Apply our presets.
+# Because of debian's non-standard preset system via some indirection system (deb-systemd-helper)
+# we cannot simply preset-all since that'd screw with defaults most likely.
+# Instead we'll need to manually preset the services for which we have expectations.
+if [ -d /run/systemd/system ]; then
+    systemctl --user --global preset \
+        pipewire.socket \
+        pipewire.service
+fi
+
 exit 0
diff --git a/usr/lib/systemd/user-preset/10-neon-default.preset b/usr/lib/systemd/user-preset/10-neon-default.preset
new file mode 100644
index 0000000..ad90c35
--- /dev/null
+++ b/usr/lib/systemd/user-preset/10-neon-default.preset
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
+# SPDX-FileCopyrightText: 2020 Harald Sitter <sitter at kde.org>
+
+# Pipewire upstream has the service as wanted by default.target.
+# That has a number of issues
+# - the service always runs even on x11 where we don't actually
+#   need it, so on x11 we have both PA and PW running
+# - there are unexplained issues with PA becoming forgetful
+#   while it's unclear why that happens simply not starting PW
+#   unless needed should help mitigate bad user experience
+#   https://bugs.kde.org/show_bug.cgi?id=426108
+# - pipewire has a socket anyway so we may as well rely on
+#   socket activation
+# After discussion with apol we've decided its worth trying to
+# see what happens if we make pipewire on-demand. Technically that
+# should be sufficient for our wayland use cases and at the same
+# time prevent PW from interfering with user experience on X11.
+disable pipewire.service
+enable pipewire.socket


More information about the Neon-commits mailing list