You are not logged in.

#1 2023-08-16 16:43:39

Bueysito_Diablo
Member
Registered: 2023-08-16
Posts: 3

depmod fails for a single module

Hi there,

I've been using modules/dkms for quite some time, zero problems until now. Thing is, all in a sudden, one of the modules (https://aur.archlinux.org/packages/rtl88x2bu-dkms-git) now fails while running depmod (in my case, "depmod 6.4.10-arch1-1"). For unknown (at least, to me) reasons, depmod is looking for kernel headers in an incorrect (and older) directory, /lib/modules/6.2.5-arch1-1, instead of looking into the correct one, which is /lib/modules/6.4.10-arch1-1 .

Funny thing is that this only happens with this module, since I've got other modules and they work flawlessly with 6.4.10 kernel. Furthermore, this module was working before upgrading to 6.4.10, so I know that the module is fine. Lastly, I've got a second arch linux machine at home with the same hardware and kernel (6.4.10) and the module just works/depmods perfectly in that other machine.

As for the logs, here's /var/log/pacman.log :

[2023-08-16T18:12:38+0200] [PACMAN] Running 'pacman -U --config /etc/pacman.conf -- /home/vt/.cache/yay/rtl88x2bu-dkms-git/rtl88x2bu-dkms-git-5.13.1.r189.12cfcd8-1-x86_64.pkg.tar.zst'
[2023-08-16T18:12:39+0200] [ALPM] running '70-dkms-upgrade.hook'...
[2023-08-16T18:12:40+0200] [ALPM-SCRIPTLET] ==> dkms remove --no-depmod rtl88x2bu/5.13.1.r189.12cfcd8 -k 6.4.10-arch1-1
[2023-08-16T18:12:40+0200] [ALPM] transaction started
[2023-08-16T18:12:40+0200] [ALPM] reinstalled rtl88x2bu-dkms-git (5.13.1.r189.12cfcd8-1)
[2023-08-16T18:12:40+0200] [ALPM] transaction completed
[2023-08-16T18:12:40+0200] [ALPM] running '30-systemd-update.hook'...
[2023-08-16T18:12:40+0200] [ALPM] running '70-dkms-install.hook'...
[2023-08-16T18:12:40+0200] [ALPM-SCRIPTLET] ==> dkms install --no-depmod rtl88x2bu/5.13.1.r189.12cfcd8 -k 6.4.10-arch1-1
[2023-08-16T18:13:29+0200] [ALPM-SCRIPTLET] ==> depmod 6.4.10-arch1-1
[2023-08-16T18:13:31+0200] [ALPM-SCRIPTLET] ==> ERROR: Missing 6.2.5-arch1-1 kernel headers for module rtl88x2bu/5.13.1.r189.12cfcd8.
[2023-08-16T18:13:31+0200] [PACMAN] Running 'pacman -D -q --asexplicit --config /etc/pacman.conf -- rtl88x2bu-dkms-git'

Deleting/reinstalling the linux-headers package won't help either... whatever is going on here, it seems that it only affects that particular package/module.

thanks for your time,

Offline

#2 2023-08-16 16:52:21

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: depmod fails for a single module

That's not depmod throwing the error, it's dkms.

It appears to be building fine for 6.4.10, then it tries 6.2.5-arch1-1. Why do you still have that dir in /usr/lib/modules/?

Offline

#3 2023-08-16 18:11:59

Bueysito_Diablo
Member
Registered: 2023-08-16
Posts: 3

Re: depmod fails for a single module

Scimmia wrote:

That's not depmod throwing the error, it's dkms.

It appears to be building fine for 6.4.10, then it tries 6.2.5-arch1-1. Why do you still have that dir in /usr/lib/modules/?


Yes, it builds correctly for 6.4.10, then looks for the symbols in 6.2.5's directory. No idea why (and no idea why this does happen *only* with that module, while others are working perfectly fine).

As for the /lib/modules directory still containing directories for older kernels, it has always been so: everytime the kernel is upgraded, the lib/modules/... directory remains there. Mostly empty, but remains there nonetheless.

I haven't tried manually deleting those directories, though. Kinda ugly if you ask me, but who knows, perhaps would it do the job?

Offline

#4 2023-08-16 18:39:16

loqs
Member
Registered: 2014-03-06
Posts: 18,930

Re: depmod fails for a single module

Bueysito_Diablo wrote:

No idea why (and no idea why this does happen *only* with that module, while others are working perfectly fine).

Please provide a list of the other modules.

Bueysito_Diablo wrote:

As for the /lib/modules directory still containing directories for older kernels, it has always been so: everytime the kernel is upgraded, the lib/modules/... directory remains there. Mostly empty, but remains there nonetheless.

What exactly is left behind?  If you remove all the DKMS packages then perform a kernel update is the directory still left?

Bueysito_Diablo wrote:

I haven't tried manually deleting those directories, though. Kinda ugly if you ask me, but who knows, perhaps would it do the job?

Please do test removing /usr/lib/modules/6.2.5-arch1-1 or moving it out of /usr/lib.

Offline

#5 2023-08-16 21:28:06

Bueysito_Diablo
Member
Registered: 2023-08-16
Posts: 3

Re: depmod fails for a single module

loqs wrote:

Please do test removing /usr/lib/modules/6.2.5-arch1-1 or moving it out of /usr/lib.


That one did the trick... I had directories left at /lib/modules/ all the way down to 5.x kernels... worth two or more years of kernel upgrades. Don't know why they aren't removed after a kernel upgrade, though.

No idea why that module (rtl88x2bu) was looking into 6.2.5-arch1-1 when the rest of the system's dkms-managed modules (vmware-workstation and nvidia dkms graphic drivers) built perfectly fine against 6.4.10-arch1-1... but the moment I manually removed those leftover directories under /lib/modules leaving only the 6.4.10-arch1-1 directory, the rtl88 module built successfully against it.

I'd have liked to learn what was exactly happening here with DKMS and the rtl88 module, but oh well, at least the problem is fixed and I can use the module again!

thanks,

Last edited by Bueysito_Diablo (2023-08-16 21:29:29)

Offline

#6 2023-08-16 23:06:04

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: depmod fails for a single module

You're still not getting it. This module built fine against 6.4.10-arch1-1, too, there was no real problem here. It was just also trying to build for another, old kernel because of the leftover junk in that dir.

Offline

Board footer

Powered by FluxBB