Suspend to ram - resume Problem: random grey blocks on screen

Gentoo:
x11-drivers/nvidia-drivers-515.65.01
sys-kernel/gentoo-sources-5.15.59

After suspend to ram - resume several grey rectangles appear on screen.
on x11-drivers/nvidia-drivers-470.129.06: no problem.

Did you enable video memory allocation preservation?
https://download.nvidia.com/XFree86/Linux-x86_64/495.44/README/powermanagement.html

memory allocation preservation were not enabled.
changed /etc/modprobe/nvidia.conf to

options nvidia
NVreg_PreserveVideoMemoryAllocations=1
NVreg_TemporaryFilePath=/home/nvidia

did a ‘systemctl enable nvidia-suspend.service nvidia-hibernate.service’

now system resumes automatically after suspend, screen is fine now.

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

nvidia-bug-report.log.gz (344.5 KB)

You’re running a wayland session so it runs into a bug on suspend

[  119.698682] Freezing of tasks failed after 20.001 seconds (1 tasks refusing to freeze, wq_busy=0):
[  119.699913] task:gnome-shell     state:D stack:    0 pid: 2271 ppid:  2180 flags:0x00000006
[  119.701530] Call Trace:
[  119.702711]  <TASK>
[  119.703909]  __schedule+0x2f3/0x9b0
[  119.705101]  schedule+0x44/0xb0
[  119.706285]  rwsem_down_read_slowpath+0x363/0x3b0
[  119.707507]  ? _nv002095kms+0x380/0x26c0 [nvidia_modeset]
[  119.708762]  nvkms_ioctl_from_kapi+0x27/0x90 [nvidia_modeset]
[  119.709994]  _nv002095kms+0x3d2/0x26c0 [nvidia_modeset]
[  119.711240]  ? nv_drm_gem_identify_object_ioctl+0x22b/0x240 [nvidia_drm]
[  119.712453]  ? drm_mode_rmfb+0x1b6/0x1f0
[  119.713685]  ? drm_mode_rmfb+0x1f0/0x1f0
[  119.714882]  ? drm_ioctl_kernel+0xaf/0x100
[  119.716089]  ? drm_ioctl+0x224/0x3e0
[  119.717720]  ? drm_mode_rmfb+0x1f0/0x1f0
[  119.718934]  ? __x64_sys_ioctl+0x8a/0xc0
[  119.720166]  ? do_syscall_64+0x3b/0xc0
[  119.721380]  ? entry_SYSCALL_64_after_hwframe+0x61/0xcb
[  119.722573]  </TASK>

https://forums.developer.nvidia.com/t/issue-with-suspend-resume-either-failing-or-having-graphical-issues-on-wayland-and-xorg-on-fedora-35-kernel-5-16-15-201-and-nvidia-510-47-03/208909

installed https://us.download.nvidia.com/XFree86/Linux-x86_64/515.43.04/NVIDIA-Linux-x86_64-515.43.04.run

ok with this version …
but x11-drivers/nvidia-drivers-515.65.01 is more recent. could it be that there is regression?

Yes, an additional regression regarding suspend/resume was also reported for 515.65., depending on hardware used.

OK thanks for your prompt support.
Will wait for the fix of this problem.
I am willing to test on my hardware if you want.