Repair a DKMS driver that did not rebuild after a kernel update
The generic DKMS mechanism in the record holds, and I confirmed the pieces on this machine. /usr/share/libalpm/hooks/70-dkms-upgrade.hook and 70-dkms-install.hook drive the rebuild, dkms status reports nvidia/610.57.04, 7.1.9-arch1-2, x86_64: installed, and reading /usr/bin/dkms (3.4.3) confirms dkms autoinstall and dkms autoinstall -k "$(uname -r)" are both valid: the autoinstall branch calls have_one_kernel, which bans --all and defaults to the running kernel. The man page on this machine confirms dkms remove [module/module-version] [-k kernel/arch] [--all], so that command is right too. The make.log path is right for a failed build: dkms writes it to the build dir and only moves it to <kernel>/<arch>/log/make.log after a successful install (/usr/bin/dkms line 1708). Three defects, and the first two are severe. First, sudo mkinitcpio -P writes no new boot image on Omarchy 4, which makes the whole fix a no-op on the distro the record claims to cover. Confirmed here: /etc/mkinitcpio.d contains zero entries, mkinitcpio takes its presets from that directory (/usr/bin/mkinitcpio line 25 sets _d_presets to /etc/mkinitcpio.d), and the stock kernel hook is replaced by /etc/pacman.d/hooks/90-mkinitcpio-install.hook, which calls /usr/share/libalpm/scripts/limine-mkinitcpio-install to write a UKI at /boot/EFI/Linux/omarchy_linux.efi. /usr/local/bin/mkinitcpio, shipped by limine-mkinitcpio-hook and ahead of /usr/bin in PATH, warns that -P does not update Limine boot entries and then prompts interactively, which is useless in a chroot with no tty. The Arch wiki Limine page says to run limine-mkinitcpio instead of mkinitcpio. Second, the danger tells the user to keep linux-lts installed as a fallback boot entry, and the fix tells them to boot the previous kernel from the bootloader menu. Neither exists on a stock Omarchy 4 install. limine-list on this machine prints one kernel entry under Omarchy, a Snapshots submenu with two btrfs snapshots, and an EFI fallback line which is the removable UEFI boot path, not a kernel. /etc/limine-entry-tool.d/omarchy-defaults.conf sets ENABLE_LIMINE_FALLBACK=yes but never sets MKINITCPIO_FALLBACK, which is what the Arch wiki Limine page says controls fallback image generation, so no fallback initramfs entry is produced. A user who follows the danger believes they have a way back and does not, which on a record about losing your desktop is the defect that matters. The real Omarchy 4 recovery is a btrfs snapshot from the Limine menu. Third, the cited GitHub issue is wrong twice over. https://github.com/basecamp/omarchy/issues/7947 returns a bare 404 and does not redirect (curl -I shows 404 text/plain while the repo root 301s to omacom). Read in full through gh issue view 7947 -R omacom/omarchy, the issue is titled "nvidia.sh fails on Pascal GPUs (MX150): nvidia-580xx-dkms and lib32-nvidia-580xx-utils not found" and is about the Omarchy installer being unable to find AUR packages. It says nothing about DKMS failing to rebuild after a kernel update, so it does not support this record at all. It belongs on nvidia-590-drops-pascal-broken-desktop instead, and I have added it there. I found no upstream issue that does support this record, so the corrected record rests on the two Arch wiki pages plus what is verifiable on the machine. Also corrected: the symptom and danger both assume sudo pacman -Syu, which /usr/bin/omarchy-update-pacman-guard refuses on Omarchy 4 (I read the script, it aborts when both -S and -u are present unless OMARCHY_ALLOW_DIRECT_PACMAN=1). Not exercised: I have no sudo here, so I did not run dkms, mkinitcpio, limine-mkinitcpio or depmod, and I did not induce a failed rebuild. I could not read /boot, which is a vfat ESP mounted dmask=0077, so the UKI filename comes from the limine-entry-tool config (CUSTOM_UKI_NAME="omarchy") and from limine-list rather than from a directory listing. Severity critical and frequency very-common are both left unchanged: every DKMS user meets this eventually and the result is no desktop.
Never run pacman -Sy <pkg> to grab headers. That is a partial upgrade and will break the system. Always pacman -Syu, and on Omarchy 4 use omarchy update, because a direct pacman -Syu is refused by /usr/bin/omarchy-update-pacman-guard.
If a kernel update and a driver update land in the same transaction, do not reboot until dkms status shows the module built for the NEW kernel.
A stock Omarchy 4 install has no second kernel and no fallback initramfs entry, so there is nothing to fall back to. limine-list shows one entry per installed kernel plus a Snapshots submenu, and the EFI fallback line is the removable UEFI boot path, not a kernel. The recovery that does work is a btrfs snapshot from the Limine menu. If you want a second kernel to boot into, you have to create it, for example with sudo pacman -S --needed linux-lts linux-lts-headers followed by sudo limine-mkinitcpio, and then confirm with limine-list that the entry exists before you rely on it.
On Omarchy 4, sudo mkinitcpio -P reports no error and writes no image, because /etc/mkinitcpio.d holds no presets. Treat a rebuild that finishes instantly with no output as a failure, and run sudo limine-mkinitcpio.
Symptom
After a system upgrade (omarchy update on Omarchy 4, sudo pacman -Syu on plain Arch) and a reboot you land in a TTY or a black screen. nvidia-smi says NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver, modprobe nvidia reports Module nvidia not found in directory /lib/modules/<version>, and dkms status shows the module built only for the *old* kernel.
Cause
DKMS rebuilds out-of-tree modules on kernel upgrade, driven by the pacman hooks /usr/share/libalpm/hooks/70-dkms-upgrade.hook and 70-dkms-install.hook. It fails quietly when the matching *-headers package for the kernel you booted is missing, when the build errors out against a new kernel API, or when the pacman transaction was interrupted. The rebuild failure scrolls past in the pacman output and is easy to miss. Omarchy 4 adds a second way to land here with a module that did build fine: the machine boots a Unified Kernel Image written by limine-mkinitcpio-install, not a plain initramfs, so a module rebuilt by hand and followed by mkinitcpio -P never reaches the image the machine actually boots.
Fix
From a TTY:
uname -r
dkms status
**1. Install headers for EVERY kernel you have installed.**
sudo pacman -S --needed linux-headers
# plus, as applicable:
# sudo pacman -S --needed linux-lts-headers linux-zen-headers linux-hardened-headers
**2. Rebuild the modules for the running kernel.**
sudo dkms autoinstall
# ...or for a specific kernel:
sudo dkms autoinstall -k "$(uname -r)"
If the build still fails, read the log dkms names in its error output. A failed build leaves it at /var/lib/dkms/nvidia/<version>/build/make.log, and a successful one moves it to /var/lib/dkms/nvidia/<version>/<kernel>/x86_64/log/make.log. A driver too old for the kernel is the usual cause, so upgrade nvidia-open-dkms (or the AUR legacy branch, for Maxwell, Pascal and Volta cards) before rebooting into the new kernel.
**3. Clear out stale builds and refresh the module map.**
sudo dkms status # note old versions
sudo dkms remove nvidia/<old-version> --all
sudo depmod -a "$(uname -r)"
**4. Rebuild the boot image.** This step differs by distro and skipping the difference is what leaves you booting the old modules:
# Omarchy 4: the machine boots a UKI at /boot/EFI/Linux/omarchy_linux.efi,
# written by limine-mkinitcpio-install. /etc/mkinitcpio.d is EMPTY, so
# `mkinitcpio -P` has no presets to process and silently builds nothing.
sudo limine-mkinitcpio
# Plain Arch, where kernel packages drop a preset in /etc/mkinitcpio.d:
sudo mkinitcpio -P
reboot
**If you have no console at all**, the recovery path depends on the distro:
- **Omarchy 4**: reboot and pick a btrfs snapshot from the Limine menu's Snapshots submenu. Run
limine-listbeforehand, while you still can, to see what is there. - **Plain Arch**: boot another installed kernel from the bootloader menu, or boot a live USB and
arch-chrootinto the install, then repeat the steps above.
Verify
dkms status shows installed for the running kernel. modinfo nvidia | head -3 prints a version. nvidia-smi prints a driver version and lists your GPU. On Omarchy 4, limine-list shows a boot entry for the kernel you rebuilt against.