Glitches after sleep KDE, Wayland, NVidia

Hey, I’m kinda new to Linux in general and I have a small problem - every time computer goes to sleep and I wake it up there are graphical glitches everywhere, like windows with motion blur, no icons, panels, generally it’s unusable and u either have to hard reset pc or reset normally if it works.

I have Lenovo legion laptop with intel CPU and RTX3060.

Using KDE Wayland.

I have installed Nvidia drivers thru nvidia-inst command.

I have added kernel param with preserving memory allocations, enabled Nvidia services.

But all of this didn’t helped, I would check logs but I have no idea how and when.

Any help would be much appreciated, thank you :slight_smile:

EDIT:

My current kernel params file looks like this:

nvidia-drm.modeset=1 nvme_load=YES nowatchdog rw rootflags=subvol=/@ root=UUID=d61b9505-aaf0-4cfb-bf3f-5399286ba637 NVreg_PreserveVideoMemoryAllocations=1

Ive made changes in file:

/etc/kernel/cmdline

When typing command to check currently enabled services i have somthing like this - so i think i started nvidia services correctly?

EDIT2:
Ive managed to take some screenshots of LOGS, and how it looks like after sleep - bottom panale should be default color not pink, and some icons are missing.



1 Like

Follow this:

https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks

Point 10 - preserve video memory after suspend.

Yup that’s what I did already but it didn’t help. Not sure maybe I made it wrong.

I’m having the same issue. I also got a notification saying desktop effects were restarted due to a graphics reset.

You can add a kernel module parameter by creating a config in etc/modprobe.d/ with an editor, for example Nano:

sudo nano /etc/modprobe.d/nvidia-preserve-memory.conf

Paste in the options for the kernel module parameter:

options nvidia NVreg_PreserveVideoMemoryAllocations=1

Save and exit out of the file. Then rebuild the initramfs.

sudo dracut-rebuild

Finally, enable the services mentioned in the article.

sudo systemctl enable --now nvidia-suspend.service nvidia-hibernate.service nvidia-resume.service
1 Like

It seems i have not updated kernel after adding params, so after running:

`sudo reinstall-kernels`

It works good now.
Ty everyone!

1 Like

What’s the difference between doing that and adding nvidia.NVreg_PreserveVideoMemoryAllocations=1 to GRUB_CMDLINE_LINUX_DEFAULT in grub?