pa_stream_connect_record can stay in PA_STREAM_CREATING state indefinitely
- PipeWire version: 0.3.47
- Distribution and distribution version: Arch Linux
- Desktop Environment: KDE Plasma 5.24.2
- Kernel version: 5.16.10-arch1-1
Description of Problem:
pa_stream_connect_record
leaves the stream in PA_STREAM_CREATING
state indefinitely in certain situations, for example when the source being connected to is suspended. This causes KDE's plasma-pa
to leave behind lingering volume monitors.
In plasma-pa
's case, the relevant code is here: it tries to connect when you open the applet, then it tries to disconnect when you close it. Normally it would take the false branch here, but in this scenario it always stays in the PA_STREAM_CREATING
and its callback is never called (until the stream is resumed).
How Reproducible:
It seems to happen in all cases involving a suspended stream. I also experienced it with a recording stream's monitor, e.g. when plasma tries to show mic input level to chrome (this could be a separate bug, since the volume monitor doesn't work, while it does with pulseaudio).
Steps to Reproduce:
- run
mpv --pause test.ogg
, or have chromium use the microphone (e.g. visit https://onlinemictest.com) - open and close the plasma pulseaudio applet's "Applications" tab a few times
Actual Results:
pw-dump
shows multiple copies of Plasma PA
.
(pw-dump | grep '"node.name": "Plasma PA"' | wc -l
shows the number of lingering monitors)
Expected Results:
No monitors should linger.
When using pulseaudio, the stream doesn't get stuck in the creating state, and plasma-pa
can successfully disconnect it.
Additional Info (as attachments):
-
pw-dump
: pw-dump.log