17

When I follow the steps of Using a digital camera ( Canon) as webcam

My linux is Ubuntu 18.04

I have an error with the following command :

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

I found nothing at this moment on the internet.

Could u help me ?

Eric

2 Answers2

15

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

Abhay Patil
  • 2,705
shlomicthailand
  • 266
  • 2
  • 3
11

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.

Corben
  • 241
  • 3
    this resolved my problem – Rotail Jan 17 '21 at 04:51
  • Nice solution, it worked for me, but after some time (and probably some updates) iriun stopped work and the same issue started happening again. I will follow again this tutorial and try to fix this again. – matgaio Apr 16 '21 at 21:27
  • This question and these answers were really helpful to get Iriun back working for me. Wish I could do more than just upvote. Here's an Ansible role that installs Iriun for Ubuntu 18.04, now updated thanks to your contributions. https://codeberg.org/ansible/iriun-webcam – solarchemist May 24 '21 at 23:04
  • Solved my problem twice. Thank you so much – Figaro Jun 16 '21 at 08:42