Bug 443369 - Nvidia - Major graphical artifacts under some circumstances
Summary: Nvidia - Major graphical artifacts under some circumstances
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: master
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2021-10-05 20:29 UTC by Artem Grinev
Modified: 2022-01-19 20:03 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
agrinev98: Wayland+
agrinev98: NVIDIA+


Attachments
Firefox renders on bottom-left part of screen (2.10 MB, image/png)
2021-10-05 20:29 UTC, Artem Grinev
Details
System Settings renders only bottom-left rect (3.16 MB, image/png)
2021-10-05 20:36 UTC, Artem Grinev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Artem Grinev 2021-10-05 20:29:14 UTC
Created attachment 142181 [details]
Firefox renders on bottom-left part of screen

SUMMARY
After installing latest KDE packages from git (via kde-unstable Manjaro repo) KWin randomly started to show some major artifcats: window is being double rendered in bottom-left corner of screen (flickering; shows on original windows update) or redraws only part of itself (again in bottom-left corner if it's any useful)

Also sometimes cursor image is being stuck to a window frame after resize while cursor itself is being invisible but fully functional and stuck image is being updated.

STEPS TO REPRODUCE
As happens randomly some way to reproduce:
1. Open application (I've managed to reproduce in Firefox and System Settings)
2. Go to fullscreen by dragging window to the top of the screen
3. Go back from fullscreen by window dragging

OBSERVED RESULT
Windows sometimes start rendering in wrong place of screen or start to redraw only bottom-left part of itself.

EXPECTED RESULT
No artifacts are being shown.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro Linux / Plasma git
KDE Plasma Version: 5.23.80 (latest git)
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Works fine on Intel@Wayland.
Comment 1 Artem Grinev 2021-10-05 20:36:32 UTC
Created attachment 142182 [details]
System Settings renders only bottom-left rect
Comment 2 David Edmundson 2021-10-06 20:13:23 UTC
Is it always after resume-from-suspend?

Does restarting kwin fix it?
Comment 3 Artem Grinev 2021-10-06 22:01:39 UTC
(In reply to David Edmundson from comment #2)
> Is it always after resume-from-suspend?
> 
> Does restarting kwin fix it?

No, it has nothing to do with resuming, happens on cold start.

Restarting kwin fixes it for some time but after some window management (minimizing/maximizing/switching; can't find any exact algorithm) it happens again very soon.

Also not sure if it's the same bug (I suspect so as all of this starting happening at one time) but along with it following glitches are shown:

- desktop starts flickering when any window is being resized 
or 
- content of window is being rendered on desktop 
(but it seems these two are not showing at the same time)

- titlebar sometimes shows upside-down content of it's window instead of actual decoration;

- windows can become completely black suddenly even when in focus and in work

and maybe I forgot something.

by the way I'm using GTX 1660Ti and 470.74 driver if it will be any helpful.
Comment 4 manciuleas 2021-10-18 04:53:43 UTC
Came here to say that I had similar issues after upgrading to KDE Plasma 5.23 with NVIDIA 470.74. Downgrading to 470.63.01 solved the issues.
Hopefully it'll help others as well.

Slackware 15 beta
Qt: 5.15.3
Plasma: 5.23
KDE Framework: 5.87
Comment 5 David Edmundson 2021-10-18 16:58:01 UTC
I just hit this on my desktop on X11. I was able to record some traces in apitrace.

They look very wrong. I'm getting 4000 calls per frame. I've attached both broken state and forced full screen window. The actions performed in both traces are: 
Have a single window plus desktop + panel, maximise the window, restore.
Comment 6 David Edmundson 2021-10-18 17:00:00 UTC
Edit, I can't attach, they're 1Gb each.
just ping me
Comment 7 Nate Graham 2021-10-18 17:00:24 UTC
Related?

Bug 443951
Comment 8 David Edmundson 2021-10-18 17:05:31 UTC
Edit2: I found what caused me triggering this. 

I broke the driver by installing an incompatible mesa, which ended up forcing LLVMpipe. It was LLVMPipe that had the rendering artifacts and the surprising trace.
Comment 9 Artem Grinev 2021-10-18 17:32:04 UTC
(In reply to Nate Graham from comment #7)
> Related?
> 
> Bug 443951

Nope. This one is exclusive to Wayland and EGLStreams (i.e. not reproducible with newly introduced GBM support, but GBM has some different artifacts).
Comment 10 Vlad Zahorodnii 2022-01-19 20:03:55 UTC
EGLStreams support was dropped. Changing the status of the bug report.