Tag Archives: uvcvideo

USB webcam fun

Bought a pair of webcams (mostly for the purposes of playing with opencv). When plugged in, the uvcvideo kernel module recognises them, and they self-report to the lsusb command as 18ec:3288. However, by default they fail to work (ioctl error).

v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument

As is so often true there is an answer for this problem at the linux UVC dev list. Reproducing for the record the wise words of Laurent Pinchard,

Try setting the quirks parameter to 2 before plugging your webcam (either with ‘modprobe uvcvideo quirks=2‘ if the driver is not already loaded, or with ‘echo 2 > /sys/modules/uvcvideo/parameters/quirks‘ if the driver is already loaded).

To make these settings permanent,you need to create the file /etc/modprobe.d/uvcvideo.conf containing the line:

options uvcvideo quirks=2

From then on, the uvcvideo module will always be loaded with the “quirks=2” option and dmesg will show this line when loading the module:

uvcvideo: Forcing device quirks 0x2 by module parameter for testing purpose.
uvcvideo: Please report required quirks to the linux-uvc-devel mailing list.