Bug 402607 - Dynamic scren layout changes don't work properly in Plasma
Summary: Dynamic scren layout changes don't work properly in Plasma
Status: RESOLVED WORKSFORME
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.14.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-27 14:55 UTC by Andrej Podzimek
Modified: 2022-12-08 05:15 UTC (History)
4 users (show)

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


Attachments
xrandr -q with just the laptop (1.55 KB, text/plain)
2019-01-02 19:21 UTC, Andrej Podzimek
Details
xrandr -q with the laptop on Thunderbolt dock with a monitor (2.09 KB, text/plain)
2019-01-02 19:23 UTC, Andrej Podzimek
Details
Expected Plasma dual-head desktop (3.49 MB, image/png)
2019-01-02 19:37 UTC, Andrej Podzimek
Details
Normal Plasma single-head desktop (2.07 MB, image/png)
2019-01-02 19:40 UTC, Andrej Podzimek
Details
Broken Plasma dual-head desktop after monitor hot-plug (2.53 MB, image/png)
2019-01-02 19:46 UTC, Andrej Podzimek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Podzimek 2018-12-27 14:55:43 UTC
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.
Comment 1 David Edmundson 2018-12-28 21:02:51 UTC
Please include screenshots and output of xrandr -q    at the various points.
Comment 2 Andrej Podzimek 2019-01-02 19:21:42 UTC
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.
Comment 3 Andrej Podzimek 2019-01-02 19:23:53 UTC
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.
Comment 4 Andrej Podzimek 2019-01-02 19:37:58 UTC
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).
Comment 5 Andrej Podzimek 2019-01-02 19:40:24 UTC
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).
Comment 6 Andrej Podzimek 2019-01-02 19:46:56 UTC
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).
Comment 7 Andrej Podzimek 2019-01-02 19:49:58 UTC
Clearing the "needsinfo" flag.
Please let me know if there's any further information I can provide.
Comment 8 David Edmundson 2019-01-02 20:46:29 UTC
Oh, you literally only have the one screen mirrored. Kscreen problem not a plasmashell problem then. Moving.
Comment 9 Nate Graham 2022-11-08 21:39:41 UTC
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!
Comment 10 Bug Janitor Service 2022-11-23 05:15:34 UTC
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!
Comment 11 Bug Janitor Service 2022-12-08 05:15:08 UTC
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!