Skip to content

Stop the desktop lag when the NVIDIA driver comes after installation - #18600

Open
danbunnell wants to merge 4 commits into
omacom:quattrofrom
danbunnell:nvidia-display-early-kms
Open

danbunnell wants to merge 4 commits into
omacom:quattrofrom
danbunnell:nvidia-display-early-kms

Conversation

@danbunnell

@danbunnell danbunnell commented Nov 12, 2026 •

Copy link
Copy Markdown

What changes

Fixes #18599.

install/hardware/nvidia.sh writes /etc/mkinitcpio.conf.d/nvidia.conf only during installation. A machine that gets its NVIDIA GPU or driver later does not have this file. On that machine, nvidia_drm loads from the root file system, and Hyprland can start first. Hyprland then uses another GPU as its primary GPU and copies each frame to the NVIDIA outputs. The full desktop is slow.

No initramfs rebuild repairs this. The kms hook adds only in-tree modules, for example from drivers/gpu/drm/. The NVIDIA modules are out-of-tree modules in updates/dkms/ or extramodules/.

This PR makes these changes:

  • etc/mkinitcpio.conf.d/nvidia_module.conf (new): At each initramfs build, this drop-in adds nvidia nvidia_modeset nvidia_uvm nvidia_drm to MODULES when modinfo finds all four for the kernel. It does not add them in these conditions:

    • MODULES already contains nvidia_drm, for example from nvidia.conf.
    • The machine is an N1x laptop. install/hardware/n1x.sh controls the NVIDIA driver on N1x.
    • The runtime does not have omarchy-hw-aarch64-n1x yet.

    The name follows thunderbolt_module.conf. The file sorts after nvidia.conf and before omarchy_hooks.conf, because omarchy_hooks.conf reads MODULES to remove the kms hook.

  • No removable hardware in the decision: The drop-in does not look for an NVIDIA GPU. The N1x check reads only fixed platform IDs. Package transactions change the installed modules. The mkinitcpio pacman hook (on systemd-boot, the Omarchy override with the same triggers) rebuilds the initramfs when a transaction installs, upgrades or removes usr/src/*/dkms.conf (nvidia-open-dkms) or usr/lib/modules/*/extramodules/ (linux-omarchy-nvidia-open). Thus, the decision stays correct when you add or remove a GPU. A check for an NVIDIA PCI device would make the decision incorrect after a GPU change, until the next rebuild.

  • Kernels without the modules: Where nvidia.conf does not exist, a kernel that does not have the NVIDIA modules builds without them. With nvidia.conf, the build of that kernel still fails, for example a stock linux kernel without a DKMS build.

  • No migration: 91-omarchy-initcpio-rebuild.hook (Rebuild boot images on omarchy-settings upgrades only when initramfs inputs change #20287) rebuilds the boot images after the omarchy-settings upgrade that ships this drop-in. It uses omarchy-boot-rebuild, on Limine and on systemd-boot. Thus, machines that need the modules now get them at that upgrade. An earlier version of this PR had a migration for this rebuild. I removed it, because it only used limine-mkinitcpio.

  • Tests: test/shell.d/mkinitcpio-hooks-test.sh has three new cases and one renamed case. fake_platform in test/shell.d/base-test.sh now also makes an aarch64-n1x fixture.

  • Comments and docs: omarchy_hooks.conf, default/settings-runtime-profile and docs/file-layout.md name the new drop-in.

install/hardware/nvidia.sh does not change. install/user/hardware/fix-nouveau-cursor.sh and some migrations use its files as markers. bin/omarchy-provision-hardware uses them as inputs for the first-boot rebuild of images.

Size

The four modules and their firmware add approximately 91 MiB to each image. On the RTX 3090 machine with driver 615.78.08, the image changes from 166 MiB to 257 MiB:

  • The firmware adds 77 MiB to the compressed archive (16.4 MiB to 93.2 MiB).
  • The modules add 14 MiB to the early archive.

This cost applies in these conditions:

  • A machine that had the NVIDIA GPU during installation: no change. Its nvidia.conf already adds the same modules.
  • A machine that got the NVIDIA driver after installation: the new cost. This is the machine that has the lag now.
  • A machine with the NVIDIA driver but no NVIDIA GPU: the new cost, with no use. Examples are a machine with a removed GPU and an eGPU that is not connected. Removal of the driver removes the cost. Today, nvidia.conf keeps this cost after a GPU removal and never removes it.

The kms filter from #6791 does not change. An NVIDIA-only machine still has no nouveau firmware.

Alternative: The drop-in can also require omarchy-hw-nvidia. Then a machine with the driver but no NVIDIA GPU does not get the modules. But when you add the NVIDIA GPU, no rebuild occurs. The driver then loads late until the next kernel update. I think that the size cost is better than this stale state. I can make this change if you prefer it.

Companion change

omacom/omarchy-pkgs must add etc/mkinitcpio.conf.d/nvidia_module.conf to backup+= in pkgbuilds/omarchy-settings/PKGBUILD, next to omarchy_hooks.conf. Then pacman keeps a change that a user makes to the file. This is the opt-out. The companion change must be in the same release as this PR or in an earlier release. It is omacom/omarchy-pkgs#3222 (draft).

Questions for maintainers

  1. Hybrid laptops. A hybrid laptop that got its NVIDIA driver after installation will now load the driver early. This is the same as the installer. Is this acceptable?
  2. Deliberate removal. A user who removed /etc/mkinitcpio.conf.d/nvidia.conf to stop the early load will get the early load again. Their opt-out is a change to nvidia_module.conf.
  3. One source. Must nvidia.sh stop writing /etc/mkinitcpio.conf.d/nvidia.conf in a later PR?
  4. Driver installation. omarchy apply hardware --install-user USER runs install/hardware/nvidia.sh again, which installs the driver and writes nvidia.conf. But the command is hidden, nothing starts it when you add a GPU, and it does not rebuild the initramfs. On the affected machine, the user installed nvidia-open-dkms with pacman. Must Omarchy show this command to users, in a different PR?

Limits

  • Driver version: The new path does not write options nvidia_drm modeset=1. It uses the default of the driver. Drivers 560 and later, which includes 580xx, enable modesetting by default.
  • Surface: surface_device_modules.conf sets MODULES=(...) and sorts after this drop-in. Thus, a Surface with an NVIDIA GPU does not get the early load. This is the same as with nvidia.conf today.
  • Other GPUs: For in-tree drivers, autodetect and the kms filter use the hardware at build time. A GPU change for these drivers needs a rebuild, as before.

Verification

  • bash test/shell.d/mkinitcpio-hooks-test.sh: 47 of 47 pass. Each new case fails when I change the part of the drop-in that it tests:

    • The N1x check.
    • The nvidia_drm check.
    • The full drop-in.
  • ./test/shell with OMARCHY_TEST_USE_LIVE_COMPOSITOR=1 (the headless compositor did not start on this machine): 288 of 290 files pass. bar-drag-test.sh also fails on quattro. config-test.sh read an old local omarchy-pkgs checkout; with OMARCHY_PKGS_PATH at the current omarchy-pkgs master, it passes. boot-initcpio-sync-test.sh passes.

  • Real build on the affected machine (RTX 3090 and Radeon 610M, nvidia-open-dkms 615.78.08, linux-omarchy 7.2.15):

    • I copied /etc/mkinitcpio.conf and all drop-ins to a temporary directory. I removed nvidia.conf and added nvidia_module.conf and the changed omarchy_hooks.conf.
    • I ran MKINITCPIO_CONF=<dir>/mkinitcpio.conf mkinitcpio -k "$(uname -r)" -g <dir>/test.img.
    • The image config has MODULES="nvidia nvidia_modeset nvidia_uvm nvidia_drm thunderbolt". The image contains the four .ko.zst files and the NVIDIA firmware. kms stays, because the machine has an iGPU.
    • For a kernel that does not have the NVIDIA modules, the drop-in adds nothing.
  • Boot result of the early load on the affected machine. I made the repair with the installer's nvidia.conf, which gives the same MODULES:

    Before After
    Hyprland primary GPU amdgpu (iGPU) nvidia-drm
    NVRM: RmImportObject errors approximately 20 each second 0
    EGL (blit) errors in the Hyprland log approximately 1.58 million 0
    Hyprland memory 5.2 GB after 4 days 294 MB
  • No NVIDIA GPU: I read the boot path in the source. The busybox init loads MODULES with modprobe -qab. With no device, nvidia.ko prints NVRM: No NVIDIA GPU found. and returns -ENODEV. The other three modules then fail. The boot continues, and with quiet the console shows no message.

  • Not checked:

    • A boot with only nvidia_module.conf.
    • A boot with the driver and no NVIDIA GPU.
    • N1x, GB10, image builds, a hybrid laptop, and nvidia-580xx-dkms.
    • The prebuilt linux-omarchy-nvidia-open package. I read its PKGBUILD in omarchy-pkgs: it installs into extramodules/.

Screenshots

No visible change in the UI: this PR changes only the initramfs configuration. The Verification section shows the boot result.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no blocking issue was found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issue was found.

Summary

Adds nvidia_module.conf to load installed NVIDIA drivers before the desktop starts.

  • Initramfs builds now load available NVIDIA modules early.

No new actionable issues were found.

Reviews (7) · Last reviewed commit: "Drop the NVIDIA rebuild migration" · Reviewed by Greptile

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Nov 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 7cee234 against quattro. On a worker I reproduced the cause of the bug and tested the fix, I pushed nothing to the branch, and the remaining questions are the maintainer's.

What ran, on a disposable Omarchy worker (x86, virtio GPU, linux-omarchy 7.2.15, linux-omarchy-nvidia-open installed, no nvidia.conf):

  • Real mkinitcpio -k builds. quattro's drop-ins: no NVIDIA modules, 25 MB. This head: all four .ko files plus NVIDIA firmware, MODULES="nvidia nvidia_modeset nvidia_uvm nvidia_drm thunderbolt", 112 MB. Head without nvidia_module.conf: back to none. With an installer-style nvidia.conf as well, the modules are listed once.
  • Installing the package rebuilt the boot image through the usr/lib/modules/*/extramodules/ target of the mkinitcpio pacman hook, as the drop-in's comment says.
  • migrations/1794456546.sh under bash -euo pipefail with a faked NVIDIA PCI device: it rebuilt the UKI (its .initrd holds the four modules), wrote the marker and set reboot-required. A second run and a run without an NVIDIA GPU did nothing.
  • A boot with the modules early-loaded and no NVIDIA GPU, which the PR lists as not checked: nvidia.ko logs NVRM: No NVIDIA GPU found. from the initramfs, boot continues, Hyprland and the shell come up, and no unit fails.
  • ./test/cli passes, on this head and on this head merged with current quattro. The full ./test/shell run has 4 failing files on this head (ascii, branding-about-animation, first-run, runtime-smoke), and all 4 also fail on the merge base. Merged with quattro, provision-owner-keyboard fails too, and it fails on quattro alone. mkinitcpio-hooks-test.sh (46/46) and nvidia-kms-hook-test.sh pass. Each new hooks-test case fails when the part of the drop-in it covers is removed.

The Hyprland primary-GPU result itself needs an NVIDIA card, which a worker doesn't have. It rests on the issue's logs, and on this configuration giving the same MODULES the installer's nvidia.conf gives.

Second opinion: Codex (medium effort) and muse-wonder (via pi, thinking high) reviewed the same head. Independence isn't guaranteed. Both agree the problem is real and the drop-in's sort order and N1x exclusion are sound. Both also argue that keying early loading on the installed driver, rather than on an NVIDIA GPU, is too broad. That is a decision for the maintainer, not a defect in the code, so it is listed below. I checked their other points against the source, and none needs a change here:

  • modinfo with several module names fails when any one of them is missing, so the all-four check holds.
  • On GB10, install/hardware/nvidia.sh already writes nvidia.conf, so the drop-in does nothing there.
  • A detector error doesn't let the modules onto an N1x, because 00-omarchy-hooks.conf stops the build first.

Two smaller points are noted, and neither is specific to this PR. First, the migration's [[ -f $module_conf ]] || exit 0 marks it done if omarchy updates before omarchy-settings carries the drop-in, which is the same pattern as 1786605598.sh. Second, limine-mkinitcpio ignores a failed UKI deployment, so the mkinitcpio failed for kernel check can't see one, which 1793989240.sh shares.

For the maintainer to decide:

This waits on the maintainer.

Comment thread test/shell.d/mkinitcpio-hooks-test.sh Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

Greptile's review of the modinfo stub in test/shell.d/mkinitcpio-hooks-test.sh was right: line 35 put $# -gt 4 inside [[ ]], and AGENTS.md keeps numeric tests in (( )). I pushed ba14bf6, which moves the count into (( $# > 4 )) and changes nothing else. The stub still returns 1 for four arguments, a wrong kernel, or a missing module, and 0 for five or more arguments with a known module.

Re-run on a disposable Omarchy worker at ba14bf6: ./test/cli passes, mkinitcpio-hooks-test.sh 46/46 and nvidia-kms-hook-test.sh 9/9. With linux-omarchy-nvidia-open installed and no nvidia.conf, real mkinitcpio builds give the same result as before. quattro's drop-ins build a 25 MB image with no NVIDIA driver modules. This head builds a 112 MB image with nvidia, nvidia_modeset, nvidia_uvm, nvidia_drm and six firmware files. Without nvidia_module.conf it is back to 25 MB with none.

Codex (medium effort) and muse-wonder (via pi, thinking high) reviewed the commit and found nothing. Both confirmed that it behaves exactly as the old line did and that no other line in this PR breaks the same rule. Independence isn't guaranteed.

Nothing else moved. The three decisions in my previous comment are still the maintainer's: what turns early loading on, the nvidia.conf opt-out, and the overlap with #8263 and #16848. This waits on the maintainer.

@danbunnell

Copy link
Copy Markdown
Author

Thank you for the review, the tests and the style fix in ba14bf6.

I agree that the maintainer must decide the policy. I also agree that #8263, #16848 and this PR need one policy. This comment gives one more fact for that decision, a proposal and a correction.

#8263 causes this bug again on desktops

omarchy-hw-nvidia-only-display in #8263 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. The machine in #18599 has an RTX 3090 and the Radeon 610M, and the monitor is on the RTX 3090. #8263 removes nvidia.conf on this machine. Then nvidia_drm loads late, Hyprland makes the iGPU its primary GPU, and the full desktop is slow. This is the bug in #18599.

The statement "a hybrid machine gets early KMS from its iGPU" is correct for the LUKS prompt. But it is not sufficient for Hyprland when the monitor is on the NVIDIA GPU. Thus, "hybrid" is not the correct condition to stop early loading.

From its description, #16848 acts only when the NVIDIA GPU has no display connectors. It does not change a desktop that has its monitor on the NVIDIA GPU.

Proposal for one policy

  1. One owner. One drop-in makes the early-load decision, for example nvidia_module.conf. install/hardware/nvidia.sh and the migrations stop writing or removing nvidia.conf. Then a later change of policy is a change to one file.
  2. Early load when the NVIDIA GPU drives a display. This includes NVIDIA-only machines and desktops with the monitor on the NVIDIA GPU. It is also correct when the driver comes after installation, which is this PR.
  3. No early load when the NVIDIA GPU drives no display. This is the laptop case in Stop early-loading the NVIDIA driver on hybrid GPU machines so hibernation can resume #8263 and Drop the NVIDIA early KMS stack on hybrid laptops whose dGPU drives no display #16848: the panel and all ports are on the iGPU. The connector check in Drop the NVIDIA early KMS stack on hybrid laptops whose dGPU drives no display #16848 is a better condition than "hybrid".
  4. Hibernation. Machines in item 2 need early loading and also need resume. Removal of early loading is not a fix for them. Hibernate resume fails (nv_pmops_freeze → -EIO) on single-NVIDIA-GPU desktops — initramfs nvidia load blocks the resume hook #10039 has this failure on an NVIDIA-only desktop. In Hibernation resume fails on hybrid Intel+NVIDIA laptops — nvidia.sh's early-KMS module bundling races the resume hook #8352, @softerdk keeps early loading and unloads the NVIDIA modules before the resume hook. That approach, or a similar one, can fix resume for item 2.

Items 3 and 4 read the hardware at build time. A GPU change then has effect at the next rebuild. Today, nvidia.conf from the installer has the same limit.

I can change this PR to follow the policy that you select. If you prefer, I can also make the change for item 1 in a different PR.

Correction to question 4

Question 4 says that Omarchy has no command that installs the NVIDIA driver after you add a GPU. This is not correct. omarchy apply hardware --install-user USER runs install/hardware/nvidia.sh again. That script installs the driver and writes nvidia.conf. But the command is hidden, nothing starts it when you add a GPU, and it does not rebuild the initramfs. Thus, it is a manual workaround and not a replacement for this PR. I changed question 4 in the description.

I will not open the omarchy-pkgs companion change until you select the policy.

@omarchybot

Copy link
Copy Markdown
Collaborator

The head is still ba14bf6, so the worker results in my earlier comments stand. This covers the new comment above. I checked its claims against the code, and Codex (medium effort) and muse-wonder (via pi, thinking high) checked the same. Both agreed with each point below. Independence isn't guaranteed.

I did not check the hibernation point (item 4, #10039 and #8352).

None of this changes the code under review. The decisions in my first comment are still the maintainer's: what turns early loading on, the nvidia.conf opt-out, and one policy across this PR, #8263 and #16848. The proposal above is one answer to the first and the third. This waits on the maintainer.

@omarchybot

Copy link
Copy Markdown
Collaborator

Classification at the unchanged head ba14bf6 is now unsettled. My review, GPT-6 in Codex (effort not exposed), classifies the failure in #18599 as a bug; the configured classifier, deepseek-v4p1-flash (effort not reported), returned enhancement. The earlier agreed classification was recorded against the preceding commit.

I checked the current diff, linked issue, latest comments and review, base-branch rules, and the existing worker logs. Greptile reports no new findings. No code changed and no tests ran in this pass; the previous worker results remain evidence for the head and base they tested.

This waits on the maintainer to resolve the classification and the existing decisions about early loading, the nvidia.conf opt-out, and the policy shared with #8263 and #16848.

@danbunnell

Copy link
Copy Markdown
Author

This comment gives the facts for the classification and the open decisions in one place. If you agree with each recommendation below, this PR needs no more changes.

Classification: bug

For the user, this is a defect in a configuration that Omarchy supports, not a new function:

  • Omarchy ships the NVIDIA driver in its own repository (linux-omarchy-nvidia-open), and omarchy apply hardware installs nvidia-open-dkms through install/hardware/nvidia.sh.
  • When the driver comes after installation, the full desktop is slow in all windows. Hyprland uses the iGPU as its primary GPU and copies each frame to the NVIDIA output. On the affected machine, Hyprland used 5.2 GB of memory after 4 days. NVIDIA driver loads late when you add the GPU or its driver after installation #18599 has the logs.
  • No update repairs this. Each initramfs rebuild leaves out the NVIDIA modules.
  • The installer prevents this failure on machines that have the NVIDIA GPU during installation. This PR gives the same result to machines that get the driver later. It adds no new user-facing function.

Companion change

omacom/omarchy-pkgs#3222 adds nvidia_module.conf to backup when the source ships it. It is a draft, because it has an effect only after this PR merges.

Decisions

# Decision Options Recommendation Change to this PR
1 What turns early loading on (a) The NVIDIA modules are installed for the kernel (this PR).
(b) (a), and an NVIDIA PCI GPU is present (omarchy-hw-nvidia).
(a). With (b), a GPU that you add after the driver loads late until the next kernel update. (a) costs approximately 90 MB per image only on machines that keep the driver with no NVIDIA GPU. (a): none. (b): one line in the drop-in.
2 Hibernation (#8352, #10039) (a) Same as the installer today. Fix resume in a different PR, for example with the approach from @softerdk in #8352.
(b) No early load when HOOKS contains resume.
(a). With (b), a desktop with hibernation and the monitor on the NVIDIA GPU keeps the lag from #18599. (a): none. (b): one condition in the drop-in.
3 Hybrid machines (#8263, #16848) (a) Keep early loading when the NVIDIA GPU has display outputs. #16848 removes the modules when it has none. It sorts after this drop-in, so it already works with this PR.
(b) No early loading on each machine that also has a non-NVIDIA display controller (#8263).
(a). (b) also stops early loading on desktops with an iGPU in the CPU, which causes #18599 again. (a): none. (b): this PR is not necessary.
4 Opt-out for a user who removed nvidia.conf (a) Edit nvidia_module.conf. omacom/omarchy-pkgs#3222 keeps the edit on upgrade.
(b) A separate opt-out file.
(a). It uses the pacman backup function and adds no new mechanism. (a): none. (b): a new file check.
5 One owner for the decision (a) Later: install/hardware/nvidia.sh stops writing nvidia.conf, in a different PR.
(b) Now, in this PR.
(a). Other code uses nvidia.conf as a marker (fix-nouveau-cursor.sh, migrations, omarchy-provision-hardware). (a): none. (b): more files and more risk.

One fact for decision 2: a machine that got the driver after installation, and that uses hibernation, has the lag today but resume works. With this PR, the lag stops but resume fails, as on machines from the installer. A fix for resume is necessary for both groups. Thus, I recommend fixing it in one place, not here.

If you select a different option, tell me the number and the letter, and I will change this PR.

@danbunnell
danbunnell force-pushed the nvidia-display-early-kms branch from ba14bf6 to 6544d48 Compare November 22, 2026 12:39
Comment thread migrations/1794456546.sh Resolved
@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Nov 22, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

I read 661ef24 against quattro, the linked issue and comments, and the base branch’s migration rules and runner. The new missing-settings check exits 75, which the runner leaves pending for a later retry. This was a source review by GPT-6 in Codex (effort not exposed); no tests ran and no code changed in this pass. Earlier worker results remain evidence for their original head and base.

My classification is bug: the late-installed driver misses the early-loading configuration the installer supplies. The configured classifier, deepseek-v4p1-flash (effort not reported), returned no usable class for this head, so classification remains unsettled. No substantive second-opinion review ran. This waits on classification review and the maintainer’s early-loading and opt-out policy decisions.

@danbunnell danbunnell changed the title Load the NVIDIA driver early when the GPU or its driver comes after installation Stop the desktop lag when the NVIDIA driver comes after installation Nov 22, 2026
danbunnell and others added 4 commits November 28, 2026 03:59
…nstallation

install/hardware/nvidia.sh writes /etc/mkinitcpio.conf.d/nvidia.conf only
during installation. Without it, nvidia_drm loads late, Hyprland can make
another GPU its primary GPU, and the full desktop is slow. No initramfs
rebuild repairs this, because the kms hook does not add out-of-tree modules.

nvidia_module.conf adds the four NVIDIA modules at each initramfs build where
modinfo finds them for the kernel, except on N1x. It reads no removable
hardware, so it stays correct when a GPU is added or removed. A migration
rebuilds the initramfs one time on machines with an NVIDIA GPU that need it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
AGENTS.md keeps numeric tests out of [[ ]]. Raised by Greptile's review.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Exit 75 when the machine needs the rebuild but omarchy-settings does not ship
nvidia_module.conf yet, so the migration stays pending instead of being
marked done. Machines without an NVIDIA GPU, or with nvidia.conf, still skip
it without waiting.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
91-omarchy-initcpio-rebuild.hook (omacom#20287) rebuilds the boot images after an
omarchy-settings upgrade that changes /etc/mkinitcpio.conf.d/*.conf, through
omarchy-boot-rebuild on Limine and systemd-boot. The upgrade that ships
nvidia_module.conf is such a change, so the one-time rebuild happens without a
migration. The migration only called limine-mkinitcpio, so it also missed
systemd-boot machines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@danbunnell
danbunnell force-pushed the nvidia-display-early-kms branch from 661ef24 to b3458ac Compare November 28, 2026 09:04
@danbunnell

Copy link
Copy Markdown
Author

I rebased this PR on quattro d019047 and removed the migration (b3458ac).

  • Why: 91-omarchy-initcpio-rebuild.hook from Rebuild boot images on omarchy-settings upgrades only when initramfs inputs change #20287 rebuilds the boot images after an omarchy-settings upgrade that changes /etc/mkinitcpio.conf.d/*.conf. It uses omarchy-boot-rebuild, on Limine and on systemd-boot (Boot through systemd-boot, with snapshot boot and restore #19667). The upgrade that ships nvidia_module.conf is such a change. Thus, the one-time rebuild occurs without a migration. The migration only used limine-mkinitcpio, so it did not work on systemd-boot machines.
  • Rebuild on driver changes: On systemd-boot, Omarchy's 90-mkinitcpio-install.hook has the same triggers as the mkinitcpio hook, including usr/src/*/dkms.conf and usr/lib/modules/*/extramodules/. Thus, the drop-in comment stays correct.
  • Conflicts: docs/file-layout.md (next to omarchy_mount_events) and the PATH line in compose() in mkinitcpio-hooks-test.sh. I kept both sides.
  • Tests: mkinitcpio-hooks-test.sh 47/47, boot-initcpio-sync-test.sh 11/11. In ./test/shell, 288 of 290 files pass. bar-drag-test.sh also fails on quattro. config-test.sh passes against the current omarchy-pkgs master.

The PR now changes six files and no migration. The decisions in my earlier comment do not change.

@omarchybot omarchybot added the bug Something isn't working label Nov 28, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

The new head removes the Limine-only migration. I traced the settings-upgrade hook to the shared boot rebuild command for Limine and systemd-boot. With the NVIDIA driver installed and no installer nvidia.conf, real initramfs builds on a disposable Omarchy worker contained zero NVIDIA modules on quattro, all four on this head, and zero again without the new drop-in. The image grew from about 24 MiB to 98 MiB.

The CLI suite and both initramfs test files passed. Three files failed in the full shell suite. All three also failed when checked on quattro, with the audio-panel test failing a different assertion there. The GitHub Tests workflow is awaiting approval.

I reviewed the change in Codex (GPT-6.2 Sol, high effort). Opus 5.5 High and muse-wonder (via pi, high effort) agreed on the cause and the rebuild path. The reviewers may have seen the same reasoning. A maintainer decision remains on early loading for hybrid or offload-only systems, including hibernation and preserving edits to the drop-in across upgrades. Packaging companion #3222

Could a maintainer with the affected dual-GPU setup confirm GPU selection on b3458ace975551e890450d14fa05cc8e5686adbf? On a system with the NVIDIA driver installed and no installer nvidia.conf, install the pinned drop-in at /etc/mkinitcpio.conf.d/nvidia_module.conf, run sudo omarchy-boot-rebuild, reboot, and check which GPU Hyprland selected as primary. The worker uses a virtual GPU. Drop-in at the tested commit

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NVIDIA driver loads late when you add the GPU or its driver after installation

2 participants