https://bugs.kde.org/show_bug.cgi?id=467771

            Bug ID: 467771
           Summary: Wayland screen corruption, dual output, dual GPU,
                    different screen resolution
    Classification: Plasma
           Product: kwin
           Version: 5.27.3
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: kwin-bugs-n...@kde.org
          Reporter: stefan.hoffmeis...@econos.de
  Target Milestone: ---

Created attachment 157562
  --> https://bugs.kde.org/attachment.cgi?id=157562&action=edit
Screen content corruption

KDE / Wayland seems to reliably get confused about which screen is attached to
which output in a multi-GPU setup.

This materializes in bad / wrong / missing invalidation of painting areas,
leaving content garbage in place, and also results in "impossible" state where
Spectacle as a screenshotter claims part of a very much existing screen as
_transparent_.

The attached screenshot shows the broken state; notice
* the red frame I painted in to show the middle screen ("screen #2") in a
triple screen setup
* the bottom-right corner of screen #2, which Spectacle sees as transparent -
but which it is not
* the corruption elsewhere on screen #2

Now particularly note the "clean" area on screen #2 - the dimensions here are
exactly the same as the dimensions of the screen to the left ("screen #3").

AFAICT, this implies that KWin incorrectly uses the dimensions of screen #3 to
compute damage / paint / invalidation areas on screen #2. This then leads to
garbage artefacts on the (larger) screen #2.

Key to reproducing this probably is, unfortunately, a GPU setup where

* iGPU = Intel
* dGPU = Nvidia

and where

* screen #1 == laptop == Intel (right-most screen)
* screen #2 == HDMI port _connected to Intel_
* screen #3 == DisplayPort port _connected to NVIDIA_

and where I used "KWIN_DRM_DEVICES=/dev/dri/card1:/dev/dri/card0" to force the
NVIDIA GPU as the primary GPU (without this forcing, the Intel GPU becomes
primary)

There is no internal mux on the notebook; the outputs are hardwired. In that
setup, the NVIDIA card draws everything, draws natively on screen #3, and
passes data for screen #2 and screen #1 to the Intel GPU for output.

*******

For the sake of disclosure, the screenshot comes from a bit of additional
peculiar set of steps - but it highlights much better the exact same effect
seen during "normal operations" with the above setup: The damage / paint area
when drawing on screen #2 is taken from screen #3.

The peculiarity is physically turning off screen #3 (the left-most screen), and
the Thunderbolt docking station apparently keeps some kind of connection alive,
which results in screen #3 still being "seen". But again, I see structurally
the same corruption if I don't do that - it's just so much more evident with
that peculiar step.

I have no idea why I never see corruption on screen #1 or screen #3.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to