Repository navigation
Description
Restarting audio on Linux breaks OBS until OBS itself is restarted. I restarted audio on my desktop (which restarts PipeWire) and couldn't get my screen back in OBS: the screen capture froze on its last frame, mic and desktop audio went silent, and nothing in OBS noticed. A recording carries on with a frozen picture and no sound.
Operating System: Arch Linux, Hyprland (Wayland), PipeWire 1.6.8 with pipewire-pulse, xdg-desktop-portal-hyprland 1.4.1
OBS version: Git, obs-rust master b45a287 (also the AUR obs-rust-git build)
Expected behavior: Screen capture and audio sources come back by themselves once PipeWire is back, without a picker when a restore token exists.
Current behavior: The screen freezes and audio goes silent for good. The log shows one line for the screen and nothing for the audio sources:
11:32:57.020: [pipewire] Error id:0 seq:642 res:-32 (Broken pipe): connection error
11:32:57.020: [pipewire] Stream 0x61115694f450 state: "unconnected" (error: connection error)
Steps to reproduce:
- Add a Screen Capture (PipeWire) source and the default audio sources, and start recording.
- Run
systemctl --user restart pipewire. - The screen stays frozen and audio stays silent.
Cause
linux-pipewire: the core error listener only logs. Nothing tears down the dead connection or asks the portal again. The only manual way out, the source's Reload button, also deletes the restore token, so the picker comes back.linux-pulseaudio: the shared context's state callback is a noop (@todo ... we want to reconnect here if the connection is lost). Once the server goes away, the context stays failed and every pulse source, even a newly added one, stays silent until OBS restarts.
Prior work
- Automatic reconnection of audio sources when disconnected? obsproject/obs-studio#6153 asked for automatic audio reconnection; closed as a feature request, on the grounds that a difference between PulseAudio and PipeWire is a PipeWire bug. It isn't specific to PipeWire: restarting a real PulseAudio server leaves the context failed in the same way. No upstream PR reconnects either source.
- Crash (NULL deref) in screencast-portal.c start() when a delayed portal SelectSources response arrives after the session is gone obsproject/obs-studio#13809: crash on a late portal reply after the session is gone. A reconnect must not reintroduce it.
- On Hyprland the portal itself also hangs after a PipeWire restart (screencopy: startSharing() busy-waits forever (100% CPU, portal unresponsive) if PipeWire was restarted before a Start request hyprwm/xdg-desktop-portal-hyprland#433). That is outside OBS.
Written with Claude Code (Claude Opus 5.5).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
test/cmocka: Add RED Linux capture reconnect tests
test/cmocka: Add RED Linux capture reconnect tests
test/cmocka: Add RED Linux capture reconnect tests