After the last update, nvidia-open-dkms fails to build against the latest kernel. It works for the LTS one.
$ sudo dkms autoinstall -k 7.0.5-1-cachyos
Sign command: /usr/lib/modules/7.0.5-1-cachyos/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Autoinstall of module nvidia/595.71.05 for kernel 7.0.5-1-cachyos (x86_64)
Building module(s)...................(bad exit status: 2)
Failed command:
'make' -j24 IGNORE_PREEMPT_RT_PRESENCE=1 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=7.0.5-1-cachyos modules LLVM=1
Error! Bad return status for module build on kernel: 7.0.5-1-cachyos (x86_64)
Consult /var/lib/dkms/nvidia/595.71.05/build/make.log for more information.
Autoinstall on 7.0.5-1-cachyos succeeded for module(s) gigabyte-laptop-wmi vboxhost.
Autoinstall on 7.0.5-1-cachyos failed for module(s) nvidia(10).
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
had the same issue, had to downgrade my kernel and header to 7.0.3-1
also had to downgrade the llvm too. seems to be compilor issue.
this was the error I faced :
tail -n 80 /var/lib/dkms/nvidia/595.71.05/build/make.log
>>> referenced by nvidia.o:(.rela.text+0x399cd3)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x399d72)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a072)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a175)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a1d8)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a1fd)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a20c)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a28f)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a2f9)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a343)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a35a)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a4a6)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a526)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a5e6)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a666)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a6e6)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a7e6)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a8a6)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39a969)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39abc9)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39af17)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39af7b)
ld.lld: warning: relocation refers to a discarded section:
>>> referenced by nvidia.o:(.rela.text+0x39b03b)
BTF [M] nvidia.ko
make[4]: *** [/usr/lib/modules/7.0.5-1-cachyos/build/Makefile:2043: modules] Error 2
make[3]: *** [/usr/lib/modules/7.0.5-1-cachyos/build/Makefile:248: __sub-make] Error 2
make[3]: Leaving directory '/var/lib/dkms/nvidia/595.71.05/build/kernel-open'
make[2]: *** [Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/usr/lib/modules/7.0.5-1-cachyos/build'
make[1]: *** [Makefile:115: modules] Error 2
make[1]: Leaving directory '/var/lib/dkms/nvidia/595.71.05/build/kernel-open'
make: *** [Makefile:59: modules] Error 2
# exit code: 2
# elapsed time: 00:00:58
----------------------------------------------------------------
This was the fix :
sudo pacman -U
/var/cache/pacman/pkg/linux-cachyos-7.0.3-1-x86_64_v3.pkg.tar.zst
/var/cache/pacman/pkg/linux-cachyos-headers-7.0.3-1-x86_64_v3.pkg.tar.zst
loading packages...
warning: downgrading package linux-cachyos (7.0.5-1 => 7.0.3-1)
warning: downgrading package linux-cachyos-headers (7.0.5-1 => 7.0.3-1)
resolving dependencies...
looking for conflicting packages...
Packages (2) linux-cachyos-7.0.3-1 linux-cachyos-headers-7.0.3-1
Total Installed Size: 301.88 MiB
Net Upgrade Size: -2.11 MiB
:: Proceed with installation? [Y/n]
(2/2) checking keys in keyring [----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(2/2) checking package integrity [----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(2/2) loading package files [----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(2/2) checking for file conflicts [----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(2/2) checking available disk space [----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
:: Running pre-transaction hooks...
(1/3) Removing linux initcpios...
(2/3) Remove DKMS modules
(3/3) Rotate snapshots before system upgrade
[snaprotate] Sat May 9 05:34:40 AM IST 2026: Starting snapshot rotation
[snaprotate] Sat May 9 05:34:40 AM IST 2026: Checking snapshot subvolumes...
[snaprotate] Sat May 9 05:34:40 AM IST 2026: Creating snapshot directory structure
ERROR: Could not create subvolume: File exists
error: command failed to execute correctly
:: Processing package changes...
(1/2) downgrading linux-cachyos [----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(2/2) downgrading linux-cachyos-headers [----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Updating module dependencies...
(3/4) Install DKMS modules
==> dkms install --no-depmod nvidia/595.71.05 -k 7.0.3-1-cachyos
Error! Bad return status for module build on kernel: 7.0.3-1-cachyos (x86_64)
Consult /var/lib/dkms/nvidia/595.71.05/build/make.log for more information.
==> WARNING: `dkms install --no-depmod nvidia/595.71.05 -k 7.0.3-1-cachyos' exited 10
(4/4) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux-cachyos.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-cachyos -g /boot/initramfs-linux-cachyos.img
==> Starting build: '7.0.3-1-cachyos'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [kms]
-> Running build hook: [keyboard]
-> Running build hook: [block]
-> Running build hook: [lvm2]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> ERROR: module not found: 'nvidia'
==> ERROR: module not found: 'nvidia_modeset'
==> ERROR: module not found: 'nvidia_uvm'
==> ERROR: module not found: 'nvidia_drm'
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-cachyos.img'
==> WARNING: errors were encountered during the build. The image may not be complete.
error: command failed to execute correctly
sudo pacman -U \
/var/cache/pacman/pkg/llvm-22.1.3-2-x86_64_v3.pkg.tar.zst \
/var/cache/pacman/pkg/lld-22.1.3-1.1-x86_64_v3.pkg.tar.zst \
/var/cache/pacman/pkg/compiler-rt-22.1.3-1.1-x86_64_v3.pkg.tar.zst \
/var/cache/pacman/pkg/llvm-libs-22.1.3-2-x86_64_v3.pkg.tar.zst
loading packages...
warning: downgrading package llvm (22.1.5-2 => 22.1.3-2)
warning: downgrading package lld (22.1.5-1.1 => 22.1.3-1.1)
warning: downgrading package compiler-rt (22.1.5-1.1 => 22.1.3-1.1)
warning: downgrading package llvm-libs (22.1.5-2 => 22.1.3-2)
resolving dependencies...
looking for conflicting packages...
Packages (4)
compiler-rt-22.1.3-1.1
lld-22.1.3-1.1
llvm-22.1.3-2
llvm-libs-22.1.3-2
Total Installed Size: 339.08 MiB
Net Upgrade Size: -1.23 MiB
:: Proceed with installation? [Y/n]
(4/4) checking keys in keyring
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(4/4) checking package integrity
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(4/4) loading package files
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(4/4) checking for file conflicts
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(1/4) checking available disk space
[----------------------------------------c o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o ] 25%
(4/4) checking available disk space
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Rotate snapshots before system upgrade
[snaprotate] Sat May 9 05:40:35 AM IST 2026: Starting snapshot rotation
[snaprotate] Sat May 9 05:40:35 AM IST 2026: Checking snapshot subvolumes...
[snaprotate] Sat May 9 05:40:35 AM IST 2026: Creating snapshot directory structure
ERROR: Could not create subvolume: File exists
error: command failed to execute correctly
:: Processing package changes...
(1/4) downgrading llvm-libs
[Co o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o ] 0%
(1/4) downgrading llvm-libs
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(2/4) downgrading llvm
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(3/4) downgrading lld
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(4/4) downgrading compiler-rt
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
sudo rm -rf /var/lib/dkms/nvidia
sudo pacman -S nvidia-open-dkms
warning: nvidia-open-dkms-595.71.05-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1)
nvidia-open-dkms-595.71.05-1
Total Installed Size: 121.02 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(1/1) checking package integrity
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(1/1) loading package files
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(1/1) checking for file conflicts
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
(1/1) checking available disk space
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
:: Running pre-transaction hooks...
(1/2) Remove upgraded DKMS modules
(2/2) Rotate snapshots before system upgrade
[snaprotate] Sat May 9 05:41:05 AM IST 2026: Starting snapshot rotation
[snaprotate] Sat May 9 05:41:05 AM IST 2026: Checking snapshot subvolumes...
[snaprotate] Sat May 9 05:41:05 AM IST 2026: Creating snapshot directory structure
ERROR: Could not create subvolume: File exists
error: command failed to execute correctly
:: Processing package changes...
(1/1) reinstalling nvidia-open-dkms
[----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Install DKMS modules
==> dkms install --no-depmod nvidia/595.71.05 -k 7.0.3-1-cachyos
==> depmod 7.0.3-1-cachyos
(3/3) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux-cachyos.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-cachyos -g /boot/initramfs-linux-cachyos.img
==> Starting build: '7.0.3-1-cachyos'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [kms]
-> Running build hook: [keyboard]
-> Running build hook: [block]
-> Running build hook: [lvm2]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-cachyos.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
1m4s →
First check whether the old kernel packages are still in your pacman cache.
Run:
ls /var/cache/pacman/pkg | grep "linux-cachyos-7.0.3"
and:
ls /var/cache/pacman/pkg | grep "linux-cachyos-headers-7.0.3"
also check if the old LLVM packages are still cached:
ls /var/cache/pacman/pkg | grep "llvm-22.1.3"
ls /var/cache/pacman/pkg | grep "lld-22.1.3"
ls /var/cache/pacman/pkg | grep "compiler-rt-22.1.3"
ls /var/cache/pacman/pkg | grep "llvm-libs-22.1.3"
This also works for those on the older nvidia-580xx-open-dkms, follow the solution above and just replace nvidia-open-dkms with nvidia-580xx-open-dkms.
The same thing applies to bcachefs-dkms aswell. I landed in emergency shell at boot (both mainline and lts kernel) I had to build a custom cachyos live iso with bcachefs support to be able to chroot into my system in the first place. My approach from there was a bit different, i just did sudo pacman -S linux linux-headers and boot from the regular arch kernel (which is still 7.0.3)
after going through the logs, and other people’s input on the issue on various forums,
I think it’s mainly the new lld version that fails, causing problems building modules. Hope they fix it soon.