Bug 472539 - Speaker icon appears on applications that have the same name of the audio context name
Summary: Speaker icon appears on applications that have the same name of the audio con...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager widgets (show other bugs)
Version: 5.27.6
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-23 17:14 UTC by Martino Fontana
Modified: 2024-08-22 15:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Task manager screenshot, showing the speaker icon on Dolphin file manager due to Dolphin Emulator (7.07 KB, image/png)
2023-07-23 17:14 UTC, Martino Fontana
Details
Minimal reproducible example (1.11 KB, text/x-csrc)
2023-09-12 13:34 UTC, Martino Fontana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martino Fontana 2023-07-23 17:14:42 UTC
Created attachment 160473 [details]
Task manager screenshot, showing the speaker icon on Dolphin file manager due to Dolphin Emulator

SUMMARY
When an application is playing audio, the task manager will put a speaker icon over the app. (Which can be clicked to mute it.)
However, if there's an application that has the same name of the context name of the audio source, both applications will have the speaker icon.

For example, let's take Dolphin, the GameCube/Wii emulator. Its context name for the audio (when using the Cubeb audio backend) is simply "Dolphin", meaning that the speaker icon will also appear over Dolphin, the file manager, even though it may even not be open.

Note: this doesn't apply to having multiple instances. See the image attached, where:
- The first mpv is playing music, the second is not.
- The first Dolphin Emulator instance is playing a game, and Dolphin file manager is "inheriting" the speaker icon (even though it's not even open).
- However, the second Dolphin Emulator instance is not playing any games, and it doesn't have the speaker icon (as it should).

(You could argue that Dolphin Emulator should use "Dolphin Emulator" for the audio context name, so I made this PR: https://github.com/dolphin-emu/dolphin/pull/12063. With it, the file manager doesn't have the speaker icon anymore. Still, it doesn't mean that there isn't a KDE bug to be solved.)


STEPS TO REPRODUCE
I can't find any other example of conflicting names like this, meaning that you need to have Dolphin Emulator set up to reproduce it.
You can find an unofficial AppImage here: https://github.com/qurious-pixel/dolphin/releases

1. Have Dolphin (file manager) pinned on the task manager;
2. Open Dolphin Emulator;
3. Go to Config > Audio and select "Cubeb" as the Audio Backend;
4. Make Dolphin Emulator play sound by playing a game.
  * If you don't have any game, you can go to Tools > Perform Online System Update, then Tools > Load Wii System Menu.

OBSERVED RESULT
Dolphin (file manager) will have a speaker icon on top of it.

EXPECTED RESULT
Dolphin (file manager) shouldn't have a speaker icon on top of it.

SOFTWARE/OS VERSIONS
Operating System: NixOS 23.11
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.9
Kernel Version: 6.4.3-cachyos (64-bit)
Graphics Platform: Wayland (Dolphin Emulator uses XWayland)

ADDITIONAL INFORMATION
I'm using PipeWire with WirePlumber.
Comment 1 Martino Fontana 2023-07-23 17:21:23 UTC
I forgot to say, when testing Dolphin Emulator, make sure it's a version *before* 5.0-19821 (the one that changes the audio context name).
Comment 2 Nate Graham 2023-09-08 19:13:48 UTC
The last time this happened, it was a bug--or rather, an incompatibility--in the Dolphin emulator. I thikn it's the same thing here.
Comment 3 Martino Fontana 2023-09-12 13:34:03 UTC
Created attachment 161576 [details]
Minimal reproducible example

Compile with `gcc pulse_dolphin_mre.c -lpulse-simple -lpulse`.
Comment 4 Martino Fontana 2023-09-12 13:36:34 UTC
I made a minimal reproducible example.
Make sure that Dolphin (file manager) is in the task manager, compile and run the MRE, and admire the speaker icon floating over Dolphin (file manager).
Comment 5 Martino Fontana 2024-02-06 14:42:05 UTC
This is still an issue on Plasma 5.93.0. (Tested the minimal reproducible example.)