Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 791847 - media-video/pipewire rdepend sys-auth/rtkit
Summary: media-video/pipewire rdepend sys-auth/rtkit
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-24 15:23 UTC by Stefan de Konink
Modified: 2021-09-16 22:44 UTC (History)
4 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 Stefan de Konink 2021-05-24 15:23:28 UTC
I think pipewire requires more runtime dependencies. I am trying to make pipewire-pulse working. Without rtkit, it causes quite a few warnings.

Reproducible: Always
Comment 1 Niklāvs Koļesņikovs 2021-05-25 10:14:54 UTC
Not really, the lowest achievable latencies will be higher than with rtkit (obviously) but in my testing they are still comparable to what JACK or PulseAudio provide on the same setup. Not to mention that it's a pure runtime dependency.

As a side note, the 9999 can go realtime without rtkit if all occurrences of libpipewire-module-rtkit in configuration are renamed to libpipewire-module-rt and the user is in the realtime group. Not that I recommend doing that but it is possible.
Comment 2 Stefan de Konink 2021-05-25 10:28:25 UTC
Please review the startup warnings for pipewire-pulse in journalctl without RTkit being present. Hence, I think it is "expected" (similar to the dbus USE="user-session" in #791844 )

May 23 12:55:22 thinkpad systemd[776]: Started PipeWire PulseAudio.
May 23 12:55:22 thinkpad pipewire-pulse[133427]: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
May 23 12:55:22 thinkpad pipewire-pulse[133427]: could not set nice-level to -11: No such file or directory
May 23 12:55:22 thinkpad pipewire-pulse[133427]: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
May 23 12:55:22 thinkpad pipewire-pulse[133427]: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
May 23 12:55:22 thinkpad pipewire-pulse[133427]: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
May 23 12:55:22 thinkpad pipewire-pulse[133427]: could not make thread realtime: No such file or directory
Comment 3 Niklāvs Koļesņikovs 2021-05-25 10:53:13 UTC
Yup, I saw those when I was trying to figure out how to make libpipewire-module-rt work as well as when doing the ebuild overhaul and verifying that rtkit is not mandatory. In those log messages the libpipewire-module-rtkit is erroring out but that does not break pipewire itself. And while the performance impact is likely to be system and configuration dependent, no one has ever reported unacceptable performance without rtkit (e.g. audio stuttering due to recurring buffer underruns). If for you or anyone else installing sys-auth/rtkit actually fixed otherwise broken audio, that would be a different story and definitely a valid reason to upgrade sys-auth/rtkit from optfeature to RDEPEND.
Comment 4 Stefan de Konink 2021-05-25 11:00:01 UTC
I actually (still) have stuttering even with RTKit, but it is likely also Bluetooth related. But consider my report as informative, like you have observed it yourself.
Comment 5 Niklāvs Koļesņikovs 2021-05-25 12:08:51 UTC
Yeah, Bluetooth, while better, is still a pain point - you likely need to either increase one of the <foo>.clock.min-quantum or api.alsa.headroom configuration parameters. By far the easiest is the default.clock.min-quantum in /etc/pipewire/pipewire.conf but doing so will raise the minimum possible latency for everything. Setting it to 1024 (~21 ms latency at 48 kHz) or less often 2048 (~43 ms latency at 48 kHz) has so far cleared similar Bluetooth issues, and while far from perfect is likely to be comparable to what PulseAudio or JACK can reliably provide with a mainline kernel anyway, so it's mostly a problem for pro audio users that need multiple times lower latencies.

At least one Gentoo user was able to figure out how to set it per-device but I don't have have on-hand instructions for that. Also it's worth remembering that PipeWire itself can operate with non-power-of-two values such as 1600 or perhaps more preferably a sum of two adjacent powers-of-two e.g. 1536 (which is 1024+512). One can see the effective configuration in the pw-top tool that comes with PipeWire.
Comment 6 HougeLangley 2021-06-01 13:10:08 UTC
I do think default rdepend sys-auth/rtkit is important. I have been installed and run systemctl --user status pipewire.service everything working great.