(Pop!_OS) Machine doesn't come back to log in screen after suspension with NVIDIA Graphics

It takes a long time that I am with it, when I click to suspend the machine everything goes ok and the screen gets blank, but after 15 minutes when I press enter or hit any button to go to the login screen the whole screen stays blank and I need to force the machine to power off by pressing the shutdown button.

Here is the next-to-last log obtained:

Jan 29 00:00:15 pop-os systemd[1]: rsyslog.service: Sent signal SIGHUP to main process 957 (rsyslogd) on client request.
Jan 29 00:00:15 pop-os systemd[1]: logrotate.service: Deactivated successfully.
Jan 29 00:00:15 pop-os systemd[1]: Finished Rotate log files.
Jan 29 00:04:19 pop-os systemd[2690]: Started Application launched by gsd-media-keys.
Jan 29 00:04:19 pop-os systemd[2690]: Created slice Slice /app/org.gnome.Terminal.
Jan 29 00:04:19 pop-os systemd[2690]: Starting GNOME Terminal Server...
Jan 29 00:04:19 pop-os systemd[2690]: Started GNOME Terminal Server.
Jan 29 00:04:19 pop-os systemd[2690]: Started VTE child process 8381 launched by gnome-terminal-server process 8355.
Jan 29 00:04:22 pop-os systemd[1]: Starting Hostname Service...
Jan 29 00:04:22 pop-os systemd[1]: Started Hostname Service.

This issue I am getting only using NVIDIA Graphics mode, on Integrated, Hybrid and Compute Graphics it’s working normally, anyway to solve it?

Here is the following nvidia-bug-report.log.gz file (I had to upload on google drive because here to copy the whole text or put the whole file I wasn’t allowed because its size):

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

I ran it now, I uploaded it on google drive check it out!

Most info is missing in the log.
Please check this:
https://download.nvidia.com/XFree86/Linux-x86_64/495.44/README/powermanagement.html

I ran this script Packages/nvidia-bug-report.sh at master · Pardus-Linux/Packages · GitHub I don’t know if it also is correct.

and for run I did:

$ sudo -i
# ./nvidia-bug-report.sh
Running nvidia-bug-report.sh... complete.

The file nvidia-bug-report.log has been created; please send this report,
along with a description of your bug, to linux-bugs@nvidia.com.

That’s some really old script, not containing the info for newer systems/drivers. The current script gets installed alongside the driver, no need to download it from unknown source.

Oh so I figure that must be it that caused the info which is missing in the log when that script from an unknown source was run, I found the original one on my own computer it is located in the /usr/bin/ folder!

Here you go the result from the correct one:

Please set kernel parameter
nvidia.NVreg_PreserveVideoMemoryAllocations=1
if that doesn’t help, set it to 0 and disable systemd units nvidia-suspend, nvidia-resume, nvidia-hibernate

I have tried to find this variable nvidia.NVreg_PreserveVideoMemoryAllocations on the nvidia-bug-report.sh script but I can’t able to find it.

About disable systemd units nvidia-suspend, nvidia-resume, nvidia-hibernate, am I supposed to do it on this same file?

That has nothing to do with the bug-report script, those are proposed fixes for your resume issue.

Now I realized that these units: nvidia-suspend, nvidia-resume, nvidia-hibernate are systemd services located in /usr/lib/systemd/system, now I make idea on how to disable them finally!! only this variable nvidia.NVreg_PreserveVideoMemoryAllocations I would like to know where it is located to set the new value for it.

Which file could I find this variable/kernel parameter to set his value to 1?

https://askubuntu.com/questions/19486/how-do-i-add-a-kernel-boot-parameter

Systemd units are managed with the systemctl command.

I am having the same problem and will try @generix solution. But, just for completion, Pop_OS does not necessarily use GRUB. The right way to do that should be by running the command
sudo kernelstub -a nvidia.NVreg_PreserveVideoMemoryAllocations=1

I am still to check if that works though.

Dears. I am still having the problem. The screen actually goes white and occasionally blinks white when mobing the mouse or with any change in the screen (a number running or so).

I have tried both solutions from @generix. None have worked.

The log can be foud here