OBS can't start Virtual Webcam properly until I reload the v4l2loopback module

Melechtna

New Member
I'm on NixOS to start with.

The virtual camera, while it starts just fine, with absolutely 0 errors relating to it in the console, it never outputs anything, no program that interfaces with webcams can detect it. After force reloading the v4l2loopback module, it came up correctly, meaning somewhere along the way, the module isn’t being loaded either properly, or just period until I reload the module.

And yes, if I run lsmod | grep v4l2loopback before doing the reload, it is present. So I have no idea why the reload is necessary in the first place.


Code:
  # Kernel
  boot.kernelPackages = pkgs.linuxPackages_zen;
  boot.kernelModules = [ "v4l2loopback" ];
  boot.initrd.kernelModules = [ "amdgpu" "v4l2loopback" ];
  boot.extraModulePackages = [ pkgs.linuxKernel.packages.linux_zen.v4l2loopback ];

This should be the relevant part of my config.
 

Melechtna

New Member
Something to note, if I rmmod the module and then modprobe it, it goes back to being broken, only the modprobe -r makes it function correctly.
 

Melechtna

New Member
I went through the above process again, and when initially loaded, it creates a /dev/v4l2loopback device, but after the reload, this vanishes entirely until I have OBS create the device. So something is creating the device early
 

Melechtna

New Member
Code:
  # Kernel
  boot.kernelPackages = pkgs.linuxPackages_zen;
  boot.kernelModules = [ "v4l2loopback" "snd-aloop" ];
  boot.extraModulePackages = [ pkgs.linuxKernel.packages.linux_zen.v4l2loopback ];
  boot.extraModprobeConfig =
    ''
    options v4l2loopback nr_devices=2 exclusive_caps=1,1 video_nr=0,1 card_label=v4l2lo0,v4l2lo1
    '';

This got it.
 
Top