To enable a webcam with MIPI, I needed to use the configuration below (see details in Tracking Issue: Intel MIPI/IPU6 webcam-support · Issue #225743 · NixOS/nixpkgs · GitHub). While it works great, it also create a dummy video device that is not useful called “Dummy video device”, on top of the main Intel MIPI (and some others, but they only appear in obs, so not so much an issue):
Do you know how to get rid of it, or at least not to take it as the default one? The software takes by default the dummy one, which fails.
I have the following in my config, which is doing something similar for opposite purposes (more write-up at the commented link). Perhaps you can adapt it?
Thanks a lot I’ll try! But what do you mean exactly:
What do you mean? I don’t even know how it is loaded ^^’ And I guess I can’t disable it completely as the other webcam seems to also use v4l2loopback (MIPI is a bit special as I understand)
It looks (on more careful reading of your screenshot) like the module is maybe being pulled in as a dependency and is used to create the MIPI camera instance, as well as a default one. Ok.
So maybe you can experiment with that nr_devices setting to avoid creating the default one? Otherwise, renaming it out of the way might be “good enough”.
So changing nr_devices was not doing anything visible… but I managed to change the udev rules to make it work!
services.udev.extraRules = ''
# If the system is not a video device, we skip these rules by jumping to the end
SUBSYSTEM!="video4linux", GOTO="hide_cam_end"
#ATTR{name}=="Intel MIPI Camera", GOTO="hide_cam_end" # This line cannot be used as it would move too much stuff and then the camera would not work. Instead, we just move the dummy camera,
# I found its name with udevadm info -q all -a /dev/video0
# If this is not the dummy video, we also skip these rules.
ATTR{name}!="Dummy video device (0x0000)", GOTO="hide_cam_end"
ACTION=="add", RUN+="${pkgs.coreutils}/bin/mkdir -p /dev/not-for-user"
ACTION=="add", RUN+="${pkgs.coreutils}/bin/mv -f $env{DEVNAME} /dev/not-for-user/"
ACTION=="remove", RUN+="${pkgs.coreutils}/bin/rm -f /dev/not-for-user/$name"
ACTION=="remove", RUN+="${pkgs.coreutils}/bin/rm -f /dev/not-for-user/$env{ID_SERIAL}"
LABEL="hide_cam_end"
'';