[KDE Plasma/Wayland/GBM] The contents of buffers become invalid after closing a window. [495-510]

When I try with KDE Plasma 5.23 and 5.24, I see that the Breeze theme is not working correctly. Breeze theme has no blur and random shapes appear. As if the compositor is not working. KDE developer told me it’s NVIDIA’s driver issue.
This is a frustrating problem. I hope it will be resolved soon.

More detailed page here : 448917 – NVIDIA/Wayland - Breeze Theme Has No Blur And Random Shapes Appear

3 Likes

I’m also experiencing this issue with my GTX 1080, 3 monitors. It happens nearly without fail when right clicking the desktop, happens most of the time when minimizing a window, and happens sometimes when maximizing, moving, or closing windows. It also seems to get worse with time as the panel becomes more and more corrupted. Notifications experience the same issue, frequently becoming a box of random artifacts. No such graphical corruption issues when I had an AMD GPU in my system using the AMDGPU driver.

Reproduction steps:
1.) Log into Plasma Wayland session (latest stable 5.23.5 or beta 5.24, doesn’t matter) with Nvidia driver 495 or 510.
2.) From what I’ve experienced is most likely to trigger it, right click the desktop or minimize a window a few times.
3.) Observe graphical corruption on KDE panels and notifications.

I’m not sure how useful this will be considering it should be easily reproducible internally, but I’ve linked a screenshot showing what it looks like (It’s random which pattern it has, just what I happened to capture) as well as the output of nvidia-bug-report.sh. My only option was external hosts as trying to upload directly to nvidia forums kept saying “something went wrong, try again.”
Screenshot: https://i.imgur.com/5x0MNHY.png
nvidia-bug-report.sh log: https://mega.nz/file/0R1iSARR#n1lIsoM3vzMPNIJ3c13kxKjsvPfTlUnllvK1UTZjOlE

1 Like

Same here… thought I would try wayland again after upgrading to KDE 5.24 stable. The experience started out great and I was considering switching permanently, but then this happened and I went back to X11. There was also something similar in Brave browser… specifically when twitch chat started scrolling, the whole chat panel was flashing with overlapping text.

1 Like

Here to +1. It is as the OP:s screenshot show, artifacts especially on panel seemingly at random UI updates. Arch Linux, KDE 5.24.4, KDE Frameworks 5.93.0, QT version 5.15.3. RTX 3090, driver 510.60.02. nvidia-drm.modeset=1

1 Like

It’s been months and they still haven’t fixed it. There is really nothing to say. NVIDIA just hurts.

1 Like

I was about ready to bump this post, y’all beat me to it! But yea, at least something to tell us it’s being looked into would be greatly appreciated.

I tested it again yesterday with the latest Manjaro kde-unstable daily build on live boot, still broken.

1 Like

Wow is Nvidia sleeping on this thread compared other recents on “Linux” category.

I’d take even the artificial “we’ll let Linux developers know” response at this point. Pls. Fix.

We have filed a bug internally 3621203 for tracking purpose, shall keep updated on it.

4 Likes

Hey @amrits how can we get updates on 3621203

I am currently using KDE Plasma but I have tested Wayland on Gnome 41 and 42, I had similar issues on there too. So it is a general Wayland issue with nvidia’s proprietary drivers. Can you please note that too? Thanks.

@sinanpostaci
We have been able to duplicate issue at our end and currently debugging it.
I will be updating here with the progress and you are always welcome to ask for the updates or any other information if required here itself.

2 Likes

This patch should fix the blur / panel-corruption issue platforms/drm: set read buffer in GbmSurface::makeContextCurrent (!2358) · Merge requests · Plasma / KWin · GitLab

A possible work around until that makes it into a release is to disable the “background contrast” desktop effect (system settings → workspace behavior → desktop effects).

Note that there is a separate, unrelated issue that can occasionally cause plasmashell’s tool-tip windows to not render correctly, for example if you move the mouse from one system-tray icon to another. The root cause of that is Calling wl_egl_window_resize from different thread broken · Issue #52 · NVIDIA/egl-wayland · GitHub. Unfortunately the fix for that will likely be more involved.

4 Likes

Thank you Erik, very cool! I liked the work you did on bringing XWayland support as well.

Kwin merge got milestoned to 5.25, so good timing.

Not sure how much is related to this, but to electron apps there’s like this back and forth going on - for example: I am typing a message in discord and the words are like deleting themselves and writing back in and this going back and forth as described. Same with the app itself at times.

It’s not related to this issue but, I have seen that myself as well. At first I thought it might be that xwayland glamor renders incorrectly on nvidia, but after re-reading it says this only occurs when rendering the frames takes a significant amount of time (ie, games) so I’m not so sure it’s this anymore. This would probably be the easiest to test, just set the env variable XWAYLAND_NO_GLAMOR.

The other thought I have (with my limited experience) is that it’s electron itself. Discord uses Electron 13 which is quite behind at this point but, there are AUR packages to force Discord to rely on the system’s Electron (Electron 16 atm) instead of Discord’s bundled version. Have you seen it on any non-Electron apps?

Yes, It occurs in my DAW - Reaper, which is native and afaik it doesn’t use xwayland(but I may be wrong it may be running xwayland, so I’ll def try your tip and update once I have)

EDIT: While it does fix it, every xwayland app becomes extremely choppy and doesn’t even let me run gamescope anymore

every xwayland app becomes extremely choppy

That’s expected as the bug report states, xwayland GLAMOR is 2D hardware acceleration afaik. I have no idea what relation it has to gamescope though.

Looks to be an issue with Nvidia’s drivers using explicit sync while the rest of the Linux graphics stack uses implicit sync. Nvidia’s proposal was writing up some patches to make xorg or at least the parts relevant to xwayland work with explicit sync, but I have no idea what the progress on that is. Been over a month since there’s been discussion from Nvidia devs on that thread.

At least we know it’s not electron.

Hi @amrits and @ekurzinger, it’s been over a year and xwayland glamor renders incorrectly on nvidia (#1317) · Issues · xorg / xserver · GitLab is still causing all XWayland apps to have an unusable level of flickering. Is there any update on the implicit sync issue? I really need to know if I should return my 4090 FE. If it doesn’t work with X11 (because of terrible stuttering) and it doesn’t work with Wayland (because of XWayland flickering), then it just doesn’t work.

This was NVIDIA’s proposal which appears to have gotten a lot of pushback from xorg devs since while it’s technically the superior solution, they won’t be ready to implement such a change for quite some time.

Then, this was put forward by xorg devs (I think) as a stopgap solution until explicit sync is implemented down the road, but NVIDIA devs pushed back on it saying it was a essentially a hacky solution and could incur technical debt later down the road. This one is where most debate is taking place currently.

(If I got this wrong, Nvidia devs can correct the record but this is what it looks like to me as user with no graphics background)

If you’ve got a short window to return your card and it’s contingent on this issue, I’d personally say do it. It seems they still haven’t come to an agreement on what to do so far so I’m not optimistic a fix is coming soon.

1 Like