Bug 375943

Summary: Task bar shows audio icon for all windows from program playing sound, not just the window actually playing sound
Product: [Plasma] plasmashell Reporter: Pascal d'Hermilly <pascal>
Component: Task Manager and Icons-Only Task Manager widgetsAssignee: Eike Hein <hein>
Status: CONFIRMED ---    
Severity: normal CC: adam.m.fontenot+kde, alex.brrsclnt, alex765, bharadwaj.raju777, breakingspell, bugseforuns, d.milivojevic, eugene.savitsky, kaan94, kde, kdedev, kde_bugs, mikhail.krutov, nate, niccolo.venerandi, plasma-bugs, postix, puspam12345678, shalokshalom, stuart, sunny.bed7466, tunacan_man
Priority: HI    
Version: 5.15.3   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=472539
https://bugs.kde.org/show_bug.cgi?id=463356
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Kmix apps tab
Both Chrome instances showing the same thumbnails while they should show different thumbnails
screenshot

Description Pascal d'Hermilly 2017-02-03 10:43:50 UTC
One of my Chrome windows is playing music - it's in a popup.
The other chrome windows also appear to playing music in the task manager - I'm guessing it doesn't see any difference between the windows if they are from the same process.
Comment 1 Kai Uwe Broulik 2017-02-03 10:48:02 UTC
Yes, there's unfortunately no way to tell. All sound playback "belong" to the main Chrome process. PulseAudio in theory supports applications adding a Window ID to the audio stream but in practise I've never seen anybody actually use this.
Comment 2 Kai Uwe Broulik 2017-04-21 09:38:29 UTC
*** Bug 379021 has been marked as a duplicate of this bug. ***
Comment 3 Dragan 2017-08-06 16:22:29 UTC
This used to work a while back (some time after Fedora 25 was released). 
After some update it started to display this kind of behavior. I'm using firefox, before the regression only the window with the sound playing was marked. ATM all of the firefox windows are "marked" so in essence this feature became useless.
Comment 4 Nate Graham 2017-12-13 20:59:55 UTC
So is there anything we can do here? If not, we should unfortunately mark it as RESOLVED UPSTREAM; no sense in keeping an unfixable bug open forever. :/
Comment 5 Nate Graham 2017-12-13 21:19:05 UTC
*** Bug 377763 has been marked as a duplicate of this bug. ***
Comment 6 Dragan 2017-12-13 21:38:14 UTC
(In reply to Nate Graham from comment #4)
> So is there anything we can do here? If not, we should unfortunately mark it
> as RESOLVED UPSTREAM; no sense in keeping an unfixable bug open forever. :/

It is, obviously, fixable since it used to work as intended. No one has bothered to find the source of the issue.
Comment 7 Nate Graham 2017-12-13 22:51:42 UTC
Everything is theoretically fixable. :) The question is, can we feasibly fix this, or is the root cause in Chrome or PulseAudio?
Comment 8 Dragan 2017-12-13 23:00:44 UTC
(In reply to Nate Graham from comment #7)
> Everything is theoretically fixable. :) The question is, can we feasibly fix
> this, or is the root cause in Chrome or PulseAudio?

It exhibits the same behaviour with Chrome and Firefox so that can be eliminated.
Comment 9 Nate Graham 2017-12-13 23:02:41 UTC
Actually perhaps not. As Kai said:

"All sound playback "belongs" to the main Chrome process. PulseAudio in theory supports applications adding a Window ID to the audio stream but in practise I've never seen anybody actually use this."

If Firefox does the same thing, then they would both just be broken in the same way.
Comment 10 Dragan 2017-12-13 23:42:57 UTC
(In reply to Nate Graham from comment #9)
> Actually perhaps not. As Kai said:
> 
> "All sound playback "belongs" to the main Chrome process. PulseAudio in
> theory supports applications adding a Window ID to the audio stream but in
> practise I've never seen anybody actually use this."
> 
> If Firefox does the same thing, then they would both just be broken in the
> same way.


I remember that this issue started to show up after a kde update. It's unlikely that both firefox and chrome were updated at the same time. I will try and dig up some older fedora kde live image and test it there with the latest firefox.
Comment 11 Alex Barrero 2018-09-07 10:20:02 UTC
Created attachment 114820 [details]
Kmix apps tab
Comment 12 Alex Barrero 2018-09-07 10:21:58 UTC
Comment on attachment 114820 [details]
Kmix apps tab

Any knews about this issue? It is still present in KDE 5.12.6.

I don't know if Dragan could test that past version of fedora to check if the behavior was correct.

Anyways, I know that this is not the place to ask about this (maybe some admin could move to the apropiate product, kmix I suppose...), but it is in some way related to this issue.

In the kmix applet, in the apps tab, all the streams of the same app (diferent tabs in firefox/chrome for example) has the same name. Is it posible to get the name of the tab of the browser and replace with this string in each stream?

Sorry for the non-related question
Comment 13 Nate Graham 2018-09-07 14:17:34 UTC
BTW, that's not KMix, that's Plasma-pa.
Comment 14 Alex Barrero 2018-09-10 07:11:13 UTC
(In reply to Nate Graham from comment #13)
> BTW, that's not KMix, that's Plasma-pa.

Thanks, I wrote a comment on a related bug.
Sorry again for the inconvenience.
Comment 15 Matthias 2018-09-11 07:34:45 UTC
Dragan: What are the results of your test?
Comment 16 Matthias 2018-09-11 07:37:04 UTC
*** Bug 398475 has been marked as a duplicate of this bug. ***
Comment 17 Matthias 2018-09-11 07:43:43 UTC
Audio and Videoplayers send such informations for sure, since there are already plasma widgets, who display that text correctly. https://pictshare.net/g30voo1s2o.png
Comment 18 Mike Krutov 2019-03-26 11:26:43 UTC
Still happens on current release. Tested with Firefox, Falkon, Chromium - all have audio icons on every window.
Comment 19 Puspam Adak 2020-08-17 10:46:23 UTC
Let me add a sub-issue. Suppose, I have 2 Chrome windows open, one playing a video from YouTube and the other is not playing any video or audio, just displaying a webpage. In the task manager, both the instances shows the same thumbnails on hovering over them.
Comment 20 Puspam Adak 2020-08-17 10:47:55 UTC
Created attachment 130932 [details]
Both Chrome instances showing the same thumbnails while they should show different thumbnails
Comment 21 Nate Graham 2021-05-03 20:05:18 UTC
This is fixed in Plasma 5.22! See the fix for Bug 417457 which fixed this too.
Comment 22 Patrick Silva 2022-09-23 13:39:23 UTC
Can reproduce with Firefox and Opera browser on neon unstable.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.26.80
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Graphics Platform: Wayland
Comment 23 Nate Graham 2022-09-23 21:35:14 UTC
Can you attach a screenshot of it?
Comment 24 Patrick Silva 2022-09-23 23:01:32 UTC
Created attachment 152378 [details]
screenshot

Focused Firefox window has the sound icon despite it is not playing anything.
Comment 25 Nate Graham 2022-09-24 17:16:52 UTC
I can reproduce that with a classic Task manager or an Icons-Only Task Manager with grouping turned off.
Comment 26 Fushan Wen 2022-09-24 17:47:00 UTC
I think it's not possible to fully fix it currently due to mpris depending on PID
Comment 27 Nate Graham 2022-09-26 17:18:02 UTC
Darn. :/
Comment 28 Adam Fontenot 2023-08-23 21:41:59 UTC
> All sound playback "belong" to the main Chrome process. PulseAudio in theory supports applications adding a Window ID to the audio stream but in practise I've never seen anybody actually use this.

Does anyone know whether there's a bug in Firefox for tagging the window ID on Linux systems? I can try to file one if there's not an existing report.

Do we know whether KDE would should the audio icon for the correct window if Firefox *did* tag the window correctly? In other words - do we support this feature?
Comment 29 TraceyC 2024-09-26 19:23:09 UTC
*** Bug 467125 has been marked as a duplicate of this bug. ***
Comment 30 TraceyC 2024-09-26 19:23:21 UTC
*** Bug 489243 has been marked as a duplicate of this bug. ***
Comment 31 Stuart Morgan 2024-09-27 11:05:45 UTC
I would recommend reading through all the related issue tickets because, at least to me, the conclusions reached in this ticket are wrong.

My ticket #489243 (Muting one application mutes them all) has been marked as a duplicate of this issue .While I agree they might be related, the comments in this issue seem to revolve around tabs belonging to the same application (chrome or firefox are mentioned) whereas in my experience the issue cuts across multiple applications. The incorrect state icon and mute behaviour affects all applications currently playing audio at the time e.g. Muting a Steam game also mutes Elisa, Vivaldi (Chrome), VLC et al.
 
Furthermore in my testing this is NOT a pulseaudio issue, since I can independently mute applications and different windows for the same application just fine through pavucontrol. The issues are specific to the taskbar and are a regression as others have noted.

The only thing I haven't checked yet is whether this is connected in some way to a change from X11 to Wayland in the Fedora 40 release. This might be particularly relevant since I note this original ticket dates back 7 years and references Plasma 5, whereas for me the issue only started with an upgrade from Fedora 39 (Plasma 5 + X11) to Fedora 40 (Plasma 6 + Wayland).
Comment 32 Nate Graham 2024-10-28 21:31:07 UTC
Indeed, Bug 489243 and Bug 467125 look like different issues. I'll get this cleaned up.