Bug 423545

Summary: Repeating images and bad scaling on 2nd monitor
Product: [Plasma] kwin Reporter: Noah Davis <noahadvs>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: claudius.ellsel, nate
Priority: NOR Keywords: wayland
Version: git master   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Noah Davis 2020-06-26 12:24:49 UTC
SUMMARY
When I use my 4K monitor as a second monitor for my laptop (has a 1920x1080 screen), the 4K monitor will appear to be zoomed in 2x (right half of what should be visible is cut off) whether I'm using UI scaling or not.

The screen will also repeat the movements of previously rendered UIs that were shown on the 2nd monitor when any part of a UI updates, including non-Qt apps like Firefox. For instance, the broken images will continue to move whenever I hover over a UI element, whenever the text cursor blinks, when ever I type a letter or whenever I move a window.

STEPS TO REPRODUCE
1. Log into the "Plasma (Wayland)" or "Plasma (Full Wayland)" session
2. Move a window to the 2nd screen

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20200621
KDE Plasma Version: 5.19.80
KDE Frameworks Version: 5.72.0
Qt Version: 5.15.0
Kernel Version: 5.7.2-1-default
OS Type: 64-bit
Processors: 4 × Intel® Core™ i7-6500U CPU @ 2.50GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 520

ADDITIONAL INFORMATION
My monitor is an LG 27UK650-W

2x UI scaling just results in UIs that are 2x larger, but the screen still looks zoomed in 2x.

Video: https://youtu.be/ze-Dk7noE6Y
Comment 1 Noah Davis 2020-06-29 14:21:45 UTC
I'm using my Intel graphics. I have not tested Wayland with my Nvidia GTX 960m.

Output of `inxi -G` in case it's relevant:

Graphics:  Device-1: Intel Skylake GT2 [HD Graphics 520] driver: i915 v: kernel
           Device-2: NVIDIA GM107M [GeForce GTX 960M] driver: nvidia v: 440.82
           Device-3: Realtek USB2.0 VGA UVC WebCam type: USB driver: uvcvideo
           Display: x11 server: X.Org 1.20.8 driver: modesetting,nvidia resolution: 1: 1920x1080~60Hz 2: 3840x2160~30Hz
           OpenGL: renderer: Mesa DRI Intel HD Graphics 520 (SKL GT2) v: 4.6 Mesa 20.1.1
Comment 2 Vlad Zahorodnii 2020-07-30 15:01:56 UTC
a wild guess: does setting a wallpaper on the second monitor fix the problem?
Comment 3 Noah Davis 2020-07-30 15:24:19 UTC
(In reply to Vlad Zahorodnii from comment #2)
> a wild guess: does setting a wallpaper on the second monitor fix the problem?

Yes, that solved the flashing/repeating image problem. For some reason, the wallpaper is disabled every time I start a new session or restart plasmashell.
Comment 4 Bug Janitor Service 2020-10-02 16:04:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/318
Comment 5 Vlad Zahorodnii 2020-12-14 14:09:42 UTC
Git commit 3e1443e003bf5fc0e20dd7de49505fd0227bdce4 by Vlad Zahorodnii.
Committed on 14/12/2020 at 14:09.
Pushed by vladz into branch 'master'.

wayland: Don't force a bpp of 24 for desktop windows

plasmashell provides the compositor buffers with an alpha channel and
without indicating the opaque region. Given that, kwin forces a bpp of
24 for desktop windows to improve performance. Unfortunately, there are
legit cases where plasma may attach a buffer that is not fully opaque,
for example when switching between activities.
Related: bug 421237

M  +1    -1    waylandclient.cpp

https://invent.kde.org/plasma/kwin/commit/3e1443e003bf5fc0e20dd7de49505fd0227bdce4
Comment 6 David Edmundson 2021-01-03 22:18:32 UTC
Git commit 0d02ac8996db2d9fff8b3bf5e3e313a563a118af by David Edmundson.
Committed on 03/01/2021 at 22:18.
Pushed by davidedmundson into branch 'master'.

[shell] Set DesktopView to black when no contents are loaded

This is better than the ContainmentView default of clear as it means we
don't get garbage from the root window.
Related: bug 421237

M  +2    -0    shell/desktopview.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/0d02ac8996db2d9fff8b3bf5e3e313a563a118af