SUMMARY For the last ~8 years, Plasma has been responding incorrectly to desktop layout changes, both manual ones as well as ones triggered by monitor hotplugging. STEPS TO REPRODUCE 1. Install an external monitor and configure it to be on the left side of your laptop's display. 2. Configure desktop settings in both situations (only the laptop display and a full dual head setup). 3a. Unplug and re-plug the external monitor. 3b. Log in without the external monitor and then plug it in. OBSERVED RESULT Desktop, widgets and panels move from the primary (right) display to the secondary (left, external) monitor. The primary display turns black. However, it is positioned correctly within the virtual screen and working, i.e., the mouse cursor moves into it and windows can be dragged and maximized there. Panels from both the laptop display and the external monitor are incorrectly covering each other and both placed on the external monitor. Killing and restarting of plasmashell restores law and order (primary display is on the laptop where it should be, secondary display has its custom configuration). EXPECTED RESULT Primary display should remain unchaged and settings previously used in a particular dual-head desktop layout should be applied. No manual plasmashell restart should ever be needed. The only situation in which the primary screen layout should move to the external display is when an external monitor is connected *and* the laptop lid is closed. It should never happen during switches between the laptop display and dual-head with laptop display configured as primary. SOFTWARE/OS VERSIONS Linux/KDE Plasma: ArchLinux, kernel 4.19.12 KDE Plasma Version: 5.14.4 KDE Frameworks Version: 5.53.0 Qt Version: 5.12.0 ADDITIONAL INFORMATION When the secondary monitor is placed on the right side of the primary monitor, the problem sometimes doesn't occur. With the external monitor on the left, it's 100% reproducible. This has been a problem since ~2011, as far as I recall, but I thought I'd report it at last. This occurs on *all* of my laptops, on a 2009 Lenovo W510 with an NVidia GPU as well as on a 2018 Dell XPS 13 with an Intel GPU.
Please include screenshots and output of xrandr -q at the various points.
Created attachment 117250 [details] xrandr -q with just the laptop It's the same when the laptop boots without Thunderbolt and after Thunderbolt gets unplugged.
Created attachment 117252 [details] xrandr -q with the laptop on Thunderbolt dock with a monitor It's the same when the laptop boots with the Thunderbolt dock and when the dock is unplugged and replugged.
Created attachment 117253 [details] Expected Plasma dual-head desktop This is what the dual-head desktop should look like. It looks this way after a normal login in dual-head mode. Unplugging and re-plugging the (Thunderbolt dock with an) external monitor requires a Plasma restart to get back to this state; otherwise a broken layout is shown (see after_replug.png).
Created attachment 117254 [details] Normal Plasma single-head desktop This occurs when the laptop either boots in single-head mode or the (Thunderbolt dock with an) external monitor is unplugged. Everything looks / works OK here, no duplicate overlapping control panels, no black screen, windows are correctly relocated. Problems start after replugging the external monitor (see after_replug.png).
Created attachment 117255 [details] Broken Plasma dual-head desktop after monitor hot-plug Unplugging and replugging the (Thunderbolt dock with an) external monitor causes this. As you can see, the laptop screen is placed correctly (on the right) and the mouse cursor (as well as windows) can be dragged there just fine, but Plasma doesn't draw anything on the right (laptop, primary) screen and leaves it black. No panels, no wallpaper. The left screen (external monitor) now has *two* Plasma panels overlapping each other, which is really quite annoying with auto-hide panels. Killing Plasma and starting plasmashell again restores law and order (see before_unplug.png for what that looks like). Sometimes Plasma crashes on its own and gets restarted automatically during monitor hotplugging. In that case the screen layout turns out to be fine, presumably, but one gets an ugly error message in desktop notifications. The ration between the broken layout in this screenshot and a Plasma crash is (rough guess) 20:1, so the crash is very rare (and I don't have any dumps from that or whatnot).
Clearing the "needsinfo" flag. Please let me know if there's any further information I can provide.
Oh, you literally only have the one screen mirrored. Kscreen problem not a plasmashell problem then. Moving.
Thank you for the bug report. Unfortunately we were not able to get to it yet. Can we ask you to please check if this is still an issue with Plasma 5.25 or 5.26? If it is, please change the status to CONFIRMED when replying. If not, or if you can't because you no longer use this setup, you can change the status to RESOLVED WORKSFORME. Thanks a lot!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!