V4l2loopback fails to load

Hi,

I’m working on a Jetson Orin AGX that has a Rogue carrier board from CTI. I’m using JetPack 5.1.2 and I’ve been having the following issue.

When I try to create a virtual v4l2 device by loading the v4l2loopback module to the kernel it always fail.
I’ve followed the instructions that are available on the following forum post: https://forums.developer.nvidia.com/t/jetpack-4-2-1-building-v4l2loopback-fails/79201/2

I’ve tried multiple methods for installing the v4l2loopback modules but whenever I try to load the module I see the following messages

ocu@ocuRR:~$ sudo modprobe v4l2loopback video_nr=20
modprobe: ERROR: could not insert 'v4l2loopback': Invalid argument

dmesg

[ 4444.367764] v4l2loopback: disagrees about version of symbol video_devdata
[ 4444.367990] v4l2loopback: Unknown symbol video_devdata (err -22)
[ 4444.368192] v4l2loopback: disagrees about version of symbol video_unregister_device
[ 4444.368419] v4l2loopback: Unknown symbol video_unregister_device (err -22)
[ 4444.368629] v4l2loopback: disagrees about version of symbol video_device_alloc
[ 4444.368836] v4l2loopback: Unknown symbol video_device_alloc (err -22)
[ 4444.369038] v4l2loopback: disagrees about version of symbol v4l2_device_register
[ 4444.369245] v4l2loopback: Unknown symbol v4l2_device_register (err -22)
[ 4444.369439] v4l2loopback: disagrees about version of symbol __video_register_device
[ 4444.369681] v4l2loopback: Unknown symbol __video_register_device (err -22)
[ 4444.369867] v4l2loopback: disagrees about version of symbol v4l2_device_unregister
[ 4444.370729] v4l2loopback: Unknown symbol v4l2_device_unregister (err -22)
[ 4444.371741] v4l2loopback: disagrees about version of symbol video_device_release
[ 4444.372861] v4l2loopback: Unknown symbol video_device_release (err -22)

And yes, videodev is also loaded and working

[    0.417314] videodev: Linux video capture interface: v2.00

Do you know what could be the issue?

On addition to that, this exact same module with the exact same building process does work on a Jetson Orin Nano. It’s not working only on the Orin AGX

Hi,
Please try the steps:
Gstreamer v4l2loopback hw mjpeg stream - #5 by Honey_Patouceul

Hi,

I was trying to follow the steps mentioned in the forum post you shared but I ran into the following errors when building v4l2loopback

root@ocuRR:/usr/src# dkms build -m v4l2loopback/0.12.5

Creating symlink /var/lib/dkms/v4l2loopback/0.12.5/source ->
                 /usr/src/v4l2loopback-0.12.5

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j8 KERNELRELEASE=5.10.120-tegra KERNEL_DIR=/lib/modules/5.10.120-tegra/build all...(bad exit status: 2)
ERROR (dkms apport): binary package for v4l2loopback: 0.12.5 not found
Error! Bad return status for module build on kernel: 5.10.120-tegra (aarch64)
Consult /var/lib/dkms/v4l2loopback/0.12.5/build/make.log for more information.

I checked the make.log and I saw the following message

root@ocuRR:/usr/src# cat /var/lib/dkms/v4l2loopback/0.12.5/build/make.log
DKMS make.log for v4l2loopback-0.12.5 for kernel 5.10.120-tegra (aarch64)
Wed Sep 18 10:11:02 EDT 2024
Building v4l2-loopback driver...
make -C /lib/modules/5.10.120-tegra/build M=/var/lib/dkms/v4l2loopback/0.12.5/build modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.120-tegra-ubuntu20.04_aarch64/kernel-5.10'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

make[1]: *** [Makefile:750: include/config/auto.conf] Error 1
make[1]: Leaving directory '/usr/src/linux-headers-5.10.120-tegra-ubuntu20.04_aarch64/kernel-5.10'
make: *** [Makefile:43: v4l2loopback.ko] Error 2
root@ocuRR:/usr/src# 

I tried executing the command mentioned in the make.log but I got the following error

root@ocuRR:/usr/src/linux-headers-5.10.120-tegra-ubuntu20.04_aarch64/kernel-5.10# make oldconfig && make prepare
drivers/video/Kconfig:27: can't open file "drivers/video/tegra/Kconfig"
make[1]: *** [scripts/kconfig/Makefile:71: oldconfig] Error 1
make: *** [Makefile:633: oldconfig] Error 2

Is this related to the content of the git repository thay I just cloned?
How can I get the “binary package for v4l2loopback”?

Hi,
We can successfully run the steps on Jetpack 5.1.4 and 6.2. You may upgrade and check again. Please ensure all commands are executed.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.