sudo modprobe v4l2loopback modprobe: ERROR: could not insert 'v4l2loopback': Bad address

I had the same thing (followed a similar guide for DSLR) and I ended up compiling the v4l2loopback module and installing it. Now everything works perfectly.

Make sure to remove the original package installation with sudo apt-get remove v4l2loopback-dkms

Now follow the GitHub instructions on how to compile and install the module (really easy, clone and see the install section). https://github.com/umlaeute/v4l2loopback


When using iriun for turning your iPhone cam into a webcam, the same error occured to me on Ubuntu 18.04, as it brings v4l2loopback-dkms as a dependency. So I had to first uninstall the package and its dependencies.

sudo apt purge v4l2loopback-dkms

Compiling the module is indeed getting rid of the error.

git clone https://github.com/umlaeute/v4l2loopback.git
cd v4l2loopback
make
sudo su
make install

After install the command: sudo modprobe v4l2loopback exclusive_caps=1 works without issues. But to get iriun to work, I had to do these addition steps:

  • Install iriun without 4l2loopback-dkms dependency:

    sudo dpkg -i --ignore-depends=4l2loopback-dkms iriunwebcam.deb
    
  • Fix dependency in /var/lib/dpkg/status
    Search for iriun, and remove 4l2loopback-dkms from Depends:

    Package: iriunwebcam
    Status: install ok installed
    Maintainer: Iriun
    Architecture: all
    Version: 2.2
    Depends: qt5-default, jackd, adb
    Description: Iriun Webcam for Linux
    

You could also alter the dependency in the iriunwebcam.deb file, but this way seemed easier to me. Now iriun works great for me.

Tags:

18.04