- Group pulse-rt: if the PulseAudio binary is marked
- SUID root, then membership of the calling user in this group
- decides whether real-time and/or high-priority scheduling is
- enabled. Please note that enabling real-time scheduling is a
- security risk (see below).
-
Group pulse-access: if PulseAudio is running as a system
daemon (see --system above) access is granted to
members of this group when they connect via AF_UNIX sockets. If
@@ -426,38 +418,15 @@ License along with PulseAudio; if not, see .
latency of the PulseAudio daemon from the system load and is thus
the best way to make sure that PulseAudio always gets CPU time
when it needs it to refill the hardware playback
- buffers. Unfortunately this is a security risk on most systems,
+ buffers. Unfortunately this can be a security risk on some systems,
since PulseAudio runs as user process, and giving realtime
- scheduling privileges to a user process always comes with the risk
+ scheduling privileges to a user always comes with the risk
that the user misuses it to lock up the system -- which is
possible since making a process real-time effectively disables
- preemption.
+ preemption. To solve this problem, PulseAudio uses rtkit to safely
+ acquire real-time scheduling when available.
- To minimize the risk PulseAudio by default does not enable
- real-time scheduling. It is however recommended to enable it
- on trusted systems. To do that start PulseAudio with
- --realtime (see above) or enabled the appropriate option in
- daemon.conf. Since acquiring realtime scheduling is a
- privileged operation on most systems, some special changes to the
- system configuration need to be made to allow them to the calling
- user. Two options are available:
-
- On newer Linux systems the system resource limit RLIMIT_RTPRIO
- (see for more information)
- can be used to allow specific users to acquire real-time
- scheduling. This can be configured in
- /etc/security/limits.conf, a resource limit of 9 is recommended.
-
- Alternatively, the SUID root bit can be set for the PulseAudio
- binary. Then, the daemon will drop root privileges immediately on
- startup, however retain the CAP_NICE capability (on systems that
- support it), but only if the calling user is a member of the
- pulse-rt group (see above). For all other users all
- capabilities are dropped immediately. The advantage of this
- solution is that the real-time privileges are only granted to the
- PulseAudio daemon -- not to all the user's processes.
-
- Alternatively, if the risk of locking up the machine is
+
If the risk of locking up the machine is
considered too big to enable real-time scheduling, high-priority
scheduling can be enabled instead (i.e. negative nice level). This
can be enabled by passing --high-priority (see above)