Skip to content

fix: Don't pause other apps' media players when quitting on Linux - #339

Closed
Petru101 wants to merge 1 commit into
stoatchat:mainfrom
Petru101:fix/unlink-virtual-sink-on-quit
Closed

Petru101 wants to merge 1 commit into
stoatchat:mainfrom
Petru101:fix/unlink-virtual-sink-on-quit

Conversation

@Petru101

Copy link
Copy Markdown

On Linux Wayland, quitting Stoat pauses whatever else is playing (music players, browser videos).

initVirtualMic links every other app's audio output to stoat-virtual-sink. When Stoat quits, the sink is removed while those links still exist, and WirePlumber's linking.pause-playback (on by default) pauses the MPRIS players of the apps that were linked to it, the same way it does when headphones are unplugged. WirePlumber's own log for this is "node removed: pausing linked media player".

This removes the links to the virtual sink on will-quit, waits briefly for PipeWire to process that, then quits.

Fixes #334 (closed by the reporter, but it still happens on 1.5.4)

Testing: dev build on Fedora KDE Wayland (WirePlumber 0.5.17), with High Tide playing and linked to the virtual sink, quitting Stoat twice on each build:

  • main: High Tide paused both times
  • this branch: High Tide kept playing both times

🤖 Generated with Claude Code

On Wayland, every other app's audio output is linked to the virtual sink.
When Stoat quits, the sink is removed while those links still exist, so
WirePlumber's linking.pause-playback pauses their media players as if
their output device had been unplugged.

Remove the links to the virtual sink before quitting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Dadadah

Dadadah commented Oct 17, 2026

Copy link
Copy Markdown
Member

Thank you for your contribution and your investigation. I have been meaning to investigate this bug myself. Please note that we won't be able to merge this for two reasons:

  1. Stoat does not accept external contributions made with LLMs.
  2. This fix belongs upstream in the node-pipewire library.

I will be opening an issue and fixing this issue in node-pipewire myself, and I will tag you there.

@Dadadah Dadadah closed this Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stoat pauses system media when closing stoat

2 participants