Bug 457235 - Laptop's desktop containment gets resized to top-left corner of physical screen after hot-plugging external monitor
Summary: Laptop's desktop containment gets resized to top-left corner of physical scre...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-multiscreen (show other bugs)
Version: 5.25.4
Platform: Kubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-28 13:01 UTC by Syiad
Modified: 2022-10-28 12:15 UTC (History)
3 users (show)

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


Attachments
Laptop screen before docking (1.57 MB, image/jpeg)
2022-07-30 11:25 UTC, Syiad
Details
Laptop screen after docking (2.51 MB, image/jpeg)
2022-07-30 11:27 UTC, Syiad
Details
Both screens after docking (2.06 MB, image/jpeg)
2022-07-30 11:29 UTC, Syiad
Details
Laptop screen after docking with dolphin window open from before (2.46 MB, image/jpeg)
2022-08-01 16:43 UTC, Syiad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Syiad 2022-07-28 13:01:53 UTC
SUMMARY
***
Every time I plug in my external display, the laptop display is resized to its top left quarter and garbled up. Restarting plasma fixes the problem.

The external monitor is set to 100% magnification, the laptop screen is set to 200%.
The external monitor is connected via DisplayLink.
I'm running Wayland.
The display of the external monitor is set to be above the laptop display; i.e. the location of 0,0 moves from the laptop screen to the external screen, when it's plugged in.
***


STEPS TO REPRODUCE
1. Start laptop and log in --> laptop display is as it should be.
2. Plug in the dock (DisplayLink)
3. 

OBSERVED RESULT
External monitor comes live and its display is as it should be. Laptop display moves to its top left quarter and gets garbled up.

EXPECTED RESULT
External monitor comes live and its display is as it should be. Laptop display remains unchanged (i.e. as it was at step 1).

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu 22.04
(available in About System)
KDE Plasma Version: 5.24.6
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Running Wayland. External monitor connected via DisplayLink dock.
Comment 1 Nate Graham 2022-07-29 18:35:29 UTC
> the laptop display is resized to its top left quarter and garbled up
Can you take a screenshot of what the laptop display shows when this happens? I'd like to make sure I understand what exactly you mean, as there are unfortunately quite a lot of things that can go wrong here.
Comment 2 Syiad 2022-07-30 11:25:26 UTC
Created attachment 150994 [details]
Laptop screen before docking

This is what the laptop screen looks like before docking ...
Comment 3 Syiad 2022-07-30 11:27:38 UTC
Created attachment 150995 [details]
Laptop screen after docking

... and this is what it looks like with the docking station plugged in (with me being mirrored in the dark part ;-)
Comment 4 Syiad 2022-07-30 11:29:17 UTC
Created attachment 150996 [details]
Both screens after docking

This picture also shows the second display on top of the primary (laptop) display.
Comment 5 Syiad 2022-07-30 11:38:13 UTC
I've added some pictures showing the laptop screen before and after docking, and together with the secondary display on top after docking.
Didn't use spectacle, because I was afraid that that might interfere even more with the screens.

As you can see, I have a script with an icon on the desktop to restart plasma especially to work around this issue. After a plasma restart, the laptop screen looks as before docking again. The script also copies '~/.config/plasma-org.kde.plasma.desktop-appletsrc' from a back-up copy to ensure the widgets are restored (different bug https://bugs.kde.org/show_bug.cgi?id=427861).
Comment 6 Nate Graham 2022-08-01 15:55:04 UTC
Wow that's super crazy. Is your cursor able to exit that top-right corner where the desktop has been resized to, or is it stuck in there?
Comment 7 Syiad 2022-08-01 16:43:21 UTC
Created attachment 151051 [details]
Laptop screen after docking with dolphin window open from before
Comment 8 Syiad 2022-08-01 16:48:56 UTC
> Is your cursor able to exit that top-right corner where the desktop has been resized to, or is it stuck in there?

No, I can move the cursor around freely on the entire real estate of both screens.
Just plugged in the docking station with dolphin already open on the right half of the laptop screen; the dolphin window held its position after docking (see screenshot attached). It seems that only the plasma desktop gets messed up.

Funny thing: After hot-unplugging the docking station with the laptop screen still garbled up, I was left with only the default wallpaper--firstly monochrome only, then colour fading in--and nothing else. I.e. no dolphin window, no control bar, no mouse pointer, nothing. Luckily I could still access a yakuake window. However, restarting plasma didn't work, so all I could do was to "sudo reboot".
Comment 9 Nate Graham 2022-08-01 19:55:29 UTC
Yep, seems like this is Plasma's fault, not KScreen's fault. Or at least, it's not *entirely* KScreen's fault.

Any chance you can try Plasma 5.25 and see if it's fixed there? We did a lot of multiscreen work in that release.
Comment 10 Syiad 2022-08-02 10:53:05 UTC
Plasma 5.25 will unfortunately not be back-ported to Kubuntu 22.04 LTS. Therefore, I'll have to wait for Kubuntu 22.10 to get KDE 5.25. This is my working laptop, so I don't want to mess with the 5.25 beta ppa for 22.04.
Comment 11 Syiad 2022-08-26 12:49:31 UTC
(In reply to Nate Graham from comment #9)
> Any chance you can try Plasma 5.25 and see if it's fixed there? We did a lot
> of multiscreen work in that release.

Now that 5.25.4 has been backported to Kubuntu 22.04, I could give it a try: The problems still persists.
Comment 12 Syiad 2022-10-28 12:15:37 UTC
With Kubuntu 22.10 comes ...
Plasma 5.25.5
Frameworks 5.98.0
Qt 5.15.6

Something of those has fixed the issue, which Plasma 5.25.4 alone did not fix. Anyway, the screens now behave as expected when hotplugging the the dock.