Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 800890 - >=media-video/pipewire-0.3.31: jack-sdk now uses RLIMITs instead of rtkit
Summary: >=media-video/pipewire-0.3.31: jack-sdk now uses RLIMITs instead of rtkit
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://gitlab.freedesktop.org/pipewi...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-06 18:11 UTC by Niklāvs Koļesņikovs
Modified: 2022-02-03 13:08 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Niklāvs Koļesņikovs 2021-07-06 18:11:20 UTC
Starting with pipewire 0.3.31 upstream has switched the JACK2 emulation/compatibility module to use the older Linux RLIMIT infrastructure instead of the desktop oriented and upstream abandoned rtkit. The change was motivated by the fact that some (arguably badly made pro audio plugins) run their initialization code on the RT threads, which under rtkit have a 100 ms runtime limit leading to crashes in JACK applications, which are written on the assumption that RLIMITs and FIFO scheduling are being used. If nothing is done then JACK applications will now be run as regular threads (OTHER/0) and are expected to underrun often due to the low latency requirements of professional JACK applications.

For Gentoo this means one of two things:
a) patch pipewire/jack.conf file to again use the libpipewire-module-rtkit instead of the libpipewire-module-rt (not recommended because that will only allow for RR/20 rather than FIFO/88)
b) either update the ebuild provided limits.d file to include "@realtime - rtprio 88" in addition to existing contents or depend on sys-auth/realtime-base and tell users that to run JACK applications with PipeWire, they must add their user to the realtime group and log out/reboot to apply the change.

Reproducible: Always
Comment 1 mehw 2021-07-08 12:26:35 UTC
(In reply to Niklāvs Koļesņikovs from comment #0)
> Starting with pipewire 0.3.31 upstream has switched the JACK2
> emulation/compatibility module to use the older Linux RLIMIT infrastructure
> instead of the desktop oriented and upstream abandoned rtkit.

Do you mean this?

--- pipewire-0.3.30/src/daemon/jack.conf.in	2021-06-09 07:14:11.000000000 +0000
+++ pipewire-0.3.31/src/daemon/jack.conf.in	2021-06-28 13:32:38.000000000 +0000
@@ -32,8 +32,8 @@
     # If nofail is given, module initialization failures are ignored.
     #
     #
-    # Uses RTKit to boost the data thread priority.
-    {   name = libpipewire-module-rtkit
+    # Boost the data thread priority.
+    {   name = libpipewire-module-rt
         args = {
             #nice.level   = -11
             #rt.prio      = 88
Comment 2 Niklāvs Koļesņikovs 2021-07-08 12:44:07 UTC
In short, yes.
Comment 3 Niklāvs Koļesņikovs 2022-02-03 13:06:33 UTC
Since PipeWire 0.3.44 there's now a unified libpipewire-module-rt which first tries RLIMITs and then falls back to RTKit. For best experience JACK users will definitely still want to belong to at least realtime group (but ideally the upcoming/hopeful acct-group/pipewire). But basic realtime should now again function, making this bug no longer that relevant.