Bug 436682

Summary: Desktop windows shrink or disappear if an output is unplugged
Product: [Plasma] plasmashell Reporter: Vlad Zahorodnii <vlad.zahorodnii>
Component: ContainmentAssignee: Marco Martin <notmart>
Status: RESOLVED UPSTREAM    
Severity: normal CC: nate, plasma-bugs-null
Priority: NOR Keywords: wayland-only
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
URL: https://codereview.qt-project.org/c/qt/qtwayland/+/334532
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: The desktop window on the left monitor was shrinked, and the desktop window on the right monitor got invisible after unplugging one of my monitors
WAYLAND_DEBUG

Description Vlad Zahorodnii 2021-05-06 11:02:23 UTC
Created attachment 138186 [details]
The desktop window on the left monitor was shrinked, and the desktop window on the right monitor got invisible after unplugging one of my monitors

I have 3 monitors arranged as follows

  DP-3(scale: 1) DP-1(scale: 2) DP-2(scale: 3)

The monitors are listed from left to right, i.e. DP-3 is the leftmost monitor and DP-2 is the rightmost monitor.

When the DP-2 monitor is unplugged, kscreen will re-arrange monitors as follows

  DP-1(scale: 2) DP-3(scale: 1)

Unfortunately, plasmashell doesn't handle that well. Typically desktop windows will get shrinked or become invisible. The attached screenshot shows my setup after DP-2 monitor has been unplugged.

This bug cannot be reproduced if all outputs have the same scale factor or when using software qtquick renderer.

The compositor doesn't send any configure events that could potentially resize desktop windows, all my outputs have 1920x1080 resolution.
Comment 1 Vlad Zahorodnii 2021-05-06 11:31:43 UTC
Created attachment 138187 [details]
WAYLAND_DEBUG

Here's the wayland debug log. I started plasmashell and turned off the DP-2 monitor.
Comment 2 Vlad Zahorodnii 2021-05-06 12:04:46 UTC
I cannot reproduce this bug when running plasmashell with QT_WAYLAND_DISABLE_RESIZECHECK=1, which may indicate that it's a QtWayland bug.
Comment 3 Vlad Zahorodnii 2021-05-11 19:43:34 UTC
This is a bug in buffer size tracking in wayland-egl client buffer integration.