Xpra: Ticket #1596: Webcam is greyed out, even when v4l2loopback device is present.

The webcam field in the Xpra Client is greyed out, even when we create a v4l2loopback device by modprobe v4l2loopback devices=1 on Ubuntu 16.04. I checked the device. The virtual device was present. The command, I used to start xpra and attach it.

xpra start :10 --bind-tcp=192.168.0.20:10000 -d webcam --webcam=/dev/video1 &
xpra attach tcp:192.168.0.20:10000


Sat, 22 Jul 2017 10:30:33 GMT - Kundan:

It seems the reason for this is that, the v4loloopback devices created on Ubuntu 16.04 (Installed through sudo apt) has exclusive_caps set to 1 by default. It means, it won't expose the VIDEO_CAPTURE capabilities until we write anything to it. But, it seems, here in Xpra we are checking for the device capabilities much earlier, which doesn't report VIDEO_CAPTURE capability since nothing was written to it, at that point of time. This leads to webcam support being disabled or greyed out.

After, creating Video devices through,

sudo modprobe v4l2loopback devices=1 exclusive_caps=0

It works.


Sat, 22 Jul 2017 10:41:02 GMT - Kundan: attachment set

xpra log without any exclusive_caps option while loading v4l2loopback device, The command is sudo modprobe v4l2loopback devices=1, seems to be equivalent to adding option exclusive_caps=1


Sat, 22 Jul 2017 10:42:42 GMT - Kundan: attachment set

The xpra log after starting the server, when the v4loopback device was created by adding exclusive_caps=0.


Mon, 24 Jul 2017 05:14:09 GMT - Antoine Martin: owner changed

Good catch, does r16480 fix things? (disables the check on Debian and Ubuntu only)


Mon, 24 Jul 2017 18:28:05 GMT - Kundan:

Yes, Antoine, Now, webcam option is enabled on Ubuntu 16.04 and working properly.

Thanks a lot.


Wed, 26 Jul 2017 07:29:06 GMT - Antoine Martin: status, milestone changed; resolution set


Sat, 23 Jan 2021 05:28:41 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1596