Skip to content

Stop early-loading the NVIDIA driver on hybrid GPU machines so hibernation can resume - #8263

Open
edbron wants to merge 2 commits into
omacom:quattrofrom
edbron:nvidia-hybrid-hibernate
Open

edbron wants to merge 2 commits into
omacom:quattrofrom
edbron:nvidia-hybrid-hibernate

Conversation

@edbron

@edbron edbron commented Aug 25, 2026 •

Copy link
Copy Markdown

Stop early-loading the NVIDIA driver on hybrid GPU machines so hibernation can resume

Problem

On a hybrid laptop (Intel/AMD iGPU + NVIDIA dGPU), hibernate writes the image fine but resume silently boots fresh. The previous boot's journal shows:

NVRM: PreserveVideoMemoryAllocations module parameter is set. System Power
      Management attempted without driver procfs suspend interface.
nvidia: PM: pci_pm_freeze(): nv_pmops_freeze returns -5
PM: hibernation: resume failed (-5)

install/hardware/nvidia.sh writes /etc/mkinitcpio.conf.d/nvidia.conf with MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) on every NVIDIA machine. During resume the kernel freezes devices before restoring the image; the driver is already loaded from the initramfs, but nothing has called its procfs suspend interface (nvidia-hibernate.service only runs from the real root), so nv_pmops_freeze returns -EIO and the resume is abandoned.

On a hybrid machine the early load buys nothing, the iGPU already provides KMS at the LUKS prompt and udev loads nvidia normally once root is mounted. Removing the modules from the initramfs fixes resume; I've been running this way on an ASUS ROG Strix G16 (Raptor Lake-HX + RTX, nvidia-open-dkms 610.57.04, linux 7.1.8, LUKS + btrfs, resume=/resume_offset=).

Change

  • bin/omarchy-hw-nvidia-only-display (new): true when NVIDIA owns every display controller. Reads sysfs like omarchy-hw-nvidia-gsp (no lspci, so it doesn't wake a runtime-suspended GPU), and treats any unreadable device as "another GPU" so the answer errs toward not early-loading. It is the same scan omarchy_hooks.conf already does inline to decide whether to drop the kms hook.
  • install/hardware/nvidia.sh: write nvidia.conf only when that helper says NVIDIA-only; otherwise ensure it is absent.
  • migrations/1787683023.sh: on existing hybrid installs, remove nvidia.conf and rebuild once via limine-mkinitcpio, with a marker so the machine-wide rebuild isn't repeated per user (same pattern as 1786605598.sh).

NVIDIA-only machines are unchanged: they still early-load and still drop kms. omarchy_hooks.conf's conditional keys off nvidia_drm in MODULES, so on hybrid machines (where MODULES no longer contains it) it keeps kms, which is what it did before anyway.

Testing

  • Helper: exits 1 on the Strix G16 (Intel + NVIDIA), exits 0 on a fake OMARCHY_PCI_DEVICES_PATH tree with a single 0x10de class-0x03 device.
  • With nvidia stripped from the initramfs (lsinitcpio shows 0 nvidia entries), systemctl hibernate resumes to the running session; before the change every hibernate ended in a fresh boot with the log lines above.

Fixes #8352

install/hardware/nvidia.sh wrote MODULES+=(nvidia ...) into the initramfs on
every NVIDIA machine. On a hybrid laptop that breaks resume from hibernation:
the kernel freezes devices to restore the image while the driver is already
loaded but its procfs suspend interface was never called (nvidia-hibernate
.service only runs from the real root), so nv_pmops_freeze returns -5 and
the machine boots fresh. The iGPU already provides early KMS there, and udev
loads nvidia once root is mounted, so the early load buys nothing.

Add omarchy-hw-nvidia-only-display (the sysfs scan omarchy_hooks.conf already
does inline), early-load only when it says NVIDIA owns every display
controller, and migrate existing hybrid installs with a one-time rebuild.
Copilot AI balanced review requested due to automatic review settings August 25, 2026 18:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Prevents hybrid NVIDIA systems from early-loading NVIDIA drivers, enabling hibernation resume while preserving NVIDIA-only boot behavior.

Changes:

  • Adds sysfs-based GPU detection.
  • Conditionally configures NVIDIA initramfs modules.
  • Migrates existing hybrid installations.

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.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
bin/omarchy-hw-nvidia-only-display Detects NVIDIA-only display configurations.
install/hardware/nvidia.sh Limits early driver loading to NVIDIA-only systems.
migrations/1787683023.sh Removes stale hybrid configuration and rebuilds initramfs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread migrations/1787683023.sh Outdated
Comment on lines +19 to +20
sudo rm -f "$nvidia_conf"
sudo limine-mkinitcpio

@edbron edbron Aug 25, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The migration now copies nvidia.conf to a temp file before removing it; if limine-mkinitcpio fails it reinstalls the drop-in, prints why, and exits 1, so the next run hits the -f check with the file present and rebuilds again. Covered by "restores the drop-in when the rebuild fails" and "retries after a failed rebuild" in the new test (0cdb9d6).

Comment thread migrations/1787683023.sh Outdated
Comment on lines +16 to +20
omarchy-hw-nvidia-only-display && exit 0

echo "This is a hybrid GPU machine; removing nvidia from the initramfs and rebuilding it"
sudo rm -f "$nvidia_conf"
sudo limine-mkinitcpio

@edbron edbron Aug 25, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added test/shell.d/nvidia-hybrid-initramfs-migration-test.sh, modelled on nvidia-kms-migration-test.sh: hybrid removal + rebuild + marker, machine idempotence, rebuild failure → drop-in restored and no marker → retry rebuilds, NVIDIA-only skip, and the no-limine / no-drop-in skips. Also hw-nvidia-only-display-test.sh for the helper (NVIDIA-only, NVIDIA + audio function, Intel/AMD hybrids, no NVIDIA, empty tree, unreadable device stays conservative).

If limine-mkinitcpio fails after nvidia.conf is removed, a rerun would exit at
the file check and the machine would keep its stale image for good. Back the
drop-in up and put it back on failure so the migration retries.

Test the migration (hybrid rebuild + marker, idempotence, failure restore and
retry, NVIDIA-only and not-applicable skips) and the new helper.
@edbron

edbron commented Aug 26, 2026

Copy link
Copy Markdown
Author

Following up on omarchybot's analysis in #8215, which points out that this PR's omarchy-hw-nvidia-only-display and #7851's omarchy-hw-hybrid-gpu-sysfs are the same predicate complemented, and that one helper would do for both.

Agreed. Happy to rebase onto whichever helper lands first — if #7851's merges, I'll switch nvidia.sh and the migration to ! omarchy-hw-hybrid-gpu-sysfs and drop mine; if this one is preferred, the -r guards on class/vendor (an unreadable device counts as "another GPU", matching omarchy_hooks.conf) and test/shell.d/hw-nvidia-only-display-test.sh are already here for #7851 to reuse.

One point on the predicate itself, since the bot suggests "the dGPU drives no connected output" as a better discriminator for the VA-API case. For the initramfs question the two predicates give different answers on real hardware, and the vendor scan is the one hibernation needs:

  • The freeze failure (nv_pmops_freeze returns -5) happens whenever nvidia is loaded in the initramfs on a machine that also has an iGPU — regardless of which GPU a connector is wired to. On my ROG Strix G16 the HDMI port is wired to the dGPU, so a connector-status gate would keep nvidia early-loaded whenever the image is rebuilt while docked, and resume would break again.
  • What the early load buys is KMS at the LUKS prompt, and any other display controller present is what provides it instead. So "does another display controller exist" is the exact question, not a proxy for it.

The one shape the vendor scan misjudges is a muxed laptop switched to discrete mode: it has an idle iGPU, so this PR drops the early load and the LUKS prompt would rely on the iGPU's KMS for a panel that's routed to NVIDIA. If that case matters, the narrowest fix is to keep the early load when NVIDIA has a connected output and no other display controller has one — I'm glad to add that as a follow-up if maintainers want it, but I'd rather not widen this PR before there's a decision on the shared helper.

@zuhdil

zuhdil commented Sep 13, 2026

Copy link
Copy Markdown

Confirming this on a second, quite different machine — same failure, same fix.

System: ThinkPad T480 (20L6S5JT00), i7-8650U, Intel UHD 620 [8086:5917] (class 0x0300) + NVIDIA MX150 GP108M [10de:1d10] (class 0x0302). Omarchy 4.0.3-1, kernel 7.2.3-arch1-3, proprietary nvidia-580xx-dkms 580.178.04 (not nvidia-open), LUKS + btrfs, Limine UKI, 31 GiB swapfile on /swap, resume=/dev/mapper/root resume_offset=….

Worth noting the spread from your Strix G16: different driver branch (580xx proprietary vs nvidia-open 610.x), different GPU generation (Pascal vs Ada), different platform generation. The signature is identical, so this isn't specific to nvidia-open or to recent silicon.

Before — resume aborted at 90% of the image load:

PM: Image signature found, resuming
PM: Loading and decompressing image data (1154480 pages)...
PM: Image loading progress:  90%
nvidia 0000:01:00.0: PM: pci_pm_freeze(): nv_pmops_freeze [nvidia] returns -5
nvidia 0000:01:00.0: PM: failed to quiesce async: error -5
PM: hibernation: Failed to load image, recovering.

with the NVRM line you quote appearing in the preceding boot:

NVRM: PreserveVideoMemoryAllocations module parameter is set. System Power
Management attempted without driver procfs suspend interface.

After dropping MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) from /etc/mkinitcpio.conf.d/nvidia.conf — what this PR does automatically on hybrid machines — nvidia moves out of early boot to udev:

[12.137] i915 ... Initialized i915 1.6.0 for 0000:00:02.0
[12.269] nvidia: loading out-of-tree module taints kernel

and hibernate/resume completes. Verified it was a true resume and not a fallback boot by comparing /proc/sys/kernel/random/boot_id across the cycle (unchanged) plus a tmpfs marker surviving; btrfs device stats clean afterwards. The UKI dropped 330 MB → 160 MB.

On "does this just hand the dGPU to nouveau instead?" — reasonable worry, and no: kms + autodetect still pull nouveau.ko and its GSP firmware into the image, but nvidia-580xx-utils.conf blacklists nouveau and the modconf hook bundles /usr/lib/modprobe.d into the initramfs, so nothing binds 01:00.0 before root is mounted. Confirmed nouveau stays unloaded post-boot.

On the predicate: the MX150 here is class 0x0302 (3D controller) with no connectors at all, while the iGPU is 0x0300. Your helper's 0x03 prefix match counts it correctly, so the scan returns "not NVIDIA-only" and the early load is skipped — the right answer. Flagging it only because it's an Optimus dGPU that isn't VGA-class, in case the shared-helper discussion in #8215 narrows that class match.

Caveat on attribution: I applied the #8471 resume-hook reorder (PR #8888) in the same initramfs rebuild, so this doesn't isolate the NVIDIA change. The -5 freeze abort was demonstrably a cause here — the image loaded to 90% and died on that callback — but the ordering fix landed at the same time.

@chaitanyayeleti

Copy link
Copy Markdown

same issuse on AMD iGPU + NVIDIA DGPU

@omarchybot omarchybot added bug Something isn't working compatibility Make Omarchy work better on everything! labels Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 0cdb9d6 against current quattro (b18ab49), which it merges into without conflicts. This review was done by Claude Opus 5.5 alone. The configured second opinion, Codex Medium, did not run because its daily review budget was already spent, so no second model has looked at this yet.

What was run. On a disposable Omarchy worker, install/hardware/nvidia.sh was run against fake sysfs PCI trees, and each result was fed through omarchy_hooks.conf:

Machine quattro This PR This PR with nvidia.sh reverted
Intel iGPU + NVIDIA (3D controller) early-loads nvidia no nvidia in MODULES, kms kept early-loads nvidia
AMD iGPU + NVIDIA (VGA) early-loads nvidia no nvidia in MODULES, kms kept early-loads nvidia
NVIDIA only early-loads nvidia, kms dropped unchanged unchanged

Both new test files pass on the worker (7 and 6 checks). The full ./test/cli run passes 88 tests. One test fails (vscode generated theme references current theme file), and it fails the same way on quattro without this change.

What was not run. A real hibernate and resume. The worker has no NVIDIA hardware, so the table above shows the initramfs configuration changing as intended, not resume working.

Findings. Nothing blocking in the diff. Three notes for the maintainer:

#10065 covers hibernation on NVIDIA-only desktops too, and on non-NVIDIA GPUs, by stripping GPU drivers from the initramfs whenever hibernation is configured. The two overlap on hybrid NVIDIA laptops. Which to take, or whether to take both, is the maintainer's call.

What this needs next. A resume test of this exact commit on a hybrid machine that still has /etc/mkinitcpio.conf.d/nvidia.conf. The migration skips a machine where it was already removed by hand. @chaitanyayeleti, your AMD + NVIDIA machine fits, if you are willing:

git clone https://github.com/edbron/omarchy ~/omarchy-8263
git -C ~/omarchy-8263 checkout 0cdb9d691e943fa3556c82539f6bf2afb6d50f4e
omarchy dev link ~/omarchy-8263     # reboots
omarchy-migrate                     # runs migration 1787683023: removes nvidia.conf, rebuilds the initramfs
sudo lsinitcpio /boot/EFI/Linux/omarchy_linux.efi | grep -c nvidia   # expect 0
cat /proc/sys/kernel/random/boot_id; systemctl hibernate
cat /proc/sys/kernel/random/boot_id   # after power-on: unchanged means it resumed
omarchy dev unlink                  # back to the packaged Omarchy

Please reply with whether it resumed, the two boot_id values, and journalctl -b -k | grep -E 'PM:|nvidia' if it did not. Until then this waits on a hardware test, and after that on the maintainer.

@omarchybot

Copy link
Copy Markdown
Collaborator

Second review at the same head, 0cdb9d6, this time with a second opinion: Claude Opus 5.5 and Codex Medium both read the diff. It still merges cleanly into current quattro (c352b62). The worker results in the comment above were taken against an older quattro and were not re-run, because nothing in the diff changed.

The diff. Neither model found a defect in the configuration path. On hybrid machines nvidia.sh and the migration remove nvidia.conf, and omarchy_hooks.conf keeps kms. NVIDIA-only machines are unchanged. Re-runs do nothing. Codex agreed that the change is the right size for the problem and that the problem is real. It found the same freeze failure and fix in NVIDIA's tracker (NVIDIA/open-gpu-kernel-modules#1343). Independence is not guaranteed, since the reviewer can read this session's notes.

The skipped-rebuild case from edbron#1. @vfrolov is right that limine-mkinitcpio exits 0 after a failed kernel build. In limine-mkinitcpio-hook 1.40.0, process_kernel in limine-mkinitcpio-install logs "mkinitcpio failed … skipping" and returns success. If that happens here, the migration writes its marker with nvidia.conf already removed, and the old image, which still loads nvidia, stays in place. The cost is a delayed fix, not a broken boot. The old image still boots, and the next successful rebuild (any kernel or driver update) builds without nvidia. The two closest quattro migrations, 1786605598.sh and 1786482992.sh, also trust the wrapper's exit status. Both models think the check is not needed for this PR to be correct. Whether to take it is for @edbron and the maintainer.

The competing fix, #10065. The two models disagree on this one:

The two PRs overlap in install/hardware/nvidia.sh but don't conflict at runtime, so both could land. Which to take is the maintainer's call.

What this waits on. The maintainer, for the choice above. The hardware resume test asked for in the comment above is still the only thing that would show resume working on this commit.

rdoupe added a commit to omarchy-asus/omarchy that referenced this pull request Oct 16, 2026
rdoupe added a commit to omarchy-asus/omarchy that referenced this pull request Oct 16, 2026
Every fix now has its own topic branch, rebased on upstream quattro,
with its pull request draft in fork/prs/. New: asus/audio (ALC285
Master), asus/hdmi-cursor (software cursor while a monitor hangs off
the NVIDIA card), asus/rtkit, and omacom#8263 carried as
carry/initramfs-8263.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@RajdeepVerma

Copy link
Copy Markdown

Another confirmation, on an AMD iGPU + NVIDIA dGPU laptop (the AMD side hasn't been covered yet in detail above).

System: AMD Renoir iGPU [1002:1636] + NVIDIA GTX 1650 Mobile (TU117M) [10de:1f9d], both class 0x0300. Omarchy 4.5.0-3, linux-omarchy 7.2.15-1, nvidia-open-dkms 615.78.08, LUKS + btrfs swapfile, Limine UKI, resume=/dev/mapper/omarchy_root resume_offset=…. /etc/mkinitcpio.conf.d/nvidia.conf is the stock MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm).

Before (hibernate writes the image, resume boots fresh). The image is found and loads completely, then the freeze callback aborts it:

PM: Image signature found, resuming
PM: Image loading done
PM: hibernation: Read 8347720 kbytes in 7.17 seconds (1164.25 MB/s)
PM: Image successfully loaded
NVRM: GPU 0000:01:00.0: PreserveVideoMemoryAllocations module parameter is set. System Power Management attempted without driver procfs suspend interface.
nvidia 0000:01:00.0: PM: pci_pm_freeze(): nv_pmops_freeze [nvidia] returns -5
nvidia 0000:01:00.0: PM: failed to quiesce async: error -5

After that the machine continues into a normal boot and the session is lost. nvidia-hibernate.service ran fine on the way down in the previous boot, so the suspend side is not the problem.

On the predicate: both GPUs here are 0x0300, so omarchy-hw-nvidia-only-display returns "not NVIDIA-only" and the early load would be skipped, which is the right answer. On this machine the existing omarchy_hooks.conf scan also already keeps kms (the AMD GPU is the other display controller), so the LUKS prompt keeps its early KMS from amdgpu. nvidia-utils.conf blacklists nouveau and is bundled by modconf, so dropping nvidia from the initramfs does not hand the dGPU to nouveau.

I'm applying the same change locally (removing nvidia.conf and rebuilding with limine-mkinitcpio) and will report back here whether a full hibernate/resume cycle completes.

@RajdeepVerma

Copy link
Copy Markdown

Follow-up to my comment above: the change fixes resume on this machine (AMD Renoir + GTX 1650 Mobile, nvidia-open-dkms 615.78.08, linux-omarchy 7.2.15-1).

Removed /etc/mkinitcpio.conf.d/nvidia.conf and rebuilt with limine-mkinitcpio. lsinitcpio on the UKI shows 0 nvidia entries. After a reboot, systemctl hibernate resumes into the running session. /proc/sys/kernel/random/boot_id is unchanged across the cycle, and the journal continues in the same boot through nvidia-resume.service with no nv_pmops_freeze error.

A data point for the dGPU-wired-output caveat you raised in your earlier comment: on this laptop the external DisplayPort is wired to the NVIDIA GPU (card0-DP-1) and the internal panel to amdgpu (card1-eDP-1). With nvidia out of the initramfs, the LUKS prompt (on cold boot and on resume) only appears on the internal panel, and the external monitor shows no signal until the root is unlocked and nvidia loads from udev. After that, Aquamarine picks DP-1 back up normally (it disconnects and reconnects once during resume, then comes back at its configured mode).

So on this hardware the trade is "resume works, LUKS prompt is internal-only." That's fine for a laptop with its lid open. Docked with the lid closed you'd have to type the passphrase blind. It might be worth a line in the PR description or the migration's echo so docked users aren't surprised.

@omarchybot

Copy link
Copy Markdown
Collaborator

Third review at the same head, 0cdb9d6. It was prompted by @RajdeepVerma's results above and by the related pull requests opened since the last review. It still merges cleanly into current quattro (fad23cf). Nothing was run on a worker this time, and no hardware resume test was run on this commit. This review was done by Claude Opus 5.5, with Codex Medium and Muse Wonder (thinking high) as second opinions.

New hardware evidence. @RajdeepVerma tested an AMD Renoir laptop with a GTX 1650 Mobile. Removing nvidia.conf and rebuilding the boot image fixed resume: boot_id was the same after the cycle and there was no nv_pmops_freeze error. That makes three different hybrid machines on which this change, made by hand, fixes the failure. None of the three tested this commit's migration. The same report adds a cost the PR body does not mention. On a laptop whose external DisplayPort is wired to the NVIDIA GPU, the LUKS prompt now shows only on the internal panel. Docked with the lid closed, you would type the passphrase without seeing the prompt.

Choosing between the competing fixes. Both reviewers were given this PR, #10065 and #16848 without our own answer, and both picked #10065. The reason is a case this PR leaves out: on a machine where NVIDIA is the only GPU, the PR keeps loading nvidia early (install/hardware/nvidia.sh:41, migrations/1787683023.sh:16). That is exactly the setup in #10039, where the same freeze failure happens. #10065 takes the NVIDIA modules out of the boot image on any machine with hibernation configured, so it covers those desktops too. Checked against the code, that difference is real. But #10065 cannot land as it stands. It now conflicts with quattro in bin/omarchy-hibernation-setup, it has no migration for machines that already have hibernation configured, and nobody has run a resume cycle with it. It also shows the LUKS prompt on simpledrm on every machine with hibernation configured, and that includes most installs, because the ISO sets hibernation up. #16848 is not a fix for this bug. It keeps nvidia in the boot image whenever the NVIDIA GPU has an output, which is the setup @RajdeepVerma has, and it was written to make the image smaller. So neither this PR nor #10065 is ready to bring to the maintainer as the fix. Which way to go is the maintainer's call.

A collision with #18600. #18600 adds etc/mkinitcpio.conf.d/nvidia_module.conf, which early-loads the NVIDIA modules whenever MODULES does not already list nvidia_drm and the modules are installed. It does not check for a second GPU. On a hybrid machine where this PR's migration removed nvidia.conf, that drop-in puts the modules back, and #18600's own migration rebuilds the image right away. Resume would fail again with no error. If both land, #18600 needs to skip hybrid machines the way it already skips N1x.

Things to change in this PR if it goes ahead. Both checked by reading quattro:

  • test/shell.d/nvidia-hybrid-initramfs-migration-test.sh breaks the rule against migration tests (AGENTS.md line 172 and agents/skills/migrations.md) and should be removed. test/shell.d/hw-nvidia-only-display-test.sh covers the helper, which is where the logic lives.
  • limine-mkinitcpio exits 0 even when a kernel fails to build. quattro now handles that in migrations/1791621765.sh: it captures the output, checks for mkinitcpio failed for kernel, and exits 1 so the migration stays pending. migrations/1787683023.sh only checks the exit status. It should do the same, and restore nvidia.conf when that message appears.

Both reviewers also noted that the migration takes any "no" from omarchy-hw-nvidia-only-display, including an unreadable device, as proof the machine is hybrid. They agreed that ordinary N1x hardware answers "yes" and is left alone. Neither found a machine where this actually goes wrong.

What this waits on. The maintainer, to choose between this approach and #10065's.

@danbunnell

Copy link
Copy Markdown

This change causes #18599 again on desktops. I found this during the review of #18600.

omarchy-hw-nvidia-only-display makes the machine "hybrid" when any display controller is not NVIDIA. Most current desktop CPUs have an integrated GPU, for example the Radeon 610M in each Ryzen 7000 and 9000 CPU. On a desktop with an RTX 3090, a Radeon 610M and the monitor on the RTX 3090, this PR removes nvidia.conf. Then nvidia_drm loads late, Hyprland makes the iGPU its primary GPU and copies each frame to the NVIDIA output, and the full desktop is slow. #18599 has the logs.

The iGPU gives early KMS for the LUKS prompt. But when the monitor is on the NVIDIA GPU, Hyprland also needs nvidia_drm before it starts.

A condition such as "the NVIDIA GPU drives no display", like the connector check in #16848, keeps the hibernation fix for laptops and does not change these desktops. In #18600 I proposed one policy for #8263, #16848 and #18600: #18600 (comment)

@omarchybot

Copy link
Copy Markdown
Collaborator

Rechecked @danbunnell's new comment against the unchanged head, 0cdb9d691e943fa3556c82539f6bf2afb6d50f4e, and current quattro (4d64235). This was a source review by GPT-6 in Codex (effort not exposed); no worker tests or hardware resume tests ran in this pass.

The configuration claim is correct: omarchy-hw-nvidia-only-display:17 returns false for any non-NVIDIA display controller, without checking which GPU has outputs. On the RTX 3090 + Radeon 610M configuration in #18599, the installer would remove nvidia.conf, and the migration would remove it from an existing installation. #18599 reports late NVIDIA loading and Hyprland choosing the iGPU in that configuration, with early loading correcting it. That is a relevant hardware report; I have not reproduced the desktop regression on this commit.

One detail in the proposed alternative matters: #16848 checks whether NVIDIA exposes connector entries, regardless of whether a monitor is connected. It preserves early loading on a desktop card with outputs, but also on the dGPU-wired laptop that @RajdeepVerma reported above. Its predicate therefore does not cover every hibernation case this PR covers. #10065 still defers GPU drivers more broadly, and #18600 would add the NVIDIA modules back after this migration removes the drop-in. The #10065 and #16848 heads are unchanged since the preceding comparison; I checked #18600 at ba14bf6.

The fresh second-opinion review did not run: the brief exceeded the review launcher's command-line size limit. A separate availability probe succeeded for Opus 5.5 High and muse-wonder (via pi, thinking high), so they are available, but neither reviewed this update.

This remains waiting on the maintainer to decide how early loading should work across these hardware cases. No code or labels changed, and the exact-commit hardware test requested above remains outstanding.

@RajdeepVerma

Copy link
Copy Markdown

Thanks for the thorough reviews. Data point for the predicate discussion: on my AMD Renoir + GTX 1650 Mobile laptop, the iGPU (06:00.0, boot_vga=1) drives the internal eDP-1 and the NVIDIA GPU (01:00.0) drives only the external DP-1. A "does NVIDIA expose connectors" check (#16848) therefore keeps early NVIDIA here, which is the configuration that breaks resume. A "NVIDIA has no display" check also misses it.

What separates this laptop from @danbunnell's RTX 3090 + Radeon 610M desktop is where the internal panel is. Proposal: remove early NVIDIA only when a non-NVIDIA GPU owns an internal-panel connector (eDP-*, LVDS-*, DSI-* under /sys/class/drm/card*-*). A hybrid desktop with no internal panel keeps nvidia.conf, so #18599 is unaffected. This laptop gets the fix.

Happy to update the helper and its test if the maintainer wants to go this way. Also noting for #18600: it should apply the same condition, or it re-adds the modules after this migration.

@omarchybot

Copy link
Copy Markdown
Collaborator

Rechecked @RajdeepVerma's internal-panel proposal at unchanged head 0cdb9d691e943fa3556c82539f6bf2afb6d50f4e against quattro (d694980). This head already removes early NVIDIA on the reported AMD/NVIDIA laptop. The proposed rule would preserve that result while retaining early NVIDIA on the no-internal-panel desktop described in #18599; that rule has not been implemented or tested.

The connector check in #16848 keeps early NVIDIA on the reported laptop because its NVIDIA GPU exposes DP-1. Also, #18600 would still re-add the modules after this migration deletes nvidia.conf, even if this PR alone adopted the internal-panel rule. Those changes need a consistent policy from the maintainer.

On a disposable Omarchy worker, the installer configuration matrix showed early NVIDIA on hybrid fixtures on current base, its removal on this head, and early loading again with the installer fix reverted. NVIDIA-only fixtures stayed unchanged. All 116 CLI checks and 9 existing NVIDIA hook checks passed. The newer mkinitcpio-hooks-test.sh file is absent from this head and was not run. These checks prove configuration behavior, not NVIDIA hibernate/resume.

Checked by GPT-6 in Codex (effort not exposed), with second opinions from Opus 5.5 High and muse-wonder via pi, thinking high. Both agreed that the proposed boundary needs a maintainer decision and that #18600 still conflicts with this removal; their independence from this review is not guaranteed. This remains waiting on that decision. Full-head hardware confirmation is still outstanding. No code or labels changed.

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

Labels

bug Something isn't working compatibility Make Omarchy work better on everything!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hibernation resume fails on hybrid Intel+NVIDIA laptops — nvidia.sh's early-KMS module bundling races the resume hook

7 participants