Skip to content

Leave NVIDIA unloaded in the initramfs so hibernation can resume - #14410

Closed
vfrolov wants to merge 2 commits into
omacom:quattrofrom
vfrolov:fix/nvidia-hibernate-resume
Closed

vfrolov wants to merge 2 commits into
omacom:quattrofrom
vfrolov:fix/nvidia-hibernate-resume

Conversation

@vfrolov

@vfrolov vfrolov commented Oct 7, 2026

Copy link
Copy Markdown

The boot kernel loads nvidia from the initramfs and then freezes every bound GPU while restoring a hibernation image. With PreserveVideoMemoryAllocations=1 that freeze returns -EIO (nv_pmops_freeze -5), and the kernel discards the image and boots a new session.

nvidia.conf still lists the modules, so omarchy_hooks.conf can drop the kms hook on an NVIDIA-only machine. zz-nvidia-no-early-load.conf is sourced later and removes them from the image. A migration installs that drop-in and rebuilds the Limine image once on machines that already have nvidia.conf.

NVreg_PreserveVideoMemoryAllocations is unchanged, so nvidia-resume.service can still restore video memory after the saved session is running.

Verified on a hybrid Coffee Lake laptop, Intel UHD 630 plus GTX 1070 Mobile, driver 580.178.04, kernel 7.2.5-3-omarchy. Hibernate returned in the same boot from S4, and nvidia-resume.service completed successfully. This is the 580xx case in #5554, not the 595 open-driver failure.

The early-loaded driver rejects the boot kernel's device freeze while
PreserveVideoMemoryAllocations=1, and the saved image is discarded. The
module names stay in nvidia.conf so the kms hook is still dropped on
NVIDIA-only machines, then a later drop-in removes them.
@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Changes how the boot image is built and what loads at startup.

The PR appears safe to merge; the previous retry problem is addressed.

What we checked:

  • Skipped rebuild stays pending: The migration stops if an image still contains an NVIDIA module. It writes the marker only after every discovered image passes.

Summary

Keeps NVIDIA modules out of the initramfs so a saved hibernation session can resume.

  • Adds a late configuration file and installs it on new and existing machines.
  • Checks rebuilt boot images before recording migration completion.
  • Adds tests for a skipped rebuild and a successful retry.

Reviews (2) · Last reviewed commit: "Do not record the NVIDIA initramfs migra..." · Reviewed by Greptile

Comment thread migrations/1791210803.sh Resolved
…skipped

limine-mkinitcpio can exit successfully after skipping a failed kernel build. Confirm the current UKIs omit the NVIDIA modules before writing the completion marker.
@jandrusk

jandrusk commented Oct 7, 2026

Copy link
Copy Markdown

Thanks for the careful root-cause work here. Two things:

BLOCKING: migration filename collision. migrations/1791210803.sh is also added by #14401 and #14408, so whichever lands second will conflict (or overwrite the first). Please regenerate it with a fresh date +%s right before merge, and update the hard-coded marker path /var/lib/omarchy/migrations/1791210803 to match.

Scope. The drop-in goes to every NVIDIA machine, not just hybrids. On an NVIDIA-only box, omarchy_hooks.conf still drops kms because nvidia_drm is in MODULES when it runs. Then zz-nvidia-no-early-load.conf removes the NVIDIA modules, so the initramfs ends up with no KMS driver at all, and the LUKS/Plymouth prompt relies on simpledrm. That may be fine, but it's untested here (the verification was a hybrid 580xx laptop). #8263 takes the narrower route and only stops early-loading on hybrid machines. Could this be limited to hybrids, or to machines where hibernation is actually set up, until NVIDIA-only + LUKS is checked? For example, in nvidia.sh:

# Only hybrids: some non-NVIDIA display controller is present
if lspci -n | awk '$2 ~ /^03(00|02|80):$/ && $3 !~ /^10de:/ { found = 1 } END { exit !found }'; then
  install -Dm644 "$OMARCHY_INSTALL/hardware/nvidia-no-early-load.conf" \
    /etc/mkinitcpio.conf.d/zz-nvidia-no-early-load.conf
fi

Related: #5554, #8352, #14404.

@vfrolov

vfrolov commented Oct 8, 2026

Copy link
Copy Markdown
Author

I'll regenerate the migration filename and marker with date +%s.

The verified resume was a hybrid (UHD 630 + GTX 1070 Mobile, driver 580.178). I'll leave NVIDIA-only machines alone. #8263 already skips early-loading nvidia on hybrids, so I'd add the UKI check to that migration and close this PR.

@vfrolov

vfrolov commented Oct 8, 2026

Copy link
Copy Markdown
Author

Closing this in favor of #8263. The UKI check is in edbron#1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants