Closed jmaibaum closed 2 years ago
I have also reported this with the pipewire development team: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2556
pipewire is shipped by the runtime (freedesktop-sdk). So if something is missing, it's in the sdk.
I recommend using the ALSA backend anyway.
Just to clarify, Ardour doesn't use pipewire. But when using JACK the pipewire-jack backend is used. Not certain of how that thing is supposed to work. And it seemed to want to use org.freedesktop.RealtimeKit1
DBus to access realtimekit (it used to crash without).
From what I know, Flatpaks (due to sandboxing) are not supported by RTKit anyway, so the only way to use realtime inside a Flatpak is via RLIMITs, which of course need to be set up on the host side via /etc/security/limits.d/ (and require a reboot to apply).
There is a rtkit portal though so there might be a solution.
I'm not that familiar with portals and the issue with RTKit but my understanding is that RTKit is not aware of namespaces and while it does receive the Flatpak's request, it gets confused by the fact that the request pertains to a client that is not running in the same namespace as the daemon (most likely due to PID or user namespace).
Here is what's in the Platform/SDK:
$ find /usr -name \*pipewire\*
/usr/lib/x86_64-linux-gnu/libpipewire-0.3.so.0
/usr/lib/x86_64-linux-gnu/libpipewire-0.3.so.0.335.0
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_ctl_pipewire.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_pipewire.so
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpipewire.so
/usr/lib/x86_64-linux-gnu/pipewire-0.3
/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-adapter.so
/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-client-device.so
/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-client-node.so
/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-loopback.so
/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-metadata.so
/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-protocol-native.so
/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-rtkit.so
/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-session-manager.so
/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-spa-device-factory.so
/usr/share/pipewire
/usr/share/pipewire/pipewire-pulse.conf
/usr/share/pipewire/pipewire.conf
The conf:
# Uses RTKit to boost the data thread priority.
{ name = libpipewire-module-rtkit
args = {
#nice.level = -11
#rt.prio = 88
#rt.time.soft = 2000000
#rt.time.hard = 2000000
}
flags = [ ifexists nofail ]
}
# Set thread priorities without using RTKit.
#{ name = libpipewire-module-rt
# args = {
# nice.level = -11
# rt.prio = 88
# rt.time.soft = 2000000
# rt.time.hard = 2000000
# }
# flags = [ ifexists nofail ]
#}
So it seems the module is disabled in favour of rtkit, which has a portal (albeit I don't know if pipewire uses it)
I think you're looking at the wrong file: pw-jack would use pipewire/jack.conf file, which probably defaults to module-rt for 0.3.36.
Also there is still only host PW daemon, so the portal is irrelevant for PW itself. As for the JACK client using the compatibility libjack.so, no idea but, as I said, I don't believe RTKit itself supports namespace sandboxed clients (but I could be wrong).
Notice how there is no libpipewire-module-rt.so
. So whatever is the config, it's not there.
so you volunteer to file the issue with the freedesktop-sdk?
It will be in freedesktop 22.08.
Saw you note in the FDO tracker, thanks for making sure that the modules will be there in the upcoming FDO runtime.
However, I am not yet sure what I as a user am supposed to do in order to configure RLIMITS/priorities correctly.
I understand that my previous assumptions were based on too few knowledge about pipewire on the host vs in the runtime, but I am left puzzled what config has to go where?
It's really up to the each distro to provide their users with a pipewire group which has upstream recommended RLIMITs set on it, so that from end-user perspective they just need to add themselves to the pipewire group and reboot to benefit from professional realtime support.
You can of course create your own /etc/security/limits.d/50-custom.conf file and directly give your user(s) or group(s) realtime you want but it would be best solved at distro level with a pipewire group.
This was fixed with #41
I am running on Fedora Silverblue 36, and I wanted to look into why Ardour's performance was so bad (frequent xruns even when nothing else was running).
I found
[E][00686.466973][ impl-module.c: 264 pw_context_load_module()] No module "libpipewire-module-rt" was found
in the output:Is this expected?
The module is installed: