PreserveVideoMemoryAllocations + systemd services causes resume from hibernate to fail

So, I tried setting NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp and enabling the systemd power management services (-resume, -hibernate, -suspend), and I can’t successfully resume from hibernation anymore!

Reposting part of my journal:

kernel: NVRM: GPU 0000:01:00.0: PreserveVideoMemoryAllocations module parameter is set. System Power Management attempted without driver procfs suspend interface. Please refer to the 'Configuring Power Management Support' section in the driver README.
kernel: nvidia 0000:01:00.0: PM: pci_pm_freeze(): nv_pmops_freeze+0x0/0x40 [nvidia] returns -5
kernel: nvidia 0000:01:00.0: PM: dpm_run_callback(): pci_pm_freeze+0x0/0x140 returns -5
kernel: nvidia 0000:01:00.0: PM: failed to quiesce async: error -5
kernel: ucsi_acpi USBC000:00: PM: dpm_run_callback(): ucsi_acpi_resume+0x0/0x40 [ucsi_acpi] returns -110
kernel: ucsi_acpi USBC000:00: PM: failed to recover: error -110
kernel: PM: hibernation: Failed to load image, recovering.

Anyone has any idea what could be the reason? Why would nv_pmops_freeze fail with -5?

Same issue on my laptop gigabyte g5 gd. Linux 6.0.8
I have enabled nvidia-suspend,hibernate,resume services, rerun mkinitcpio.
I have made sure that nvidia-hibernate is run on hibernate(I see it in logs)
But still have the same issue as described above

I have fixed my issue by DISABLING early-kms.
In my case - removing nvidia and intel modules from mkinitcpio.conf

Hello, after install the latest 525.60.11 version of the driver, the problem persists!

Before this, both suspend (to RAM) AND hibernate fail. After updating my driver which is supposed to fix the problem for suspend, suspending does work now. Regardless, hibernation still fails with the same error.

Is there anyone from NVIDIA who is aware of and working on this problem? Thanks!

What I know about this issue:

  • it is definitely related to NVIDIA Optimus hybrid graphics. I have an Intel CPU so I have no idea whether it’s just Intel, or both Intel and AMD;
  • it is NOT related to filesystem issues, in particular not BTRFS, which I’m using. I’m using BTRFS on my desktop too, but everything works fine, as the desktop only has an NVIDIA graphics card.

I have this issue too.

дек 29 22:08:25 pc kernel: NVRM: GPU 0000:05:00.0: PreserveVideoMemoryAllocations module parameter is set. System Power Management attempted without driver procfs suspend interface. Please refer to the 'Configuring Power Management Suppo>
дек 29 22:08:25 pc kernel: nvidia 0000:05:00.0: PM: pci_pm_freeze(): nv_pmops_freeze+0x0/0x20 [nvidia] returns -5
дек 29 22:08:25 pc kernel: nvidia 0000:05:00.0: PM: dpm_run_callback(): pci_pm_freeze+0x0/0xc0 returns -5
дек 29 22:08:25 pc kernel: nvidia 0000:05:00.0: PM: failed to quiesce async: error -5
дек 29 22:08:25 pc kernel: serial 00:04: activated
дек 29 22:08:25 pc kernel: nvme nvme0: 16/0/0 default/read/poll queues
дек 29 22:08:25 pc kernel: PM: hibernation: Failed to load image, recovering.

RTX 3060 Ti, Driver version: 525.60.11

Linux pc 5.19.15-xanmod1 #0~20221012.git85103f7 SMP Wed Oct 12 15:04:07 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux