Installing kernel module from AUR fails

I have nct6687d-dkms-git installed, and I already used it. However since the latest update, it stopped working:

sudo modprobe nct6687
modprobe: FATAL: Module nct6687 not found in directory /lib/modules/5.16.9-zen1-1-zen

So I tried reinstalling it with paru -S nct6687d-dkms-git. However, I get the error:

==> dkms install --no-depmod nct6687d-dkms-git/r30.4f00ace -k 5.16.9-zen1-1-zen
Error!  Build of nct6687.ko failed for: 5.16.9-zen1-1-zen (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory, or consult make.log in the build directory
/var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build for more information.
==> WARNING: `dkms install --no-depmod nct6687d-dkms-git/r30.4f00ace -k 5.16.9-zen1-1-zen' exited 7
==> ERROR: Missing 5.15.24-1-lts kernel modules tree for module nct6687d-dkms-git/r30.4f00ace.

Have you tried with the mainline kernel and/or LTS?

Yes, same problem with mainline.

Try clean building and reinstalling the package.

From what i understand, this would work with paru --rebuild nct6687d-dkms-git, right? Doing this leads to the exact same result.

What does the

say?

$ cat make.log
DKMS make.log for nct6687d-dkms-git-r30.4f00ace for kernel 5.16.9-zen1-1-zen (x86_64)
Fr 18. Feb 11:17:25 CET 2022
rm -rf /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen
mkdir -p /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen
cp /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/Makefile /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/nct6687.c /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen
cd /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen
make -C /lib/modules/5.16.9-zen1-1-zen/build M=/var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen modules
make[1]: Warnung: Kein Jobserver verfügbar: -j1 wird gesetzt. Fügen Sie der Ursprungsregel
„+“ hinzu.
make[1]: Verzeichnis „/usr/lib/modules/5.16.9-zen1-1-zen/build“ wird betreten
  CC [M]  /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen/nct6687.o
  MODPOST /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen/Module.symvers
  CC [M]  /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen/nct6687.mod.o
  LD [M]  /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen/nct6687.ko
  BTF [M] /var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build/5.16.9-zen1-1-zen/nct6687.ko
make[1]: Verzeichnis „/usr/lib/modules/5.16.9-zen1-1-zen/build“ wird verlassen

Did you try dkms autoinstall ?

There’s no error shown here.

Do you have any unmerged pacnew? Did you make any other changes to your system that you haven’t told us about?

$ sudo dkms autoinstall
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/nct6687d-dkms-git/r18.24f3a0f/source/dkms.conf does not exist.

source is a link to /usr/src/nct6687d-dkms-git-r18.24f3a0f, but that folder does not exist. What does exist, is /usr/src/nct6687d-dkms-git-r30.4f00ace

I just checked pacdiff, and there was nothing related.

I compiled and installed the tkg-kernel from git, but the problem also occurs when I don’t use it.

What does ls -l /var/lib/dkms/nct6687d-dkms-git/ return?

ls -l /var/lib/dkms/nct6687d-dkms-git/
insgesamt 4
lrwxrwxrwx 1 root root 32 11. Sep 22:18 kernel-5.10.63-1-lts-x86_64 -> r18.24f3a0f/5.10.63-1-lts/x86_64
drwxr-xr-x 1 root root 38 15. Okt 00:27 r18.24f3a0f
drwxr-xr-x 1 root root 22 18. Feb 11:17 r30.4f00ace

Also note my addition to the last post (I edited right at the moment when you answered)

Now that I see it, I remember, that I also removed the lts-kernel because I didn’t need it anymore. The fact that the link points to it is probably causing problems.

1 Like

I’d remove the package, clean out any references to it that linger on disk, then rebuild and reinstall it.

Try this:
Delete the r18.24f3a0f folder, then dkms autoinstall

… and what @jonathon says :stuck_out_tongue:

1 Like

I already tried removing it with paru -Rns, but that didn’t help.

sudo dkms autoinstall
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/vhba-module/20210418/source/dkms.conf does not exist.

Building module:
cleaning build area...
make -j12 KERNELRELEASE=5.16.9-zen1-1-zen TARGET=5.16.9-zen1-1-zen KERNEL_BUILD=/usr/lib/modules/5.16.9-zen1-1-zen/build...
Error!  Build of nct6687.ko failed for: 5.16.9-zen1-1-zen (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory, or consult make.log in the build directory
/var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build for more information.

The folder /var/lib/dkms/vhba-module/20210418/source is a dead link to /usr/src/vhba-module-20210418. That folder doesn’t exist, instead there is /usr/src/vhba-module-20211218 existing.

Looks like your DKMS setup got very broken at some point.

Remove as much DKMS stuff as you can, clean out /var/lib/dkms, and reinstall the various packages.

There is yet another module preventing dkms autoinstall from doing its job.

What’s the output of dkms status ?

Did you try to uninstall the package you try to make working?
Are you sure you know the state of your installation as of now?

I uninstalled all dkms modules, removed everything in /var/lib/dkms, and installed the modules again.

While installing, I got ==> ERROR: Missing 5.15.24-1-lts kernel modules tree for module errors.

So I installed LTS kernel again (why do I need to have it installed?!), and the installation worked without errors. The installation of nct6687d-dkms-git still failed, though.

$ dkms status
nct6687d-dkms-git/r30.4f00ace: added
Deprecated feature: REMAKE_INITRD
v4l2loopback/0.12.5, 5.15.24-1-lts, x86_64: installedDeprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD

v4l2loopback/0.12.5, 5.16.10-246-tkg-pds, x86_64: installedDeprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD

v4l2loopback/0.12.5, 5.16.9-arch1-1, x86_64: installedDeprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD

v4l2loopback/0.12.5, 5.16.9-zen1-1-zen, x86_64: installedDeprecated feature: REMAKE_INITRD

vhba-module/20211218, 5.15.24-1-lts, x86_64: installed
vhba-module/20211218, 5.16.10-246-tkg-pds, x86_64: installed
vhba-module/20211218, 5.16.9-arch1-1, x86_64: installed
vhba-module/20211218, 5.16.9-zen1-1-zen, x86_64: installed (WARNING! Diff between built and installed module!)

But at least dkms autoinstall throws less errors now:

$ sudo dkms autoinstall
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD

Building module:
cleaning build area...
make -j12 KERNELRELEASE=5.16.9-zen1-1-zen TARGET=5.16.9-zen1-1-zen KERNEL_BUILD=/usr/lib/modules/5.16.9-zen1-1-zen/build...
Error!  Build of nct6687.ko failed for: 5.16.9-zen1-1-zen (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory, or consult make.log in the build directory
/var/lib/dkms/nct6687d-dkms-git/r30.4f00ace/build for more information.

Did you try to uninstall the package you try to make working?

yes.

Are you sure you know the state of your installation as of now?

No, I’m very confused about what is going on.