Resuming from sleep/hibernate either results in a completely garbled display, or none at all

Hey! I just moved away from Manjaro after it died doing the latest update (didn’t shutdown anymore), and I am already starting to have issues here on EndeavorOS, when my computer is woken up from sleep, I sometimes come back to a completely garbled display, Wayland has this issue too, I did a few tests where I hibernated my PC, as well as put it to sleep, then woke it back up, both resulted in no output to my monitor at all.

What can I do to troubleshoot and fix this? Here’s a rundown of my system specs for more info.

AMD Ryzen 5 5500 (Stock)
NVIDIA GeForce GTX 970 (on X11 currently, 560 Driver)
Kernel 6.11.2 and 6.6.52-1
Sceptre F22 1920x1080 75Hz Monitor

I also have swap with hibernation support.

Any help would be greatly appreciated here!

Could possibly be related to this

By default the NVIDIA Linux drivers save and restore only essential video memory allocations on system suspend and resume. Quoting NVIDIA:

The resulting loss of video memory contents is partially compensated for by the user-space NVIDIA drivers, and by some applications, but can lead to failures such as rendering corruption and application crashes upon exit from power management cycles.

So do I add something to the .conf file for NVIDIA? I partially remember that in order to prevent it from doing that, was to add something to an NVIDIA .conf file?

Yes, as per the link you could try

The “still experimental” interface enables saving all video memory (given enough space on disk or RAM).

To save and restore all video memory contents, use the NVreg_PreserveVideoMemoryAllocations=1 kernel module parameter for the nvidia kernel module and enable nvidia-suspend.service, nvidia-hibernate.service, and nvidia-resume.service.

Do I add it to the “GRUB_CMDLINE_LINUX_DEFAULT=” line? I am sorry if I’m not all that advanced here.

That’s right, and then regenerate the Grub config. Additionally, you can add kernel module parameters to /etc/modprobe.d.

Someone put together a GitHub gist with step-by-step instructions if that is helpful: