Issues with v4l2loopback and OBS

I started my Linux journey a long time ago with Red Hat in the middle of the nineties and moved after to Slackware. Still to this day one of my favourite distros. I tried Ubuntu for a shortwhile but found a new home on Arch. It was my main distro for the better part of the 2010’s but then tried Void Linux and it’s now my home since at least 3 years.

Compared to Arch is much more stable, but as every SO sometimes you have issues. The thing I most enjoy is that usually with distros like Slack or Void when problems arise I am usually capable of resolve them and just keep working.

This post will be just a walkthrough on how to fix an issue with v4l2loopback by using xpbs-src, compiling and installing a previous version and making the package manager ignore future updates on the driver.

The Problem

This week I installed some updates on my main workstation and started getting an issue with OBS. Everytime I started the virtual webcam this error message popped up:

Starting the output failed. Please check the log for details.
Note:
If you are using the NVENC or AMD encoders, make sure your video
drivers are up to date.

I’ve looked into the logs as instructed and found these messages:

v4l2-input: Start capture from /dev/video10
v4l2-input: Input: 0
v4l2-input: Resolution: 960x640
v4l2-input: Pixelformat: YU12
v4l2-input: Linesize: 960 Bytes
v4l2-input: Framerate: 30.00 fps
v4l2-input: /dev/video1: select timeout set to 166666 (5x frame periods)
NV12 texture support enabled
P010 texture support not available
Failed to start streaming on '/dev/video11' (Invalid argument)
Code Snippet 1: OBS Log

Not very helpful. I’ve tried to debug the devices by using this command and even the sudo version:

4l2-ctl --list-devices

But only found this error:

Cannot open device /dev/video0, exiting.

This was confusing. I don’t have configured any /dev/video0 device. The content of my /etc/modprobe.d/v4l2_options.conf is:

# Virtual video device
options v4l2loopback devices=2 exclusive_caps=1,1 card_label="Canon","OBS" video_nr=10,11

This lead me to believe that the problem was with v4l2loopback and not OBS. Otherwise this vl2-ctl utility would correctly list the devices.

Next step is to check by using xbps-query if there was some update recently:

$ xbps-query v4l2loopback

architecture: x86_64
filename-sha256: 7ac39c16ed8a6131f571d75b85be9eb1f11a27b64c438904821265035fb695b8
filename-size: 42KB
homepage: https://github.com/umlaeute/v4l2loopback
install-date: 2025-07-07 20:33 WEST
installed_size: 158KB
license: GPL-2.0-or-later
maintainer: John <me@johnnynator.dev>
pkgname: v4l2loopback
pkgver: v4l2loopback-0.15.0_1
provides:
        cmd:v4l2loopback-ctl-0.15.0_1
repository: https://repo-fi.voidlinux.org/current
run_depends:
        dkms>=0
        glibc>=2.41_1
shlib-requires:
        libc.so.6
short_desc: Kernel module to create V4L2 loopback devices
source-revisions: v4l2loopback:6eab0a69608
sourcepkg: v4l2loopback

So there was package update and it matches the date of the update.

The solution

Void Linux gives two options to revert packages. The first one is to simply revert to a previous version by using the xdowngrade utility but it only works if you still have the previous version in your cache. That was not the case for me.

The other option is to compile the previous version by using xbps-src. This utility will allow you to build a package by using the recipe published in the github repo that track the packages officially available for the distro.

You can read all about how it works on the repo with much more detail. I will just write my steps to downgrade the package.

So if you would like to follow this process you can just clone the repo to somewhere on your disk. I am using the folder ~/.local/pkgs/void-packages

$ git clone https://github.com/void-linux/void-packages.git
$ cd void-packages
$ ./xbps-src binary-bootstrap
$ cd srcpkgs/v4l2loopback/
Code Snippet 2: Git clone and initialize

Then we need to check the commit history of the template of the package to select the one we are interested in:

git log -3 template
commit 1962028b11ef9f20ee594207b1ed68c3448bb3f2
Author: BuildTools <unconfigured@null.spigotmc.org>
Date:   Fri Jul 4 20:29:32 2025 -0400

    v4l2loopback: update to 0.15.0

commit dfa483a25640cdf3ad7ec2579a7f8b6ff52b6748
Author: John <me@johnnynator.dev>
Date:   Mon Jul 1 22:53:01 2024 +0200

    v4l2loopback: update to 0.13.2.

commit a0dd29c53bde401625962cd13fd9db7c710b3382
Author: Quincy Fleming <quincyf467@protonmail.com>
Date:   Sat Mar 23 13:02:38 2024 -0500

    v4l2loopback: update to 0.13.1

So we see that the package was updated to v15 on the 4th of July and the previous update was last year around the same time.

Let’s revert the template to the previous version and compile the driver:

git checkout dfa483a25640cdf3ad7ec2579a7f8b6ff52b6748 template
cd ../..
./xbps-src pkg v4l2loopback

After some output the package will be available for installation via xbps-install. This will uninstall v15 and replace it with v13.2:

sudo xbps-install --repository hostdir/binpkgs/ v4l2loopback --force

Now all that’s left is to block it from further system updates:

sudo xbps-pkgdb -m hold v4l2loopback

That’s all. Now everything is working correctly as before. This may be an interesting bug report hunt for the v4l2loopback package, but it’s an adventure for another day.

Have fun!

 Share!