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

Devices limited to 8 even with KCPP flag #558

Closed
xeon826 opened this issue Oct 10, 2023 · 1 comment
Closed

Devices limited to 8 even with KCPP flag #558

xeon826 opened this issue Oct 10, 2023 · 1 comment
Assignees
Labels
needs triage new issues

Comments

@xeon826
Copy link

xeon826 commented Oct 10, 2023

  • v4l2loopback version: 0.12.7
[  113.906380] v4l2loopback: loading out-of-tree module taints kernel.
[  113.907038] v4l2loopback: number of devices is limited to: 8
[  113.907472] v4l2loopback driver version 0.12.7 loaded
  • kernel version: Linux ubuntu 5.15.0-86-generic udev by-id symlinks #96-Ubuntu SMP Wed Sep 20 08:23:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

  • Distribution (+version):
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 22.04.3 LTS
    Release: 22.04
    Codename: jammy

Steps to reproduce:

  1. lxc launch images:ubuntu/22.04/desktop ubuntu --vm -c limits.cpu=4 -c limits.memory=4GiB my host operating system is running the same OS with v4l2loopback installed in the same way and still has this same issue, maybe it's a recent OS update?
  2. lxc exec ubuntu -- su - ubuntu
  3. sudo apt install -y gcc make build-essential linux-modules-extra-$(uname -r) linux-headers-$(uname -r) git
  4. cd Documents; git clone https://github.com/umlaeute/v4l2loopback
  5. cd v4l2loopback
  6. make KCPPFLAGS="-DMAX_DEVICES=20";
  7. sudo make install;
  8. sudo depmod -a;
  9. sudo modprobe v4l2loopback devices=11 or any number higher than 8
    I've also tried increasing the MAX_DEVICES define in the v4l2loopback.c script itself.

Observed Results:

I have 8 total video devices in /dev/ and there's an error in dmesg that says number of devices is limited to: 8,

Expected Results:

11 video devices should appear in /dev/

Relevant Code:

I tried looking for this string in the v4l2loopback source code grep -rnw '.' -e 'limited to' but I only find number of initial devices is limited to not number of devices is limited to

@xeon826 xeon826 added the needs triage new issues label Oct 10, 2023
@umlaeute
Copy link
Owner

that's because you are loading an old module that is still lying around on your disk and which takes precedence over what got install by make install.

remove the other module instance.
make sure to load the newly-built module.

a simple way (to test) is to specify the module file directly when loading via insmod:

insmod ./v4l2loopback.ko devices=11

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

No branches or pull requests

2 participants