After upgrading to Nvidia 495.44 on my Arch Linux install, I am experiencing weird graphical glitches in Gnome Shell whenever I resume from sleep. It doesn’t appear every single resume, but it appears quite frequently enough to be bothersome. I can attach a screenshot the next time I encounter this issue.
I do have NVreg_PreserveVideoMemoryAllocations=1 turned on since I need it for Blender to work properly after resuming from sleep. If I turn it off, the corruption issue seems to not occur, at least as far as my personal testing goes, but then of course Blender totally breaks until I restart the program.
Currently, my workaround is to just hit Alt-F2 and type r into the run box to restart Gnome Shell, but having to do this every time is quite annoying.
Thinking a bit more, this seems to trigger a memory… I can’t remember exactly where I saw this, but I think I saw a similar issue and it was related to an extension or system or shell theme (e.g. try Adwaita if you aren’t already using it).
I started experiencing this same problem several weeks ago with the 495.46 nvidia driver.
Yesterday, I installed some updates which included a new kernel (5.16.7-100) and a new version of the nvidia driver (510.47), and I’m still seeing the same corrupted graphics problem after a resume.
Anyone have any info on when a fix might be available? Is this a known problem that has been reported “properly”?
As per what generix suggested, I was having this issue on Fedora 35 with Gnome and XWin (rather than Wayland - because of the nvidia driver) and creating an /etc/modprobe.d/nvidia.conf and putting this line in it seems to have resolved it for me:
options nvidia NVreg_TemporaryFilePath=/var/tmp
Does having the correct (ACPI) kernel parameters set for your specific hardware platform help?
" acpi_osi=! acpi_osi=‘Windows 2020’ acpi_enforce_resources=lax acpi_sleep=s3_mode mem_sleep_default=deep numa=off iommu.forcedac=1 iommu=memaper "