rtkit module is failing in Flatpak
xdg-desktop-portal bug report: Add a RealtimeKit Portal
Apparently, there's a PID namespace issue so the host's rtkit-daemon can't see the Flatpak app PID.
In the Flatpak sandbox, I'm getting this error:
[module-rtkit.c:502 idle_func()] could not make thread realtime: Input/output error
On the host, I'm getting:
rtkit-daemon: Failed to look up client: No such file or directory
Minimal permissions I used to get the Flatpak sandbox access to the host's PipeWire daemon:
--filesystem=xdg-run/pipewire-0:ro
--system-talk-name=org.freedesktop.RealtimeKit1
maybe I should've also added --filesystem=xdg-run/pipewire-0.lock:ro
An example for an application using PipeWire: io.mpv.player
Note that you should run mpv with the Jack backend to use PipeWire, so add: --ao=jack --audio-channels=stereo