Skip to content

Fix hibernation on new NVidia drivers#5519

Merged
dhh merged 1 commit into
basecamp:devfrom
NicolasDorier:dev
May 1, 2026
Merged

Fix hibernation on new NVidia drivers#5519
dhh merged 1 commit into
basecamp:devfrom
NicolasDorier:dev

Conversation

@NicolasDorier
Copy link
Copy Markdown
Contributor

@NicolasDorier NicolasDorier commented May 1, 2026

As explained on #5500, new drivers don't seem to expose the necessary suspend interface to use NVreg_PreserveVideoMemoryAllocations.

While omacom-io/omarchy-pkgs#84 fixed part of the issue, the default value of NVreg_PreserveVideoMemoryAllocations after the PR became 2 when it should be 0.

This PR fix the required values in /etc/modprobe.d/nvidia.conf .

See Arch's wiki: Preserve video memory after suspend.

Note that Arch set NVreg_UseKernelSuspendNotifiers to 1 by default, so setting it in nvidia.conf is not strictly needed, but I think it keeps the context together.

New drivers don't seem to expose the necessary suspend interface to use `NVreg_PreserveVideoMemoryAllocations`.

I explained the issues I experienced on:
basecamp#5500

While omacom-io/omarchy-pkgs#84 fixed part of
the issue, the default value of `NVreg_PreserveVideoMemoryAllocations`
is `2`, which doesn't work.
Copilot AI review requested due to automatic review settings May 1, 2026 01:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Omarchy’s NVIDIA setup to improve hibernation behavior with newer NVIDIA drivers by ensuring the kernel-suspend notifier path is configured via modprobe options.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Changes:

  • Add a migration to append NVIDIA hibernation-related module options to /etc/modprobe.d/nvidia.conf.
  • Update the NVIDIA hardware install script to always write these module options during installation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
migrations/1777018591.sh Adds a migration intended to ensure NVIDIA suspend notifier + PreserveVideoMemoryAllocations settings are present for existing installs.
install/config/hardware/nvidia.sh Updates installer-time NVIDIA modprobe configuration to include hibernation-related module options.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread migrations/1777018591.sh
@dhh dhh merged commit 61848c1 into basecamp:dev May 1, 2026
3 of 4 checks passed
ryanrhughes added a commit that referenced this pull request May 2, 2026
Encountered issues during testing that prove Nvidia is still a little
too shakey to take this as is. See #5554 for more details.
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.

3 participants