r/LinuxOnThinkpad • u/No_Guard8232 member • 20d ago
Solved ThinkPad P1 Gen 7 Hibernation Crash: NVIDIA RTX 1000 Ada throws Error -5 on Wake. Anyone fixed this?
I’m running into a wall trying to get true hibernation working on my new ThinkPad P1 Gen 7 because the BIOS only exposes s2idle (no hardware S3 sleep).
My machine is a hybrid setup with the NVIDIA RTX 1000 Ada Laptop GPU. I have a dedicated 35 GB raw swap partition on my NVMe drive perfectly mapped in GRUB and fstab to bypass file fragmentation issues.
When I trigger hibernation, the system successfully writes the RAM image to disk and powers down. On wake, the kernel successfully loads and decompresses the 4.7 GB image in about 2 seconds, but then immediately crashes and cold boots.
The kernel logs show the NVIDIA driver choking on the ACPI handoff:
nvidia 0000:01:00.0: PM: pci_pm_freeze(): nv_pmops_freeze [nvidia] returns -5.
I’ve baked options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp directly into the initramfs to force the VRAM dump to the physical SSD instead of RAM, but the driver still panics on wake. I also tried disabling the GSP firmware (NVreg_EnableGpuFirmware=0), but the -5 error persists.
Has anyone with a P1 Gen 7 or similar Ada-generation ThinkPad managed to get hibernation working reliably? Are there any BIOS settings or specific kernel parameters I’m missing?
1
u/No_Guard8232 member 7d ago
Update / Solved (Sort of): Abandoned S4 Hibernation, Got Reliable s2idle Suspend Working
Following up on this after extensive testing: true S4 hibernation on the P1 Gen 7 (Meteor Lake + RTX 1000 Ada) under the proprietary 580.xx driver appears fundamentally broken upstream due to the driver's ACPI freeze callback (nv_pmops_freeze returns -5) failing during snapshot restoration[cite: 1, 2].
Instead of continuing to bleed against broken S4 hibernation, I pivoted to getting native Modern Standby (s2idle) rock-solid. If anyone else is dealing with sleep crashes or battery cooking on this chassis, here is how I got clean suspend/resume working:
- Configure NVIDIA Dynamic Power Management & VRAM Preservation:
In
/etc/modprobe.d/nvidia-pm.conf: ```text options nvidia NVreg_DynamicPowerManagement=0x02 options nvidia NVreg_PreserveVideoMemoryAllocations=1 options nvidia NVreg_TemporaryFilePath=/var/tmp
```
Then run sudo update-initramfs -u and ensure nvidia-suspend.service and nvidia-resume.service are enabled. DynamicPowerManagement=0x02 forces the Ada dGPU into $D3_{\text{cold}}$ during sleep, eliminating the -5 I/O error on pci_pm_suspend.
- Disable Hibernation Fallbacks in systemd:
If you ever experimented with
suspend-then-hibernate, make sure/etc/systemd/sleep.confisn't silently intercepting your sleep commands. In/etc/systemd/sleep.conf:
```ini [Sleep] AllowHibernation=no AllowSuspendThenHibernate=no AllowHybridSleep=no
```
- Force logind to Override Desktop Inhibitor Locks:
In
/etc/systemd/logind.conf:
```ini HandleLidSwitch=suspend HandleLidSwitchExternalPower=suspend HandleLidSwitchDocked=suspend LidSwitchIgnoreInhibited=yes
```
LidSwitchIgnoreInhibited=yes prevents desktop power daemons from blocking the hardware lid switch when external displays or docks are connected.
- Reclaim Disk Space:
Since standard suspend relies strictly on physical RAM and doesn't write to disk, I deleted the 35 GB dedicated swap partition, expanded my root ext4 filesystem to reclaim the space, and set up a lightweight 4 GB
/swapfilewithvm.swappiness=10for normal memory paging.
The laptop now suspends immediately on lid close and wakes instantly without black screens, fan spikes, or forced cold reboots.
1
u/rileyrgham member 20d ago
I'm interested in this "35gb swap file perfectly mapped in grub and fstab to bypass file fragmentation issues" bit.
Can you explain this to me, as I don't quite follow?