Bug 495194 - With multiple monitors, switching audio devices quickly causes the sink change OSD to move to top left corner of the screen
Summary: With multiple monitors, switching audio devices quickly causes the sink chang...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 6.2.1
Platform: Arch Linux Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: multiscreen
: 496258 496984 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-10-22 16:34 UTC by avalonvales
Modified: 2025-01-19 21:48 UTC (History)
7 users (show)

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


Attachments
The new worse bug on KDE Neon unstable live image. (1.81 MB, video/mp4)
2025-01-11 23:33 UTC, Greeniac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description avalonvales 2024-10-22 16:34:21 UTC
SUMMARY
When switching between sinks using the plasma-pa applet a notification briefly pops up on the middle of the screen alerting the user to what is the currently used sink. However when a second monitor is connected, repeating this action quickly causes this notification to appear on the far edge of the screen instead (in my case the top left), and any subsequent attempts to switch sinks will display the notification there. I don't believe this is intended behaviour because it makes it quite hard to see.

**The bug does not trigger if:** the action is performed slowly, such that the notification has time to fade completely from the screen; a second monitor is not connected.

STEPS TO REPRODUCE
1. Connect a second display capable of playing sound
2. Switch between audio sinks (e.g. a headphone and the display itself) quickly using the plasma-pa applet
3. Observe the "current sink" notification normally displayed on the middle of the main display 

OBSERVED RESULT
Notification moves to the top right edge of my main display



EXPECTED RESULT
Notification stays in middle of my main display



SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0

ADDITIONAL INFORMATION
I have no idea if this plays a role on triggering the bug as I have no other monitors to test with, but my setup is one 1080p monitor connected via DisplayPort as my main, and a smaller 1280x1024 monitor connected via HDMI. I'm using wayland.
Comment 1 Harald Sitter 2024-10-24 15:09:03 UTC
I believe the on screen display code lives in plasma itself. Moving bug there. Also can confirm this - switching between any two outputs to quickly breaks the OSD.
Comment 2 avalonvales 2024-10-25 18:53:27 UTC
(In reply to Harald Sitter from comment #1)
> I believe the on screen display code lives in plasma itself. Moving bug
> there.

I wasn't sure, but thank you.
Comment 3 Nate Graham 2024-11-05 22:17:51 UTC
Hmm, I can't reproduce this myself when I rapidly switch between my laptop's internal speakers and an external Bluetooth amp.
Comment 4 avalonvales 2024-11-11 20:57:40 UTC
(In reply to Nate Graham from comment #3)
> Hmm, I can't reproduce this myself when I rapidly switch between my laptop's
> internal speakers and an external Bluetooth amp.

Do you have a second monitor connected?
Comment 5 Nate Graham 2024-11-12 16:35:07 UTC
Right, at the time I was testing with only one screen. Let me try with two.
Comment 6 Nate Graham 2024-11-12 16:41:06 UTC
OK, plugged in my TV over HDMI, which is capable of accepting and playing an audio signal. With three audio sinks (laptop speakers, TV speakers, bluetooth amp+speakers), switching from any sink to another sink while the OSD is still displayed does not cause any issues. Tried it with the TV screen positioned in KScreen to the left of the laptop screen as well as to the right.

This is with current git master; maybe it's now fixed there? Are you still experiencing it, Harald? If so, I'd appreciate a pointer on how to reproduce it.
Comment 7 Harald Sitter 2024-11-12 21:12:29 UTC
I have my main output at 3440x1440 1.5 scale. The secondary output to the right at 1920x1080 1 scale. I only have the primary enabled it works fine. I enable the secondary. Quickly switch devices through the applet and the OSD breaks.
Comment 8 Nate Graham 2024-11-12 23:34:14 UTC
Yep, that works for me (in my case 4k@150% primary on the left and 2880x1800@100% on the right since I don't have hardware your exact combination of screen resolutions.

Still, if you can reproduce the issue, I'll reset it to Confirmed. Odd that I can't.
Comment 9 Nate Graham 2024-11-14 18:30:06 UTC
*** Bug 496258 has been marked as a duplicate of this bug. ***
Comment 10 avalonvales 2024-11-20 16:52:46 UTC
Currently still happening on Plasma 6.2.3. To add more information: the OSD breaking is influenced by where the secondary display is arranged in the "Display Configuration" settings. If I configure my secondary display to the left of primary one, the OSD skews to the left, and vice versa. I can upload video of me triggering the bug if it helps visualize what I'm describing.

Nate, when you say it works for you, do you mean that you can reproduce the issue, or that it's behaving normally for you?
Comment 11 Nate Graham 2024-11-21 19:35:32 UTC
When I follow those steps that you folks can use to reproduce the bug, it works fine for me; I can't reproduce it.
Comment 12 arian.baishya2004 2024-12-01 20:46:01 UTC
(In reply to Nate Graham from comment #11)
> When I follow those steps that you folks can use to reproduce the bug, it
> works fine for me; I can't reproduce it.

I'm experiencing this as well, how could I troubleshoot this myself or get you a useful log file or something else to help with this. So far I've followed these pages* and tried to debug the org.kde.plasma.volume plasmoid, but couldn't figure out how to get useful information. I only got gdb's stdout (which didn't show anything) after following that page, maybe because I'm not troubleshooting a crashing application? not sure. And I tried connecting via QtCreator's "Start Debugging > Attach to QML port" menu, which worked but I couldn't figure out how to get useful information from the "Locals" window, because I was expecting more like a "full debugger" experience with me being able to look into the stack frames. I might need to compile from source for that though I'm guessing? Problem is i'm not sure where to find this specific source code or what exactly I gotta do to build a specific plasmoid and debug it. plasmawindowed/plasmoidviewer seem like the right tools for this I think? And I verified that I can reproduce it in that environment. With plasmoidviewer, the OSD is displayed inside the window containing the plasmoid, but when the bug is triggered (again even by just clicking inside the debug window), the OSD still displays all the way at the top-left of my monitor *outside* the debug window. Unsure if this is novel behavior or expected considering the current bug description. Also when the OSD bugs out, it sticks to the top left of whatever monitor was active at the moment the bug was triggered.

Other details that may or may not be relevant, since I'm not sure what would be:
OS: Arch Linux (installation is >2 years old, could updates have left outdated config files that need cleaning out? not sure if that's a thing, all I know is `~/.config/plasma*` matches a lot of files whose significance I'm unsure about)
Plasma versions: Plasma=6.2.4, KDE Frameworks=6.8.0, Qt=6.8.0
Graphics Platform: Wayland (for a long time, so this bug didn't show up during a recent switch or anything)
Sound Server: Pipewire (again for a long time)
Monitor Info: 2 monitors, primary is on the left, both 1920x1080, left monitor is landscape, right monitor is portrait. Organized like a 90-degrees clockwise rotated "T" shape, with the portrait monitor being shifted slightly higher than the center of my landscape monitor.

* I tried to write markdown here but as far as I can tell, it's not working, so I'll put the links at the bottom here to avoid creating a big chunk of URLs in the middle of my comment
https://community.kde.org/Guidelines_and_HOWTOs/Debugging
https://community.kde.org/Plasma/Debugging
Comment 13 arian.baishya2004 2024-12-01 20:52:20 UTC
Sorry about the double comment, can't figure out how to edit it, but actually forget my comment about the plasmoid, it can be reproduced even when switching between sinks in plasma sound settings (which I think is why earlier you said this was a plasmashell bug? Idk still learning the difference between plasma components and how they interact). Another detail that might matter is restarting plasmashell (`plasmashell --replace &!`) fixes the OSD until triggering the bug again.
Comment 14 Nate Graham 2024-12-13 18:12:32 UTC
*** Bug 496984 has been marked as a duplicate of this bug. ***
Comment 15 Greeniac 2025-01-11 23:04:36 UTC
This issue seems to be hardware related. When i try this on my laptop which is an Acer Aspire the issue does not happen, but when i try this on my iMac the issue happens in Wayland only and not X11. I tried this on many distros with a fresh install and a live image. The issue happens on all of them.

iMac info:

Operating System: Arch Linux 
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1
Kernel Version: 6.12.8-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-7600K CPU @ 3.80GHz
Memory: 23.4 GiB of RAM
Graphics Processor: AMD Radeon Pro 580X
Manufacturer: Apple Inc.
Product Name: iMac18,3
System Version: 1.0

Laptop info:

Operating System: openSUSE Tumbleweed 20241211
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.1
Kernel Version: 6.11.8-1-default (64-bit)
Graphics Platform: X11
Processors: 4 × AMD Ryzen 3 3200U with Radeon Vega Mobile Gfx
Memory: 9.7 GiB of RAM
Graphics Processor: AMD Radeon Vega 3 Graphics
Manufacturer: Acer
Product Name: Aspire A515-43
System Version: V1.03
Comment 16 Greeniac 2025-01-11 23:07:57 UTC
(In reply to Greeniac from comment #15)
> This issue seems to be hardware related. When i try this on my laptop which
> is an Acer Aspire the issue does not happen, but when i try this on my iMac
> the issue happens in Wayland only and not X11. I tried this on many distros
> with a fresh install and a live image. The issue happens on all of them.
> 
> iMac info:
> 
> Operating System: Arch Linux 
> KDE Plasma Version: 6.2.5
> KDE Frameworks Version: 6.10.0
> Qt Version: 6.8.1
> Kernel Version: 6.12.8-arch1-1 (64-bit)
> Graphics Platform: Wayland
> Processors: 4 × Intel® Core™ i5-7600K CPU @ 3.80GHz
> Memory: 23.4 GiB of RAM
> Graphics Processor: AMD Radeon Pro 580X
> Manufacturer: Apple Inc.
> Product Name: iMac18,3
> System Version: 1.0
> 
> Laptop info:
> 
> Operating System: openSUSE Tumbleweed 20241211
> KDE Plasma Version: 6.2.4
> KDE Frameworks Version: 6.8.0
> Qt Version: 6.8.1
> Kernel Version: 6.11.8-1-default (64-bit)
> Graphics Platform: X11
> Processors: 4 × AMD Ryzen 3 3200U with Radeon Vega Mobile Gfx
> Memory: 9.7 GiB of RAM
> Graphics Processor: AMD Radeon Vega 3 Graphics
> Manufacturer: Acer
> Product Name: Aspire A515-43
> System Version: V1.03

My laptop was running in X11 mode when copying the info, the issue does not happen in Wayland.
Comment 17 Greeniac 2025-01-11 23:17:07 UTC
(In reply to Greeniac from comment #16)
> (In reply to Greeniac from comment #15)
> > This issue seems to be hardware related. When i try this on my laptop which
> > is an Acer Aspire the issue does not happen, but when i try this on my iMac
> > the issue happens in Wayland only and not X11. I tried this on many distros
> > with a fresh install and a live image. The issue happens on all of them.
> > 
> > iMac info:
> > 
> > Operating System: Arch Linux 
> > KDE Plasma Version: 6.2.5
> > KDE Frameworks Version: 6.10.0
> > Qt Version: 6.8.1
> > Kernel Version: 6.12.8-arch1-1 (64-bit)
> > Graphics Platform: Wayland
> > Processors: 4 × Intel® Core™ i5-7600K CPU @ 3.80GHz
> > Memory: 23.4 GiB of RAM
> > Graphics Processor: AMD Radeon Pro 580X
> > Manufacturer: Apple Inc.
> > Product Name: iMac18,3
> > System Version: 1.0
> > 
> > Laptop info:
> > 
> > Operating System: openSUSE Tumbleweed 20241211
> > KDE Plasma Version: 6.2.4
> > KDE Frameworks Version: 6.8.0
> > Qt Version: 6.8.1
> > Kernel Version: 6.11.8-1-default (64-bit)
> > Graphics Platform: X11
> > Processors: 4 × AMD Ryzen 3 3200U with Radeon Vega Mobile Gfx
> > Memory: 9.7 GiB of RAM
> > Graphics Processor: AMD Radeon Vega 3 Graphics
> > Manufacturer: Acer
> > Product Name: Aspire A515-43
> > System Version: V1.03
> 
> My laptop was running in X11 mode when copying the info, the issue does not
> happen in Wayland.

And with the OSD changes on the Plasma 6.3 beta the issue seems to be even worse. The OSD gets displayed on the top left with some visual glitches. But in 6.2.5 it gets displayed in the top left without any visual glitches or artifacts. Tested with the latest KDE Neon unstable live image.
Comment 18 Greeniac 2025-01-11 23:33:30 UTC
Created attachment 177293 [details]
The new worse bug on KDE Neon unstable live image.

Info:
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 6.2.80
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.1
Kernel Version: 6.8.0-51-generic (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-7600K CPU @ 3.80GHz
Memory: 23.4 GiB of RAM
Graphics Processor: AMD Radeon Pro 580X
Manufacturer: Apple Inc.
Product Name: iMac18,3
System Version: 1.0
Comment 19 Greeniac 2025-01-12 00:12:49 UTC
Sorry for the 5 or so comments, but im trying to give as much information as i can and i think that i have figured it out. The issue only happens when there are multiple monitors with different resolution stacked horizontally. so to visualize it; lets say that each square bracket containing it's resolution is a monitor with thier respective positions.

Example 1:
[1080p][1440p] (stacked horizontally)
Result: the issue happens.

Example 2:
[1080p]
[1440p]  (stacked vertically)
Result: the issue does not happen.

Example 3:
[1080p][1080p] (same resolution)
Result: the issue does not happen.

so ignore all my comments about it being a hardware issue. i tested this on both my laptop and my iMac.
Comment 20 Greeniac 2025-01-12 00:15:28 UTC
(In reply to Greeniac from comment #19)
> Sorry for the 5 or so comments, but im trying to give as much information as
> i can and i think that i have figured it out. The issue only happens when
> there are multiple monitors with different resolution stacked horizontally.
> so to visualize it; lets say that each square bracket containing it's
> resolution is a monitor with thier respective positions.
> 
> Example 1:
> [1080p][1440p] (stacked horizontally)
> Result: the issue happens.
> 
> Example 2:
> [1080p]
> [1440p]  (stacked vertically)
> Result: the issue does not happen.
> 
> Example 3:
> [1080p][1080p] (same resolution)
> Result: the issue does not happen.
> 
> so ignore all my comments about it being a hardware issue. i tested this on
> both my laptop and my iMac.

If you don't have 2 displays with different resolutions you can set one to a lower resolution (ig; a 1080p monitor set to 720p) and it still happens.
Comment 21 Nate Graham 2025-01-17 21:06:39 UTC
Fixed by Vlad Zahorodnii with https://invent.kde.org/plasma/libplasma/-/commit/3085191026d45997592202d36a30b1ed9c651b76 in Plasma 6.3.0!
Comment 22 Greeniac 2025-01-19 12:18:32 UTC
(In reply to Nate Graham from comment #21)
> Fixed by Vlad Zahorodnii with
> https://invent.kde.org/plasma/libplasma/-/commit/
> 3085191026d45997592202d36a30b1ed9c651b76 in Plasma 6.3.0!

Nice!
Comment 23 arian.baishya2004 2025-01-19 21:44:07 UTC
(In reply to Nate Graham from comment #21)
> Fixed by Vlad Zahorodnii with
> https://invent.kde.org/plasma/libplasma/-/commit/
> 3085191026d45997592202d36a30b1ed9c651b76 in Plasma 6.3.0!

amazing, thank you to both of you <3
Comment 24 Nate Graham 2025-01-19 21:48:58 UTC
It was all Vlad; the credit belongs to him!