Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modprobe v4l2loopback fails on Ubuntu Server 14.04 LTS #59

Closed
HD1080ide opened this issue May 12, 2014 · 25 comments
Closed

modprobe v4l2loopback fails on Ubuntu Server 14.04 LTS #59

HD1080ide opened this issue May 12, 2014 · 25 comments

Comments

@HD1080ide
Copy link

HD1080ide commented May 12, 2014

Hello,

I could successfully install v4l2loopback on Ubuntu Dekstop 14.04 LTS running in a virtual machine on my pc. Now I want to install v4l2loopback on a Ubuntu Server 14.04 LTS (Amazon ec2). The commands "sudo make" and "sudo make install" seem to work fine. But "sudo modprobe v4l2loopback" fails:

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

Output of "dmesg v4l2loopback":

[7470017.077809] v4l2loopback: module verification failed: signature and/or  required key missing - tainting kernel
[7470017.077845] v4l2loopback: Unknown symbol video_ioctl2 (err 0)
[7470017.077882] v4l2loopback: Unknown symbol video_devdata (err 0)
[7470017.077894] v4l2loopback: Unknown symbol video_unregister_device (err 0)
[7470017.077903] v4l2loopback: Unknown symbol video_device_alloc (err 0)
[7470017.077914] v4l2loopback: Unknown symbol v4l2_device_register (err 0)
[7470017.077927] v4l2loopback: Unknown symbol __video_register_device (err 0)
[7470017.077932] v4l2loopback: Unknown symbol v4l2_device_unregister (err 0)
[7470017.077935] v4l2loopback: Unknown symbol video_device_release (err 0)
[7470554.397149] v4l2loopback: Unknown symbol video_ioctl2 (err 0)
[7470554.397191] v4l2loopback: Unknown symbol video_devdata (err 0)
[7470554.397204] v4l2loopback: Unknown symbol video_unregister_device (err 0)
[7470554.397213] v4l2loopback: Unknown symbol video_device_alloc (err 0)
[7470554.397224] v4l2loopback: Unknown symbol v4l2_device_register (err 0)
[7470554.397236] v4l2loopback: Unknown symbol __video_register_device (err 0)
[7470554.397241] v4l2loopback: Unknown symbol v4l2_device_unregister (err 0)
[7470554.397245] v4l2loopback: Unknown symbol video_device_release (err 0)

Maybe there is a package missing?

@yukkeorg
Copy link

I think your kernel compiled without V4L2 functions.
Please check your kernel compile parameters.

@umlaeute
Copy link
Owner

either you have forgot to run depmod -a or yukkeorg is right

@HD1080ide
Copy link
Author

Thank you for the answers. I think that is has something to do with Amazon EC2. I will now try to create a custom AMI for EC2 based on my virtualbox image. Maybe it will work.

@fabamatic
Copy link

Having the same issue. Did you manage to fix it in any way?

@HD1080ide
Copy link
Author

No. I was not able to create a custom AMI baded on a virtual box image. For some reason the instance didn't boot. Now, I want to try to rebuilt the kernel with the correct options for v4l2 support. But I am busy now with another project. Maybe in some weeks.

@HD1080ide
Copy link
Author

I have found a very easy solution:

sudo apt-get install linux-generic
sudo apt-get install v4l2loopback-dkms
sudo modprobe v4l2loopback

Now, there shouldn't be any error.

@amit13091992
Copy link

@umlaeute your answer saved me buddy. But after i insert this module in my kernel, what should i do next, plz help, m total new to this...

@juniavp
Copy link

juniavp commented Dec 12, 2017

I'm still getting this error on sudo modprobe v4l2loopback...
modprobe: ERROR: could not insert 'v4l2loopback': Unknown symbol in module, or unknown parameter (see dmesg)

@umlaeute
Copy link
Owner

@juniavp make sure that videodev is loaded before v4l2loopback

@juniavp
Copy link

juniavp commented Dec 12, 2017

Hi, thanks for replying! Could you please provide more details? I tried doing this but it didn't work either.

$ sudo modprobe videodev
modprobe: FATAL: Module videodev not found in directory /lib/modules/4.4.0-1041-aws

@umlaeute
Copy link
Owner

well that probably explains it.
your kernel has been compiled without v4l2 support. (which kind of makes sense on an AWS instance)

@KeisukeNagakawa
Copy link

hi, then is it difficult to run on ec2-ubuntu? is there any way to make videodev work right?

@umlaeute
Copy link
Owner

umlaeute commented Mar 25, 2018

compile your own kernel?

@lddd
Copy link

lddd commented Mar 28, 2018

Same problem here right now :/

~$ sudo modprobe videodev
modprobe: FATAL: Module videodev not found in directory /lib/modules/4.4.0-1052-aws

and make install from the git repo results into

$ sudo make install
make -C /lib/modules/uname -r/build M=/home/ubuntu/v4l2loopback modules_install
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-1052-aws'
INSTALL /home/ubuntu/v4l2loopback/v4l2loopback.ko
At main.c:222:

  • SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
  • SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
    sign-file: certs/signing_key.pem: No such file or directory
    DEPMOD 4.4.0-1052-aws
    make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-1052-aws'

file: certs/signing_key.pem: No such file or directory ???

@kareemn
Copy link

kareemn commented Apr 24, 2018

@lddd I got around the missing signing cert issue by using dkms:

sudo apt-get install dkms
git clone https://github.com/umlaeute/v4l2loopback.git
cd v4l2loopback
sudo cp -R . /usr/src/v4l2loopback-1.1
sudo  dkms add -m v4l2loopback -v 1.1
sudo dkms build -m v4l2loopback -v 1.1
sudo dkms install -m v4l2loopback -v 1.1

Regarding the missing videodev kernel module, any recommendations on getting that kernel module built and added?

@umlaeute
Copy link
Owner

regarding videodev: re-configure your kernel and re-build it. or get the entire v4l2 subsystem from linuxtv (and please do not bother this repo with build-issues of that sources)

also @kareemn there's no 1.1 release of v4l2loopback; the last release is v0.11 and it's probably a good idea to stick with the correct versions (think: updates).
also, when quoting multiline code please use ~~~ rather than ` (see the docs)

@kareemn
Copy link

kareemn commented Apr 25, 2018

@umlaeute thanks. Was able to get videodev and v4l2-common compiled for my kernel and installed v4l2loopback through apt install v4l2loopback-dkms. I'm encountering a kernel panic now when running modprobe v4l2loopback:

[Apr25 06:33] ------------[ cut here ]------------
[  +0.000013] WARNING: CPU: 0 PID: 97640 at drivers/media/v4l2-core/v4l2-dev.c:838 __video_register_device+0xb1b/0xed0 [videodev]
[  +0.000001] Modules linked in: v4l2loopback(OE+) v4l2_common(OE) videodev(OE) i2c_mux(OE) v4l2_dv_timings(OE) i2c_core media(OE) ufs msdos xfs sch_htb ebt_ip ebtable_filter xt_statistic xt_nat xt_recent ipt_REJECT nf_reject_ipv4 xt_tcpudp nf_conntrack_netlink nfnetlink xt_mark xt_comment veth ebtable_nat ebtables ipt_MASQUERADE nf_nat_masquerade_ipv4 xfrm_user xfrm_algo iptable_nat nf_nat_ipv4 xt_addrtype iptable_filter nf_nat br_netfilter bridge stp llc overlay nf_conntrack_ipv4 nf_defrag_ipv4 xt_owner xt_conntrack nf_conntrack iptable_security ip_tables x_tables udf crc_itu_t serio_raw hv_balloon joydev ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c
[  +0.000042]  raid1 raid0 multipath linear crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc hid_generic aesni_intel aes_x86_64 crypto_simd glue_helper cryptd pata_acpi hid_hyperv hyperv_keyboard hid hyperv_fb cfbfillrect cfbimgblt cfbcopyarea hv_utils ptp pps_core hv_netvsc
[  +0.000018] CPU: 0 PID: 97640 Comm: insmod Tainted: G           OE   4.13.0-1012-azure #15-Ubuntu
[  +0.000001] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090007  06/02/2017
[  +0.000001] task: ffff9478cd15ae80 task.stack: ffffa282c8438000
[  +0.000005] RIP: 0010:__video_register_device+0xb1b/0xed0 [videodev]
[  +0.000001] RSP: 0018:ffffa282c843bc58 EFLAGS: 00010246
[  +0.000001] RAX: ffffffffc07eb500 RBX: ffff94787bc54000 RCX: 0000000000000001
[  +0.000001] RDX: 00000000ffffffff RSI: 0000000000000000 RDI: ffff9478420a5400
[  +0.000001] RBP: ffffa282c843bc90 R08: ffffffffc07ed140 R09: ffff9478f9807780
[  +0.000001] R10: ffffffffc07ead5e R11: ffffffffc080ba80 R12: 0000000000000000
[  +0.000001] R13: 0000000000000000 R14: ffff9478420a5400 R15: ffff94787bc54070
[  +0.000002] FS:  00007fa8f5807700(0000) GS:ffff9478f9e00000(0000) knlGS:0000000000000000
[  +0.000001] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  +0.000001] CR2: 000000c4213f5500 CR3: 000000016caac000 CR4: 00000000001406f0
[  +0.000003] Call Trace:
[  +0.000006]  ? init_module+0x6c9/0x1000 [v4l2loopback]
[  +0.000002]  ? 0xffffffffc0821000
[  +0.000005]  do_one_initcall+0x55/0x1b0
[  +0.000005]  ? kfree+0x165/0x170
[  +0.000002]  ? kfree+0x165/0x170
[  +0.000002]  ? kmem_cache_alloc_trace+0xfc/0x1b0
[  +0.000005]  do_init_module+0x5f/0x209
[  +0.000002]  load_module+0x196a/0x1d70
[  +0.000005]  ? ima_post_read_file+0x7d/0xa0
[  +0.000003]  SYSC_finit_module+0xe5/0x120
[  +0.000001]  ? SYSC_finit_module+0xe5/0x120
[  +0.000003]  SyS_finit_module+0xe/0x10
[  +0.000005]  entry_SYSCALL_64_fastpath+0x24/0xab
[  +0.000001] RIP: 0033:0x7fa8f53264d9
[  +0.000001] RSP: 002b:00007fff50b57aa8 EFLAGS: 00000202 ORIG_RAX: 0000000000000139
[  +0.000002] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fa8f53264d9
[  +0.000001] RDX: 0000000000000000 RSI: 0000560da9fa026b RDI: 0000000000000003
[  +0.000001] RBP: 00007fff50b56a60 R08: 0000000000000000 R09: 00007fa8f55ebea0
[  +0.000000] R10: 0000000000000003 R11: 0000000000000202 R12: 0000000000000098
[  +0.000001] R13: 0000560dab2341d0 R14: 0000560dab234130 R15: 00007fff50b5692c
[  +0.000002] Code: b3 10 48 c7 c7 c0 30 81 c0 e8 e2 35 e5 d0 41 c7 87 40 03 00 00 ff ff ff ff 48 83 c4 18 44 89 e0 5b 41 5c 41 5d 41 5e 41 5f 5d c3 <0f> ff b8 ea ff ff ff c3 0f ff b8 ea ff ff ff c3 85 c9 0f 84 99 
[  +0.000026] ---[ end trace ceadd6e2eeec302e ]---
[  +0.000001] v4l2loopback: failed video_register_device()
[  +0.019533] kernfs: can not remove 'format', no directory
[  +0.000006] ------------[ cut here ]------------

The warning is related to drivers/media/v4l2-core/v4l2-dev.c:838 in my kernel relate to the checks that the release callback is set:
https://elixir.bootlin.com/linux/latest/source/drivers/media/v4l2-core/v4l2-dev.c#L840

v4l2_loopback_init returns successfully:
https://github.com/umlaeute/v4l2loopback/blob/master/v4l2loopback.c#L2416
and the video_register_device call is attempted:
https://github.com/umlaeute/v4l2loopback/blob/master/v4l2loopback.c#L2422
So any ideas as to why the release callback be set to null?

@umlaeute
Copy link
Owner

i have no clue.

does it also crash if you just load the videodev device?

@kareemn
Copy link

kareemn commented Apr 27, 2018

It doesn't crash on the loading of videodev.

@TheSalarKhan
Copy link

TheSalarKhan commented May 13, 2018

it worked for me after I ran:

$ sudo modprobe uvcvideo

@umlaeute
Copy link
Owner

@TheSalarKhan are you saying that you fixed a kernel-panic by inserting the uvcvideo driver beforehand?

or only, that you skipped the part in the README that says that you should run depmod -a before trying to insert v4l2loopback?

@DS-Tikhonov
Copy link

sudo apt-get install linux-generic
sudo apt-get install v4l2loopback-dkms
after need run reboot
else:
**modprobe: ERROR: could not insert 'v4l2loopback': Unknown symbol in module, or unknown parameter (see dmesg)
**

@umlaeute
Copy link
Owner

umlaeute commented Jul 3, 2018

@DS-Tikhonov make sure you read the entire thread in this ticket, e.g. it says:

make sure that videodev is loaded before v4l2loopback

and you really should do that.

Apart from that, there's a Ubuntu-specific bug LP#1772695, which can be found with a bit of search-foo.

@MoronixProduct3
Copy link

For those encountering a similar issue on Google Cloud Platform's Ubuntu images.
The videodev module is not distributed by default on some images.
However you don't need to recompile the entire kernel as the gcp kernel already has videodev set as modular:

CONFIG_VIDEO_DEV=m 

You can simply install the linux-modules-extra-gcp package.
This will include the videodev.ko module.

@trentwiles
Copy link

Hello, I'm getting
modprobe: ERROR: could not insert 'v4l2loopback': Operation not permitted.

I've tried some of the solutions above, so luck. I'm Ubuntu 20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests