You are not logged in.
Pages: 1
Trying to add v4l2loopback to my manually built kernel 6.10.5. Compilation goes well and the module is installed in `/lib/modules/6.10.5/updates` but when trying to add it get this
$ sudo modprobe v4l2loopback exclusive_caps=1
modprobe: ERROR: could not insert 'v4l2loopback': Invalid argument
$ sudo dmesg | tail
[ +15.654583] [Fri Sep 13 01:30:38 2024] BPF: 32_NOTE_MASK type_id=13 bits_offset=8352
[ +0.000006] [Fri Sep 13 01:30:38 2024] BPF:
[ +0.000001] [Fri Sep 13 01:30:38 2024] BPF: Invalid name
[ +0.000001] [Fri Sep 13 01:30:38 2024] BPF:
[ +0.000002] [Fri Sep 13 01:30:38 2024] failed to validate module [v4l2loopback] BTF: -22This had happened to me before when compiling against bad headers, but I think I have the right ones this time.
Offline
Your tail lacks context, post the entire dmesg or at least enough context to cover the entire failure.
General question, is there a particular reason for the self compiled kernel, how did you self compile it, did you use the "Arch way" and use proper packages? Why do you "think I have the right headers this time"? Evidence suggests you don't.
Last edited by V1del (2024-09-05 19:19:37)
Offline
That is the entire context of the dmesg, here you can see with timestamps starting 30 minutes before the failed modprobe.
Sep 05 20:29:41 forkchoice kernel: iwlwifi 0000:00:14.3: WFPM_UMAC_PD_NOTIFICATION: 0x20
Sep 05 20:29:41 forkchoice kernel: iwlwifi 0000:00:14.3: WFPM_LMAC2_PD_NOTIFICATION: 0x1f
Sep 05 20:29:41 forkchoice kernel: iwlwifi 0000:00:14.3: WFPM_AUTH_KEY_0: 0x90
Sep 05 20:29:41 forkchoice kernel: iwlwifi 0000:00:14.3: CNVI_SCU_SEQ_DATA_DW9: 0x0
Sep 05 20:29:41 forkchoice kernel: iwlwifi 0000:00:14.3: RFIm is deactivated, reason = 5
Sep 05 21:03:51 forkchoice kernel: BPF: 32_NOTE_MASK type_id=13 bits_offset=8352
Sep 05 21:03:51 forkchoice kernel: BPF:
Sep 05 21:03:51 forkchoice kernel: BPF: Invalid name
Sep 05 21:03:51 forkchoice kernel: BPF:
Sep 05 21:03:51 forkchoice kernel: failed to validate module [v4l2loopback] BTF: -22Evidence suggests you don't.
Because from reading the Makefile and the output of make I see the right directories with my kernel sources entering (redacted to remove path prefix only)
$ make
++++++ To sign the module, you must set KBUILD_SIGN_KEY/KBUILD_SIGN_CERT to point to the signing key/certificate!
++++++ For your convenience, we try to read these variables as 'mok_signing_key' resp. 'mok_certificate' from /etc/dkms/framework.conf
++++++ If your certificate requires a password, pass it via the KBUILD_SIGN_PIN env-var!
++++++ E.g. using 'export KBUILD_SIGN_PIN; read -s -p "Passphrase for signing key : " KBUILD_SIGN_PIN; sudo --preserve-env=KBUILD_SIGN_PIN make sign'
Building v4l2-loopback driver...
make -C /lib/modules/`uname -r`/build M=/home/path/video-drivers/v4l2loopback KCPPFLAGS="-DSNAPSHOT_VERSION='"0.13.2"'" modules
make[1]: Entering directory '/home/path/kernel/linux-6.10.5'
CC [M] /home/path/video-drivers/v4l2loopback/v4l2loopback.o
MODPOST /home/path/video-drivers/v4l2loopback/Module.symvers
CC [M] /home/path/video-drivers/v4l2loopback/v4l2loopback.mod.o
LD [M] /home/path/video-drivers/v4l2loopback/v4l2loopback.ko
BTF [M] /home/path/video-drivers/v4l2loopback/v4l2loopback.ko
make[1]: Leaving directory '/home/path/kernel/linux-6.10.5'
make -C utils V4L2LOOPBACK_SNAPSHOT_VERSION=0.13.2
make[1]: Entering directory '/home/path/video-drivers/v4l2loopback/utils'
cc -I.. -DSNAPSHOT_VERSION='"0.13.2"' -c -o v4l2loopback-ctl.o v4l2loopback-ctl.c
cc v4l2loopback-ctl.o -o v4l2loopback-ctl
make[1]: Leaving directory '/home/path/video-drivers/v4l2loopback/utils'And the path to the kernel there is what's linked from the modules directory on the currently running kernel
$ ls -l /lib/modules/6.10.5/build
lrwxrwxrwx 1 root root 48 Aug 14 21:40 /lib/modules/6.10.5/build -> /home/path/kernel/linux-6.10.5EDIT: forgot to answer the general question, in this XPS 13+ I have had to compile my own kernel for ages due to lack of upstream support for the Intel IPU drivers and I found it simpler to compile manually the drivers than having to deal with ad-hoc DKMS solutions by community members. This has worked fine across many kernels until now in 6.10 there's supposed to be upstream support for the IPU drivers so I wanted to test it. As for how did I self compile it
$ make oldconfig
$ make menuconfig
$ make
$ make modules
$ sudo make modules_install
$ sudo cp arch/x86/boot/bzImage /boot/vmlinuz-6.10.5
$ sudo mkinitcpio -k 6.10.5 -g /boot/initramfs-6.10.5.imgLast edited by potuz (2024-09-06 00:21:42)
Offline
Is `CONFIG_DEBUG_INFO_BTF_MODULES` enabled and if so have you installed /usr/lib/modules/`uname -a`/build/tools/bpf/resolve_btfids/resolve_btfids as in https://gitlab.archlinux.org/archlinux/ … heads#L150? Is `CONFIG_MODULE_ALLOW_BTF_MISMATCH` disabled/unset?
Last edited by loqs (2024-09-06 14:54:56)
Offline
Is `CONFIG_DEBUG_INFO_BTF_MODULES` enabled and if so have you installed /usr/lib/modules/`uname -a`/build/tools/bpf/resolve_btfids/resolve_btfids as in https://gitlab.archlinux.org/archlinux/ … heads#L150? Is `CONFIG_MODULE_ALLOW_BTF_MISMATCH` disabled/unset?
Thanks for getting back to me.
$ ls -l /usr/lib/modules/6.5.1/build/tools/bpf/resolve_btfids/resolve_btfids
-rwxr-xr-x 1 potuz potuz 1856416 Sep 4 2023 /usr/lib/modules/6.5.1/build/tools/bpf/resolve_btfids/resolve_btfids
$ grep BTF .config
CONFIG_DEBUG_INFO_BTF=y
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
CONFIG_DEBUG_INFO_BTF_MODULES=y
# CONFIG_MODULE_ALLOW_BTF_MISMATCH is not set
CONFIG_PROBE_EVENTS_BTF_ARGS=yI have the binary in place, and I have debug symbols up but not allowing BTF mismatches, since I am compiling the driver from source I don't see why I should allow for btf mismatches as I am compiling against the current kernel headers.
EDIT: the date though is a bit weird, could it be that this was installed by some native ARCH package on that directory instead?
Nevermind, that was the output for 6.5.1, the right one is there for 6.10.5
Last edited by potuz (2024-09-09 16:50:00)
Offline
Pages: 1