omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

[Enhancement] Auto-detect NVIDIA 580xx users & enforce DKMS + mkinitcpio MODULES during omarchy-update

Open lukejmorrison opened this issue 9 months ago • 3 comments

Enhancement request

After surviving the 3.4.x kernel bump (see #4781), the root cause was crystal clear:

  • nvidia-*-utils installed but no *-dkms package → mkinitcpio fails silently → emergency mode with /boot vfat unknown + missing modules.

Proposed fix (tiny & fully Oma-friendly):

  • In omarchy-update: if any nvidia-*-utils is present, auto-run omarchy-pkg-install nvidia-*-dkms (or prompt).
  • Auto-append the four modules (nvidia nvidia_modeset nvidia_uvm nvidia_drm) to MODULES=() in /etc/mkinitcpio.conf (with timestamped backup).
  • Always force limine-mkinitcpio after any kernel change.

Zero breaking changes, respects existing hooks (omarchy_hooks.conf), and eliminates the #1 NVIDIA Pascal complaint.

Hardware example: Intel i7-5930K, ASUS X99-E, NVIDIA GTX 1070 Ti (580xx), LUKS/Btrfs/Limine. My fix path (worked perfectly):

  • omarchy-pkg-install nvidia-580xx-dkms
  • Ensure MODULES line + limine-mkinitcpio
  • Pre-update snapshot + reboot + omarchy-update

Happy to open a PR with the exact diff if wanted. Cross-ref: #4781 #4192 #3954.

lukejmorrison avatar Mar 01 '26 00:03 lukejmorrison

Cross-link for full context: the exact repro + fix path (nvidia-580xx-dkms install + prep script + reboot) that solved the emergency-mode boot is in the original report here -> #4781 (and my earlier comment with logs).\nThis enhancement would have prevented the whole issue automatically. Happy to help test or PR the guardrail!

lukejmorrison avatar Mar 01 '26 01:03 lukejmorrison

prepare-omarchy-update-nvidia-safe.sh

Field-tested helper script from this incident (shared in case useful for upstream design/testing):

/home/luke/dev/Omarchy/scripts/prepare-omarchy-update-nvidia-safe.sh

What it does:

  • Creates snapshot first (omarchy-snapshot create) and prints rollback target ID.
  • Ensures /etc/mkinitcpio.conf has MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm).
  • Creates timestamped backup before editing.
  • Rebuilds initramfs via limine-mkinitcpio when available (falls back to mkinitcpio -P).
  • Verifies NVIDIA module files (nvidia*.ko*) exist for current kernel before allowing update.
  • Hard-stops with actionable remediation if modules are missing.

Scope/safety notes:

  • Uses official Omarchy flows (omarchy-snapshot, omarchy-update, Omarchy package recommendation).
  • No edits outside intended config path.
  • Current package remediation is tuned to Pascal/580xx (nvidia-580xx-dkms), which could be generalized by branch detection if adopted upstream.

Observed result on this hardware:

  • Intel i7-5930K + ASUS X99-E + GTX 1070 Ti (Pascal), LUKS/Btrfs/Limine.
  • After nvidia-580xx-dkms install + UKI rebuild, update path stabilized and completed normally.

lukejmorrison avatar Mar 01 '26 01:03 lukejmorrison

Everytime there is kernel bump I dread the omarchy update because of this - and it looks I am not the only one.

gregid avatar Apr 10 '26 17:04 gregid