Bug 457023 - Applet leaks audio sinks with Pipewire and WEBRTC
Summary: Applet leaks audio sinks with Pipewire and WEBRTC
Status: REPORTED
Alias: None
Product: plasma-pa
Classification: Plasma
Component: applet (show other bugs)
Version: 5.25.3
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-22 16:58 UTC by Oliver Hiorns
Modified: 2023-11-19 14:29 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
After creating some leaked sinks by opening the applet (257.20 KB, image/png)
2022-07-22 16:58 UTC, Oliver Hiorns
Details
Disconnecting and reconnecting to the discord call results in leaked sinks having no connection (282.60 KB, image/png)
2022-07-22 17:03 UTC, Oliver Hiorns
Details
How it should look (after a restart of plasmashell) (134.06 KB, image/png)
2022-07-22 17:05 UTC, Oliver Hiorns
Details
leak havoc (742.04 KB, image/png)
2023-02-01 18:24 UTC, Timothy Hutchins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hiorns 2022-07-22 16:58:59 UTC
Created attachment 150822 [details]
After creating some leaked sinks by opening the applet

STEPS TO REPRODUCE
1. Set up pipewire and install a WEBRTC client (e.g. discord) and a pipewire graph visualiser (e.g. qpwgraph, helvum)
2. Open the graph visualiser and discord
3. Join a call in discord - this creates a WEBRTC audio sink with monitor.
4. Repeatedly activate the plasma-pa applet, with it viewing the "application" side.

OBSERVED RESULT
Every time the applet is activated, a new audio sink is created (to connect to the monitors of all applications producing audio). When the applet is closed, the sink remains present and connected to the WEBRTC monitor. (It does properly disconnect from other applications e.g. Nightly)
If the WEBRTC monitor disappears, the sink(s) still remain - now with no connections at all.
All these leaked sinks remain until the applet is killed (by restarting plasmashell).

EXPECTED RESULT
Sinks do not leak - if the sink is created when the applet is activated, it should disappear when the applet closes.

SOFTWARE/OS VERSIONS
Linux: Manjaro Linux (5.19.0-1-MANJARO)
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Running on Wayland

ADDITIONAL INFORMATION
I have only tested with with discord acting as the WEBRTC client.
Comment 1 Oliver Hiorns 2022-07-22 17:03:33 UTC
Created attachment 150823 [details]
Disconnecting and reconnecting to the discord call results in leaked sinks having no connection
Comment 2 Oliver Hiorns 2022-07-22 17:05:36 UTC
Created attachment 150824 [details]
How it should look (after a restart of plasmashell)
Comment 3 Magne Djupvik 2022-08-02 17:41:23 UTC
I'm having the same issue where the volume applet creates new "Record" sinks for every application when I open the applet, and doesn't remove any when closing it, hence accumulating more and more. I am using Kubuntu 22.04 with PipeWire.
Comment 4 Nicolas Fella 2022-08-14 16:18:21 UTC
I can't really reproduce this with Plasma master, Discord, and PipeWire 0.3.56

Sometimes I see one unconnected plasma-pa item in Helvum, but that quickly disappears again
Comment 5 Nicolas Fella 2022-08-14 16:21:20 UTC
https://invent.kde.org/plasma/plasma-pa/-/merge_requests/130 might have changed something here, but I can't say for sure
Comment 6 max 2022-12-28 22:26:31 UTC
I see this same issue sometimes

Plasma 5.26.44
Pipewire 0.3.63
Firefox as audio source

It does not happen every time though. I'm not sure exactly how to get it to reproduce consistently.
Comment 7 Timothy Hutchins 2023-02-01 18:24:06 UTC
Created attachment 155855 [details]
leak havoc
Comment 8 Timothy Hutchins 2023-02-01 18:25:32 UTC
Comment on attachment 155855 [details]
leak havoc

Can confirm this happens to me

kernal: 6.1.8-arch1-1
KDE Plasma: 5.26.5
libpipewire: 0.3.65