Bug 428052

Summary: Windows selects the wrong panel to minimize, on multiscreen
Product: [Plasma] kwin Reporter: Franco Pellegrini <francogpellegrini>
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kde, meven29, nate, null, ondra.niesner, orosmatthew, plasma-bugs-null, vlad.zahorodnii
Priority: NOR Keywords: multiscreen
Version First Reported In: 5.26.1   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: inverted monitors manually
notifications also affected

Description Franco Pellegrini 2020-10-21 10:03:24 UTC
SUMMARY
Sometimes, when I login (a logout usually fix this), the windows selects the WRONG panel to minimize, on the wrong screen. If I open a new instance of a program, it also open in the other monitor. 
NOTE that the screens are configured in the right position, a re-login workaround the problem when appear.

STEPS TO REPRODUCE
1. Sometimes, at login, the it happens
2. Move windows to other screens
or
1. Create new windows instances.

OBSERVED RESULT

This video display the problem
https://www.youtube.com/watch?v=ybgrIUFj7xs&ab_channel=FrancoGast%C3%B3nPellegrini

EXPECTED RESULT

Windows should minimize to the correct panel and screen
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE NEON stable
KDE Plasma Version: 5.20
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.0
Comment 1 Franco Pellegrini 2020-10-26 09:38:58 UTC
I work everyday using KDE, and 2 times per week, this error appear. Sometimes, when it happens, discord minimized icon get duplicated on both panel (both screen) but the minimization animation goes always to the other screen.
Also note that I manually invert the position from both monitors, so KDE rearrange them on login (but it seems that sometimes fail like the video).
Comment 2 Vlad Zahorodnii 2020-10-26 10:03:51 UTC
Is this X11 or Wayland?
Comment 3 Franco Pellegrini 2020-10-26 10:05:23 UTC
x11
Comment 4 Nate Graham 2020-10-26 14:36:58 UTC
Does this happen only with Discover, or with other apps? Can you test with Dolphin and a non-KDE app like Firefox or Chromium?
Comment 5 Franco Pellegrini 2020-10-26 15:49:10 UTC
it happens with ALL programs. It's like the panel get inverted between the 2 screens, and some app like discord, get duplicated on both panels.

Note that I have checked the option "show only icons from current screen", but when this bug appear, it seems to get ignored, or a swap between screens.
Comment 6 Nate Graham 2020-10-26 18:28:54 UTC
How odd. Thanks for the additional info.
Comment 7 Franco Pellegrini 2020-10-28 09:43:01 UTC
Today at boot, all notification started to appear on the second monitor, the first one shows a black background, but correct widgets, and all new windows starts to appear as programs from the second monitor. No minimized icons on the first one, ignoring my manual windows rearrangement. There's a serious problem when using 2 panels with two different task manager, showing different monitors.
Comment 8 Franco Pellegrini 2020-11-01 04:40:10 UTC
Created attachment 132929 [details]
inverted monitors manually
Comment 9 Franco Pellegrini 2020-11-01 04:41:42 UTC
I attached what I changed in my monitors, because my physical arrangement.
Today it appear again at fresh boot, and it seems that the applications are ignoring that configuration when spawning windows
Comment 10 Franco Pellegrini 2020-11-05 13:58:36 UTC
why the status is marked as "need info"? what do you need?
Comment 11 Nate Graham 2020-11-05 14:59:21 UTC
All good, thanks.
Comment 12 Franco Pellegrini 2020-11-14 23:41:24 UTC
Today, it get worse. Both monitor get inverted like the attached image "inverted monitors manually". But this time, they get totally inverted, not only panels. I just need to go to that menu again, and change the position manually to actually represent my monitor arrangement. Also my 165htz goes to 60. It seems that the menu forgot all my monitor configs.
Comment 13 Franco Pellegrini 2020-12-15 19:31:19 UTC
Today, the 2 screen get partially merged, and one background screen can sometimes appear on the second one. Also, all notifications and program appear on the wrong screen. A quick fix is to reboot session 1 or 2 times, and then it work for a week or so.

I managed to capture a video (notice that one screen is black because the background merged on the second screen):

https://youtu.be/xMm27C9m8b0


Operating System: KDE neon 5.20
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2
Kernel Version: 5.4.0-58-generic
OS Type: 64-bit
Processors: 6 × Intel® Core™ i5-8400 CPU @ 2.80GHz
Memory: 22.9 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
Comment 14 Franco Pellegrini 2021-04-14 10:25:08 UTC
Created attachment 137587 [details]
notifications also affected

this problem appear almost 100% If I don't use the pc form more than 2 or 3 days, but if I reboot or grub to windows and back, I cannot reproduce it
Comment 15 Nate Graham 2021-06-08 19:37:07 UTC
*** Bug 424163 has been marked as a duplicate of this bug. ***
Comment 16 Nate Graham 2021-06-08 19:37:11 UTC
*** Bug 438208 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2021-08-17 01:47:04 UTC
window minimization and the calculation of where to locate the animation are done by KWin; moving there.
Comment 18 Franco Pellegrini 2021-09-30 09:33:11 UTC
Problem continues... and I have to reboot 3 or 4 times everyday until the screens decide to select the correct monitor. Very frustrating.

Operating System: KDE neon 5.22
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.3
Kernel Version: 5.11.0-37-generic (64-bit)
Graphics Platform: X11
Processors: 6 × Intel® Core™ i5-8400 CPU @ 2.80GHz
Memory: 22.9 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
Comment 19 Méven Car 2021-10-18 14:24:39 UTC
(In reply to Franco Pellegrini from comment #18)
> Problem continues... and I have to reboot 3 or 4 times everyday until the
> screens decide to select the correct monitor. Very frustrating.

I can offer a better workaround: run `kquit5 plasmashell && kstart5 plasmashell` to restart plasma.

The issue seems to stems from the fact X11 has not specified order in which screens are declared and plasma expect this ordering to be constant. This concerns Wayland as well for the same reason.
Comment 20 Matthew Oros 2021-10-19 00:41:40 UTC
I am having the same issue however, windows will seem to minimize to whichever task manager I last interacted with. For example, if I were to unpin and pin a random icon in the task manager on my left (secondary) monitor then all minimize window animations will go to that screen and if I unpin and pin on my right (primary) monitor, they will always animate to minimize there. Although, sometimes this randomly gets swapped every now and then.
Comment 21 Franco Pellegrini 2022-02-21 09:27:18 UTC
Problems continues. When boot, the main monitor background becomes black (but with panels), and all windows get minimized into the second monitor

Operating System: KDE neon 5.24
KDE Plasma Version: 5.24.1
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3
Kernel Version: 5.13.0-30-generic (64-bit)
Graphics Platform: X11
Processors: 6 × Intel® Core™ i5-8400 CPU @ 2.80GHz
Memory: 22.9 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
Comment 22 Epix 2022-03-04 03:29:42 UTC
Same problem. When I connect the laptop to two external screen. There is a high change to reproduce.

Operating System: Arch Linux
KDE Plasma Version: 5.24.2
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel Version: 5.16.11-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-10210U CPU @ 1.60GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Comment 23 Méven Car 2022-03-04 10:57:55 UTC
Should be helped by https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1411
Comment 24 Nate Graham 2022-03-05 18:04:58 UTC
Yeah could you check again with Plasma 5.24.3 when it's released in three days?
Comment 25 Franco Pellegrini 2022-03-14 09:37:56 UTC
(In reply to Nate Graham from comment #24)
> Yeah could you check again with Plasma 5.24.3 when it's released in three
> days?

problem continues with 5.24.3
Comment 26 Nate Graham 2022-03-14 13:25:06 UTC
Thanks.
Comment 27 Franco Pellegrini 2022-10-26 09:20:02 UTC
the problem is 100% reproduced every day using x11

Operating System: KDE neon 5.26
KDE Plasma Version: 5.26.1
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 5.15.0-52-generic (64-bit)
Graphics Platform: X11
Processors: 6 × Intel® Core™ i5-8400 CPU @ 2.80GHz
Memory: 23.3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: H310M H