Bug 469227 - When switching screens on in specific order, tooltips and dashboard may appear at wrong positions/screen
Summary: When switching screens on in specific order, tooltips and dashboard may appea...
Status: RESOLVED DUPLICATE of bug 411308
Alias: None
Product: kdeplasma-addons
Classification: Plasma
Component: Application Dashboard (show other bugs)
Version: 5.27.4
Platform: Exherbo Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2023-05-01 10:10 UTC by Bernd Steinhauser
Modified: 2023-08-30 20:29 UTC (History)
4 users (show)

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


Attachments
kscreen-console bug; when positioning is correct (13.06 KB, text/plain)
2023-05-01 10:12 UTC, Bernd Steinhauser
Details
kscreen-console bug; when positioning is wrong (13.07 KB, text/plain)
2023-05-01 10:12 UTC, Bernd Steinhauser
Details
kscreen-doctor -o; when positioning is correct (1.75 KB, application/octet-stream)
2023-05-01 10:13 UTC, Bernd Steinhauser
Details
kscreen-doctor -o; when positioning is wrong (1.75 KB, application/octet-stream)
2023-05-01 10:13 UTC, Bernd Steinhauser
Details
plasma applets config file (12.21 KB, text/plain)
2023-05-01 10:16 UTC, Bernd Steinhauser
Details
xrandr when everything is positioned correctly (1.72 KB, text/plain)
2023-05-02 17:53 UTC, Bernd Steinhauser
Details
xrandr when things go wrong (1.72 KB, text/plain)
2023-05-02 17:54 UTC, Bernd Steinhauser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Steinhauser 2023-05-01 10:10:34 UTC
SUMMARY
Got two screens, one connected via DP (priority 2, left) and one connected via HDMI (priority 1, i.e. "primary", right).
My panel is relatively close to the standard panel layout, except that I use dashboard as a start menu instead of kickoff.
When I start up, everything is working as expected all the time, i.e. nothing goes wrong until I turn off the screens.
If I turn off the screens and then turn them on again, it depends on the order of switching them on whether the positioning of several things is correct or not.

Variant 2:
1. DP (priority 2) on
2. HDMI (prioriy 1) on
Result: correct positioning

Variant 2:
1. HDMI (prioriy 1) on
2. DP (priority 2) on
Result: incorrect positioning

I found two ways of fixing this. Either the screens are switched off and then switched on again according to variant 1. Or the primary screen switch in the kcm is switched back and forth between the two screens.

correct positioning:
Dashboard shows up on the (primary) screen where the panel is.
Tooltips (e.g. task manager, or the notification popup, when you click on the bell) show up at their correct positon.
All context menus show up at the correct positions.

incorrect positioning:
Dashboard shows up on the priority 2 screen.
Tooltips show up on the primary screen, but are aligned to the left screen edge (the one between the two screens).
Some context menus show the same behavior as the tooltips: right click on clock, systray items and empty panel area
right click on task manager items shows the context menu at the correct position, as does it for any other context menu (e.g. in some app like konsole or firefox).
I did not observe any other apps/widgets to misbehave.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.27.4
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9

ADDITIONAL INFORMATION
It doesn't seem to happen every time I use variant 2, but in the clear majority of my tries.
It could depend on how quickly I proceed with the second screen, but I'm not sure yet.
If it would be helpful, I might try to investigate this specifically.

Since variant 2 is the way I normally switch on my screens after turning them off, I'm about 90% sure that this bug didn't happen in the first versions of 5.27. Unfortunately, I don't have a quick way to test this specifically without major effort. If it's clear in which git repo I have to look, I could try to bisect the issue.
There are two bug reports that could be related.
bug 468613 reports a wrong positioning of the task manager tooltips, but in this case they do end up on a wrong screen, so I'm not sure if it's the same thing.
bug 383067 I reported years ago, where the dashboard also appeared on the wrong screen. But in this case it was only the dashboard and I actually reported it as working before 5.27, so it might just be the same symptom.

I tested on both X11 and wayland and at least the dashboard thing happens on both. For the tooltips I'm not 100% sure, at least in the few tries I did, they didn't appear wrongly positioned.
Comment 1 Bernd Steinhauser 2023-05-01 10:12:32 UTC
Created attachment 158596 [details]
kscreen-console bug; when positioning is correct
Comment 2 Bernd Steinhauser 2023-05-01 10:12:59 UTC
Created attachment 158597 [details]
kscreen-console bug; when positioning is wrong
Comment 3 Bernd Steinhauser 2023-05-01 10:13:22 UTC
Created attachment 158598 [details]
kscreen-doctor -o; when positioning is correct
Comment 4 Bernd Steinhauser 2023-05-01 10:13:50 UTC
Created attachment 158599 [details]
kscreen-doctor -o; when positioning is wrong
Comment 5 Bernd Steinhauser 2023-05-01 10:16:16 UTC
Created attachment 158600 [details]
plasma applets config file
Comment 6 Nate Graham 2023-05-02 17:44:35 UTC
It looks like the only differences in the outputs of those commands is that the screens are changing orders in the files. Their actual data is all correct and identical.

Does the `xrandr` output also differ between the correct and incorrect states? I wonder if it could be Bug 466149.
Comment 7 Bernd Steinhauser 2023-05-02 17:50:17 UTC
(In reply to Nate Graham from comment #6)
> It looks like the only differences in the outputs of those commands is that
> the screens are changing orders in the files. Their actual data is all
> correct and identical.
> 
> Does the `xrandr` output also differ between the correct and incorrect
> states? I wonder if it could be Bug 466149.

From what I can tell, xrandr shows the same behavior, i.e. the assignment of the "primary" tag stays with the HDMI screen, but the order of the outputs is changed, meaning that HDMI is now listed first instead of DP.
I'll attach the output in a second.
Comment 8 Bernd Steinhauser 2023-05-02 17:53:33 UTC
Created attachment 158629 [details]
xrandr when everything is positioned correctly
Comment 9 Bernd Steinhauser 2023-05-02 17:54:01 UTC
Created attachment 158630 [details]
xrandr when things go wrong
Comment 10 Bernd Steinhauser 2023-05-02 18:01:45 UTC
Is xrandr actually working correctly on wayland or is there a wayland-specific command?
Could it be a config problem? I did wipe my plasma config files when 5.27 was released, so I wouldn't expect it, but who knows?

Could I actually do a bisect between 5.27.0 and 5.27.5 on plasma-workspace (or -desktop?) only, without changing the rest of plasma (and frameworks)?
Or is there a chance that the change was in some framework or a different part of plasma?
Would 5.27.0 work with frameworks 5.105?
Comment 11 Andrej Halveland 2023-06-14 19:25:55 UTC
I have a very similar behavior on my laptop.

https://i.imgur.com/hzyWISu.mp4


SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.9
Kernel Version: 6.3.4-arch1-1
Graphics Platform: Wayland
Processors: AMD Ryzen 9 4900HS
Memory:  24GB of RAM
Graphics Processor: Integrated: Vega 8
Manufacturer: ASUS (Zephyrus G15 GA502IV)
Comment 12 Bernd Steinhauser 2023-06-14 19:56:36 UTC
I'd say it's the same.

Could you also try the dashboard, just for completeness? Just switch the menu to the dashboard alternative temporarily.
Comment 13 Andrej Halveland 2023-06-14 20:10:43 UTC
Yeah, sure.

The Application Dashboard seems to open on the wrong (external) monitor.
Comment 14 Bernd Steinhauser 2023-06-14 20:13:55 UTC
(In reply to Andrej Halveland from comment #13)
> Yeah, sure.
> 
> The Application Dashboard seems to open on the wrong (external) monitor.

Ok, thanks. Then it really seems you're observing the exact same thing.
Comment 15 Nate Graham 2023-08-30 20:29:49 UTC
*** This bug has been marked as a duplicate of bug 411308 ***