Repository navigation
Description
Follow-up of #532, found in the release check of #1031 (not an upstream report). Since #532 each Audio Input or Output Capture stream has a connection to the sound server of its own, besides the shared one the plugin uses for everything else. When the server drops only a stream's connection, the source stops recording and never starts again: no restart, no reconnection, and no line in the log.
Location
plugins/linux-pulseaudio/pulse-input.cline 547,pulse_stream_state_changed(): when the stream fails and its context is notPA_CONTEXT_READY, it returns early ("With the whole connection lost, pulse_reconnected restarts it", line 553). Before linux-pulseaudio: Give each capture stream a connection of its own #532 the stream's context was the shared one, so that was true. Now the stream's context is its own: if only that connection is gone, the shared one stays ready, there is no reconnection, and nothing restarts the stream.plugins/linux-pulseaudio/pulse-wrapper.cline 458,pulse_stream_new(): the connection per stream from linux-pulseaudio: Give each capture stream a connection of its own #532. The reconnection (pulse_context_state_changed(), line 112) only watches the shared connection.
Reproduced in 0.1.0-beta.20261014
The released AppImage (built from 9e2325e), headless: private PipeWire, WirePlumber and pipewire-pulse with no hardware, an Audio Input Capture on a virtual source. pw-cli destroy on the PipeWire client of the source's stream (its own connection): 5 s later the source has no stream and was restarted 0 times; the log shows nothing after the drop.
| Build | After its stream's connection is dropped |
|---|---|
| master before #532 (06ef6aa, one shared connection) | "Lost the connection to the server, reconnecting", "Reconnected", "Started recording" within 10 ms; records again |
| 0.1.0-beta.20261014 AppImage | no stream, 0 restarts, no log line |
| current master (87582ae) | the same: no stream, 0 restarts, no log line |
Class
Silent audio loss with nothing in the log. No crash. It needs the server to drop one client connection on its own and keep the rest (for example pactl kill-client, or an error on that connection). No real-world report is known yet. Before #532 the same drop was a lost shared connection, and the reconnection recovered from it.
Proposed fix
In pulse_stream_state_changed(), check the shared connection instead of the stream's own one. A stream whose own connection is gone is then restarted like any failed stream, through the retry, pause and limit from #1031. A lost shared connection or a server restart is still left to the reconnection. Stacked on #1031; it will be posted after that one merges.
RED: test_pulse_stream_restart (private PipeWire, no hardware, no display) gains 5 cases. 2 fail today:
- the server drops the connection of one source's stream: audio must return within 3 s, and the other source must not restart;
- the connection is dropped 5 times, then twice in a row: audio returns each time, the source never gives up, and no connection is leaked.
3 cases are controls and pass today:
- a source destroyed while its restart after a drop is pending leaks nothing;
- only the shared connection is dropped: the reconnection restarts each source once;
- pipewire-pulse restarts: each source is restarted once.
It skips in CI (the Tier 2 image has no PipeWire), like the existing cases.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
rdoupe commentedon Oct 16, 2026
Claiming: this issue.
This is a follow-up of our #532 and builds on #1031, so the fix stays inside
plugins/linux-pulseaudioand goes up after #1031 merges:test_pulse_stream_restartdrops the server connection of one source's stream (pw-cli destroyon its client). Audio must return within 3 s, and the other source must not restart. A second case drops it 5 times, then twice in a row. Three control cases cover a source destroyed while its restart is pending, a lost shared connection, and a pipewire-pulse restart (each source restarted once). Today the first two fail.pulse_stream_state_changed()checks the shared connection instead of the stream's own one, so a stream whose connection is gone restarts through linux-pulseaudio: Retry failed stream restarts with a pause and a limit #1031's retry path. The reconnection still handles a lost shared connection or a server restart.linux-pulseaudio: Restart a stream whose own connection was dropped (o…