OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
boot-kernel medium occasional DISPUTE

Out-of-tree and DKMS modules on linux-omarchy: build against linux-omarchy-headers, not kernel.org or Arch sources

omarchydkmsliminenvidiaamdapple
CORRECTED An auditor found the fix wrong or incomplete and rewrote it. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

Confirmed on this machine: linux-omarchy 7.2.5-3 build/.config has CONFIG_INTEL_IOMMU_DEFAULT_ON=y and CONFIG_ARCH_MMAP_RND_BITS=32, linux 7.2.3-arch1-3 has it unset and 28. build/vmlinux is owned by linux-omarchy-headers 7.2.5-3 and readelf shows intact .BTF and .BTF_ids, the cached headers package is present under the exact filename the fix uses, and /usr/bin/dkms line 1287 prints the quoted header error with an 'Error!' prefix. Issue 12119 holds the iMac18,3 retraction exactly as described (ahmadtv, 2026-09-23). Issue 12856 has the BTF error text and the maintainer's 'cannot reproduce', and that reporter ran pacman -Qkk against linux-omarchy rather than the headers package, which supports the record's 'locally damaged headers file' reading. Issue 12281's comment names 0512-sound-fixes.patch. 1789444024.sh exists on quattro and matches the cause. One defect: step 2 built a hand-made module against $(uname -r), but a reader whose module hangs linux-omarchy is debugging from the stock linux kernel, so that builds for the wrong kernel again. The fix and verify now name the target kernel explicitly. Not exercised: no module was built.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

Forcing a mismatched module in with modprobe --force-vermagic can crash the kernel or corrupt data. Do not use it to get past a version mismatch. Keep the stock linux entry available until a hand-built module is proven on linux-omarchy.

Symptom

One of these after moving to the linux-omarchy kernel:

  • A module you compiled yourself (a patched amdgpu, a Wi-Fi or touchpad driver) loads, its version string matches, and the machine hangs early in boot or black-screens before the LUKS prompt. The same module rebuilt for stock linux worked.
  • DKMS refuses to build:

Error! Your kernel headers for kernel 7.2.5-3-omarchy cannot be found at /usr/lib/modules/7.2.5-3-omarchy/build or /usr/lib/modules/7.2.5-3-omarchy/source.
  • The DKMS build compiles every object, then fails at the BTF step:

libbpf: failed to get e_shstrndx from /usr/lib/modules/7.2.5-3-omarchy/build/vmlinux
Failed to parse base BTF '/usr/lib/modules/7.2.5-3-omarchy/build/vmlinux': -4001
make[5]: *** [.../Makefile.modfinal:52: nvidia.ko] Error 255

Cause

linux-omarchy is its own kernel build. It carries patches the stock Arch kernel does not (issue 12281 traces a speaker regression to pkgbuilds/linux-omarchy/0512-sound-fixes.patch) and a different .config. On this workstation linux-omarchy 7.2.5-3 has CONFIG_INTEL_IOMMU_DEFAULT_ON=y and CONFIG_ARCH_MMAP_RND_BITS=32 where linux 7.2.3-arch1-3 has the option unset and 28. A module built from plain kernel.org 7.2.5 sources can carry a matching version string, so modprobe accepts it, while its view of kernel structures differs from the running kernel. The issue 12119 reporter found exactly that on an iMac18,3 and withdrew an earlier IOMMU diagnosis once they tested the two causes apart.

DKMS builds against /usr/lib/modules/<version>/build, which only exists when the matching linux-omarchy-headers is installed. Migration 1789325478.sh installs the headers, and migration 1789444024.sh adds them on installs where an earlier path skipped them, but that second migration is blocked if the first one failed.

The BTF failure (issue 12856) means the vmlinux under build/ is truncated on that machine. vmlinux belongs to linux-omarchy-headers, not linux-omarchy, and the Omarchy kernel maintainer could not reproduce it. On this workstation the same 7.2.5-3 file has intact .BTF and .BTF_ids sections, so a locally damaged headers file is the likely cause (not confirmed).

Fix

**1. Headers must match the kernel exactly.**


pacman -Q linux-omarchy linux-omarchy-headers     # same version on both lines
ls -l /usr/lib/modules/7.2.5-3-omarchy/build      # must exist

Use the version ls /usr/lib/modules/ shows for the -omarchy kernel. If headers are missing, install them, then let DKMS build for that kernel:


sudo pacman -S --needed linux-omarchy-headers
pacman -Q linux-omarchy linux-omarchy-headers     # versions must still match
sudo dkms autoinstall -k 7.2.5-3-omarchy
dkms status

If the versions differ, the sync database is newer than the installed kernel. Run omarchy update to bring both to the same version instead.

**2. Hand-built modules: build against the Omarchy kernel's own tree**, never against a kernel.org or Arch source checkout. Name the kernel explicitly, because you may be booted into stock linux while debugging, and $(uname -r) would then target the wrong kernel:


make -C /usr/lib/modules/7.2.5-3-omarchy/build M="$PWD" modules

If a driver project only offers "build against kernel X.Y sources", use its DKMS package instead, so it rebuilds against linux-omarchy-headers on every kernel update.

**3. BTF error: check the headers package, then reinstall it from the cache** (installing from the sync database could pull headers newer than the installed kernel):


readelf -S /usr/lib/modules/7.2.5-3-omarchy/build/vmlinux | grep BTF
pacman -Qkk linux-omarchy-headers
sudo pacman -U /var/cache/pacman/pkg/linux-omarchy-headers-7.2.5-3-x86_64.pkg.tar.zst
sudo dkms autoinstall -k 7.2.5-3-omarchy

Use the version pacman -Q linux-omarchy reports. A healthy vmlinux lists .BTF and .BTF_ids and readelf prints no Error: line.

**4. Rebuild the UKI** if the module is in the initramfs (NVIDIA early KMS, for example):


sudo limine-mkinitcpio linux-omarchy

Verify

dkms status shows installed for the -omarchy kernel. modinfo -k 7.2.5-3-omarchy -F vermagic <module> begins with 7.2.5-3-omarchy (use your -omarchy version). The machine boots linux-omarchy with the module loaded (uname -r ends in -omarchy and lsmod | grep <module> lists it).

Sources

out-of-tree-module-on-linux-omarchy-wrong-source-or-headers