You are not logged in.

#1 2023-08-19 17:41:11

Rob_H
Member
Registered: 2012-06-19
Posts: 72

[Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

Just replaced my AMD desktop with a new rig that has an NVIDIA GeForce RTX 4080 GPU. On my old AMD setup, Wayland worked perfectly on KDE Plasma. But now on NVIDIA, I'm seeing a lot of artifacts and odd behavior such as:

1. Plasma panels stop updating themsevles.
2. Trailing artifacts when I move the mouse pointer over semi-transparent windows.
3. Waking from sleep yields a totally corrupted desktop.

It's basically unusable. If I switch to Xorg, everything is fine. I'm using the NVIDIA proprietary drivers.

Any idea what might be happening? I tried following the Wayland wiki page to make sure I'm using the GBM buffer API instead of EGLStreams, but the recommended command (journalctl -b 0 --grep "renderer for") doesn't return anything. I also tried forcing it to use GBM by modifying /etc/environment, but it didn't make a difference.

Thanks!

Last edited by Rob_H (2024-03-12 12:36:46)

Offline

#2 2023-08-19 19:38:05

Rob_H
Member
Registered: 2012-06-19
Posts: 72

Re: [Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

Based on a post that sounds a lot like what I'm seeing, I ran this command and it seems like it's using EGL:

$ qdbus org.kde.KWin /KWin org.kde.KWin.supportInformation | grep -i egl
OpenGL platform interface: EGL

Is there a way to force it to use GBM (besides setting the env variables, which didn't work)?

Offline

#3 2023-08-19 19:53:32

Rob_H
Member
Registered: 2012-06-19
Posts: 72

Re: [Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

One more data point. Not sure if it's related, but I see the following in the log:

$ sudo journalctl -b | grep -i "gbm"
Aug 19 15:42:24 caprica plasmashell[2209]: MESA-LOADER: failed to open nvidia-drm: /usr/lib/gbm/nvidia-drm_gbm.so: cannot open shared object file: Permission denied (search paths /usr/lib/gbm, suffix _gbm)

The file does exist:

$ cd /usr/lib/gbm
$ ll
total 4.0K
lrwxrwxrwx 1 root root 32 Aug  9 08:46 nvidia-drm_gbm.so -> ../libnvidia-allocator.so.535.98*
$ ll ../libnvidia-allocator.so.535.98 
-rwxr-xr-x 1 root root 157K Aug  9 08:46 ../libnvidia-allocator.so.535.98*

Offline

#4 2023-08-19 21:04:05

seth
Member
Registered: 2012-09-03
Posts: 58,220

Re: [Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

You do have  https://wiki.archlinux.org/title/NVIDIA … de_setting ?
Same issue w/ weston/sway/gnome ?

Online

#5 2023-08-19 21:09:25

Rob_H
Member
Registered: 2012-06-19
Posts: 72

Re: [Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

Yes. Even Xorg doesn't work without that.

Offline

#6 2023-08-19 21:24:21

seth
Member
Registered: 2012-09-03
Posts: 58,220

Re: [Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

seth wrote:

Same issue w/ weston/sway/gnome ?

Online

#7 2023-08-20 14:39:27

Rob_H
Member
Registered: 2012-06-19
Posts: 72

Re: [Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

I'm not sure. I don't plan to install another desktop environment.

Offline

#8 2023-08-20 14:49:00

seth
Member
Registered: 2012-09-03
Posts: 58,220

Re: [Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

weston and sway are not DEs, weston is the reference wayland compositor and it would be a seriously good idea to figure whether this is an issue w/ plasma specifically.

Online

#9 2023-10-07 22:02:59

noire
Member
Registered: 2023-10-02
Posts: 1

Re: [Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

I assume you installed the nvidia drivers following the instructions on arch wiki, emphasis on section 1.3

Do you have these enabled?

nvidia-suspend.service
nvidia-hibernate.service
nvidia-resume.service

Try that. And try adding

nvidia.NVreg_PreserveVideoMemoryAllocations=1

as a kernel parameter.

I'm not on plasma but I am using hyprland and I had an issue where it would just crash right after waking from sleep. Adding these fixed it

EDIT:
if that doesn't fix anything, try setting these environment variables and reboot:

LIBVA_DRIVER_NAME=nvidia
XDG_SESSION_TYPE=wayland
GBM_BACKEND=nvidia-drm
__GLX_VENDOR_LIBRARY_NAME=nvidia
WLR_NO_HARDWARE_CURSORS=1

Last edited by noire (2023-10-07 22:29:56)

Offline

#10 2023-10-08 19:37:26

Xeauron
Member
From: Manchester, UK
Registered: 2023-07-10
Posts: 24

Re: [Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

I have a RTX 3090 GPU and I'm on KDE Plasma.

I get all the same issues you posted, plus I did have a few others which have been resolved.
Every now and then I'll try Wayland and it gets better and better.

Not saying you should give up or anything, but me personally I'm waiting till Plasma 6.0 when Wayland becomes the default before I switch proper.

I use it now and then for games which seem to like Wayland better - recently, Resident Evil 4 which crashed a lot under X11 but worked fine under Wayland (well, xWayland).

As far as I know and have experienced, KDE under Wayland with Nvidia is still a bit of a car crash. It's just not quite ready in my opinion, but I'm good to go when it finally is at the beginning of next year.

Last edited by Xeauron (2023-10-08 19:40:23)

Offline

#11 2023-10-10 01:41:32

Rob_H
Member
Registered: 2012-06-19
Posts: 72

Re: [Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

Thanks @noire for the suggestions! Unfortunately, they didn't make a difference. I confirmed the new env variables were applied in my session, but the behavior stayed the same.

Offline

#12 2023-10-10 13:32:58

spiffeeroo
Member
Registered: 2021-04-23
Posts: 23

Re: [Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

Rob_H wrote:

1. Plasma panels stop updating themsevles.

Plasma 6 fixes this bug on non-Intel GPUs. However, no fix is available on current release Plasma 5 software.

Rob_H wrote:

2. Trailing artifacts when I move the mouse pointer over semi-transparent windows.

Nvidia has cursor artifacts with blur enabled on Plasma Wayland. Apparently fixed in Plasma 6 with a blur rewrite.

Rob_H wrote:

3. Waking from sleep yields a totally corrupted desktop.

You can preserve video memory config and enable the Nvidia systemd services as stated here:
https://wiki.archlinux.org/title/NVIDIA … er_suspend .

Last edited by spiffeeroo (2023-10-10 13:37:42)

Offline

#13 2023-10-17 21:38:54

Rob_H
Member
Registered: 2012-06-19
Posts: 72

Re: [Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

Thanks @spiffeeroo! Very useful info!

Offline

#14 2024-03-12 12:35:58

Rob_H
Member
Registered: 2012-06-19
Posts: 72

Re: [Solved] NVIDIA showing visual artifacts when using Plasma and Wayland

Fast forward. Plasma 6 fixed problems #1 and #2. And the Preserve video nemory after suspend instructions took care of #3. Thanks!

Now if I could just stop the Steam client from flickering... but it seems that's not an Arch-specific problem.

Offline

Board footer

Powered by FluxBB