Pipewire fails to reacquire a realtime priority when restarted

Bug #2107340 reported by Chris Coulson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pipewire (Ubuntu)
New
Undecided
Unassigned

Bug Description

Pipewire tries to acquire a realtime priority when it starts via the libpipewire-module-rt plugin. By default, it prefers to use the org.freedesktop.portal.Realtime interface if xdg-desktop-portal is running (it checks if org.freedesktop.portal.Desktop exists on the session bus). If xdg-desktop-portal isn't running, it uses rtkit directly - see https://gitlab.freedesktop.org/pipewire/pipewire/-/tree/1.2.7/src/modules?ref_type=tags#L932.

I started looking at this because I have an annoying issue with my audio which results in my speakers making popping noises frequently when they're outputting anything. I have another issue where my USB speakers are frequently not detected by pipewire without restarting it.

When pipewire starts with a new session, it acquires a realtime priority by using rtkit directly because xdg-desktop-portal isn't running at this stage. However, if you restart pipewire manually later on when xdg-desktop-portal is running, pipewire uses the portal interface to request a realtime priority, and this fails with xdg-desktop-portal outputting the following error to the journal:

Apr 13 02:58:01 farnsworth xdg-desktop-por[7283]: Realtime error: Could not get pidns: Could not fstatat ns/pid: Not a directory

The libpipewire-module-rt plugin does have an option to disable usage of the portal interface for requesting a realtime priority (rtportal.enabled=false).

This is tested with pipewire 1.2.7 in plucky.

Tags: plucky
tags: added: plucky
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.