File 0001-systemd-Disable-pipewire-user-services-for-root.patch of Package A_15.6-pipewire

41
 
1
From 9bc29b4b37f9a1bf544e84058c16acd8b94ef70b Mon Sep 17 00:00:00 2001
2
From: msizanoen <msizanoen@qtmlabs.xyz>
3
Date: Mon, 10 Mar 2025 20:06:58 +0700
4
Subject: [PATCH] systemd: Disable pipewire user services for root
5
6
The `access(2)` based multi-user mediation mechanism doesn't quite work
7
for the root user, which may cause it to conflict with a running
8
foreground user session. Prevent this by not running the user service at
9
all for the root user, which nobody should be doing anyway.
10
---
11
 src/daemon/systemd/user/pipewire.service.in | 1 +
12
 src/daemon/systemd/user/pipewire.socket     | 1 +
13
 2 files changed, 2 insertions(+)
14
15
diff --git a/src/daemon/systemd/user/pipewire.service.in b/src/daemon/systemd/user/pipewire.service.in
16
index b9b137351d..4236c6bd4d 100644
17
--- a/src/daemon/systemd/user/pipewire.service.in
18
+++ b/src/daemon/systemd/user/pipewire.service.in
19
@@ -14,6 +14,7 @@ Description=PipeWire Multimedia Service
20
 # After=pipewire.socket is not needed, as it is already implicit in the
21
 # socket-service relationship, see systemd.socket(5).
22
 Requires=pipewire.socket
23
+ConditionUser=!root
24
 
25
 [Service]
26
 LockPersonality=yes
27
diff --git a/src/daemon/systemd/user/pipewire.socket b/src/daemon/systemd/user/pipewire.socket
28
index 16e23a7b66..890342abbc 100644
29
--- a/src/daemon/systemd/user/pipewire.socket
30
+++ b/src/daemon/systemd/user/pipewire.socket
31
@@ -1,5 +1,6 @@
32
 [Unit]
33
 Description=PipeWire Multimedia System Sockets
34
+ConditionUser=!root
35
 
36
 [Socket]
37
 Priority=6
38
-- 
39
GitLab
40
41