SUMMARY STEPS TO REPRODUCE 1. Install plasma-desktop 5.26.90 2. Open an application that plays audio and other applications to fill up the task bar with several applications OBSERVED RESULT The mute icon appears on unrelated applications and/or pinned applications. See screenshots in attachment. EXPECTED RESULT The mute icon should appear only on applications that plays audio (as it was in 5.26.5) SOFTWARE/OS VERSIONS Operating System: Debian GNU/Linux KDE Plasma Version: 5.26.90 KDE Frameworks Version: 5.102.0 Qt Version: 5.15.8 Kernel Version: 6.1.0-3-amd64 (64-bit) Graphics Platform: X11 Processors: 12 × AMD Ryzen 5 3600 6-Core Processor Memory: 15.6 Gio of RAM Graphics Processor: AMD Radeon RX 580 Series Manufacturer: Micro-Star International Co., Ltd Product Name: MS-7B86 System Version: 4.0 ADDITIONAL INFORMATION I've tried to downgrade only plasma-desktop to 5.26.5 and the issue doesn't appear anymore. So it was introduced in plasma-desktop, between 5.26.5 and 5.26.90.
Created attachment 156011 [details] plasma-desktop-5.26.5_no_duplicate_icons.png
Created attachment 156012 [details] plasma-desktop-5.26.90_duplicate_icons.png I've added 2 screenshots. The difference between the two are: - Opened some applications including Spotify, foobar2000 and gitk - Spotify is the only application playing music - Upgraded plasma-desktop from 5.26.5 to 5.26.90 - Run `plasmashell --replace` in a terminal The first icon is a non-running, pinned, application. When clicking on one of the mute buttons, Spotify is muted and all mute buttons become "unmute" buttons (their icon changed). I'm using pulseaudio and jackd only (no pipewire).
I found that the issue is related to this line of code: https://invent.kde.org/plasma/plasma-desktop/-/blob/1988f0756ec9b61d6eff6eae14c1023502d7f701/applets/taskmanager/package/contents/ui/Task.qml#L233 var streams = pa.streamsForAppId(task.appId); Some applications like the first pinned application icon, foobar2000 and gitk in the screenshots don't have a task.appId (using console.log() I found that the string was empty). I guess that when appId is an empty string, pa.streamsForAppId will return all streams, that would explain why it shows a mute icon on them. Adding a if(task.appId) around that line of code fixes the issue: --- /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml.bak 2023-01-19 12:40:03.000000000 +0100 +++ /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml 2023-02-06 23:41:02.020817778 +0100 @@ -230,7 +230,10 @@ // Check appid first for app using portal // https://docs.pipewire.org/page_portal.html - var streams = pa.streamsForAppId(task.appId); + var streams = []; + if(task.appId) { + pa.streamsForAppId(task.appId); + } if (!streams.length) { streams = pa.streamsForPid(task.pid); if (streams.length) {
appId shouldn't be empty. If it's empty there is a bug in libtaskmanager.
I've tried the linked commit (c27fb3c0d25a0ad7af44acd1d9e957cdaae8802e) on plasma-workspace and confirm that this fixes the issue. Thanks :)