Score:1

v4l2loopback module failing on Ubuntu 20.04

ph flag

I am trying a new web camera on a workstation that hitherto had no video capture devices attached. It should be plug-and-play but none of the programmes is able to find the camera once connected.

First I checked whether the kernel itself was identifying the camera:

$ lsusb
[...]
Bus 001 Device 007: ID 046d:082d Logitech, Inc. HD Pro Webcam C920
[...]

So there is a camera, it must be a software thing. Checking connected devices with video for Linux gives one more clue:

$ v4l2-ctl --list-devices
Cannot open device /dev/video0, exiting.

Looked like the kernel module was disabled, so I tried to start it up:

$ sudo modprobe v4l2loopback
modprobe: FATAL: Module v4l2loopback not found in directory /lib/modules/5.4.0-81-generic

Odd, the module was not even installed. I then pulled it from the packages and gave it another try:

$ sudo aptitude install v4l2loopback-dkms
[...]

$ sudo modprobe v4l2loopback
modprobe: ERROR: could not insert 'v4l2loopback': Unknown symbol in module, or unknown parameter (see dmesg)

And this is what I found among the messages:

$ dmesg
[...]
[1271004.074955] v4l2loopback: Unknown symbol video_ioctl2 (err -2)
[1271004.075027] v4l2loopback: Unknown symbol v4l2_ctrl_handler_init_class (err -2)
[1271004.075105] v4l2loopback: Unknown symbol video_devdata (err -2)
[1271004.075167] v4l2loopback: Unknown symbol v4l2_ctrl_new_custom (err -2)
[1271004.075221] v4l2loopback: Unknown symbol video_unregister_device (err -2)
[1271004.075276] v4l2loopback: Unknown symbol video_device_alloc (err -2)
[1271004.075336] v4l2loopback: Unknown symbol v4l2_device_register (err -2)
[1271004.075410] v4l2loopback: Unknown symbol __video_register_device (err -2)
[1271004.075463] v4l2loopback: Unknown symbol v4l2_ctrl_handler_free (err -2)
[1271004.075513] v4l2loopback: Unknown symbol v4l2_device_unregister (err -2)
[1271004.075562] v4l2loopback: Unknown symbol video_device_release (err -2)

I believe this means some software dependencies are missing. But which? There is a discussion at GitHub in a cloud context, but the solution is too general (install all extra package modules available).

David avatar
cn flag
According to Logitech, the C920S HD Pro works very well with standard VOIP programs, such as Skype, Discord, and others. Thanks to Linux kernel developers, most Logitech webcam works very well, and there is no requirement to install any third-party drivers to get it running. BUT this comment is from May 2020 and may not be true with 20.04
Luís de Sousa avatar
ph flag
This camera works well with other Ubuntu computers, but not this one.
David avatar
cn flag
I think you just proved the point not with 20.04
Score:1
ph flag

After some more searching I noticed something odd, none of the extra kernel modules was actually installed on this system:

$ aptitude search linux-modules-extra*
[...]
p   linux-modules-extra-5.4.0-70-generic                                                              - Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
p   linux-modules-extra-5.4.0-71-generic                                                              - Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
p   linux-modules-extra-5.4.0-72-generic                                                              - Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
p   linux-modules-extra-5.4.0-73-generic                                                              - Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
p   linux-modules-extra-5.4.0-74-generic                                                              - Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
p   linux-modules-extra-5.4.0-77-generic                                                              - Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
p   linux-modules-extra-5.4.0-80-generic                                                              - Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
c   linux-modules-extra-5.4.0-81-generic                                                              - Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP 

That being an obvious culprit, I installed the package and gave it another try:

$ sudo aptitude install linux-modules-extra-5.4.0-81-generic
[...]

$ sudo modprobe v4l2loopback

$ v4l2-ctl --list-devices
Dummy video device (0x0000) (platform:v4l2loopback-000):
    /dev/video0

Albeit that brought the module back to life, the web camara remains invisible to the software. But that is another question.

Gerd avatar
in flag
Did you try to call `v4l2-ctl --list-devices` without loading `v4l2loopback`. On my system (which is Linux Mint 20.2) the `v4l2loopback` module was only needed when I wanted to create a virtual device for my webcam (Logitech HD Pro Webca 920) but nor for normal operation.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.