Getting a new UVC camera recognized in Cheese

I got a USB endoscope camera but Cheese does not recognize it. It works with guvcview though.

Here’s what I see with journalctl when plugging in the camera:

kernel: usb 1-3: new high-speed USB device number 23 using xhci_hcd
kernel: usb 1-3: New USB device found, idVendor=1a40, idProduct=0801, bcdDevice= 1.00
kernel: usb 1-3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
kernel: usb 1-3: Product: USB 2.0 Hub
kernel: hub 1-3:1.0: USB hub found
kernel: hub 1-3:1.0: 4 ports detected
upowerd[3511]: treating change event as add on /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/kernel: usb 1-3.4: new high-speed USB device number 24 using xhci_hcd
kernel: usb 1-3.4: New USB device found, idVendor=2b16, idProduct=6689, bcdDevice= 6.19
kernel: usb 1-3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: usb 1-3.4: Product: DP 5M CAM
kernel: usb 1-3.4: Manufacturer: SunplusIT Inc
kernel: usb 1-3.4: SerialNumber: 01.00.00
kernel: uvcvideo: Found UVC 1.00 device DP 5M CAM (2b16:6689)
kernel: input: DP 5M CAM: DP 5M CAM as /devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-3/1-3.4/1-3.mtp-probe[352465]: checking bus 1, device 24: "/sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/mtp-probe[352465]: bus: 1, device: 24 was not an MTP device
mtp-probe[352488]: checking bus 1, device 24: "/sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/mtp-probe[352488]: bus: 1, device: 24 was not an MTP device

And when Cheese is started:

cheese[352742]: cheese-application.vala:214: Error during camera setup: No device found
cheese[352742]: cheese_camera_device_get_name: assertion 'CHEESE_IS_CAMERA_DEVICE (device)' failed
cheese[352742]: g_variant_new_string: assertion 'string != NULL' failed
cheese[352742]: g_variant_ref_sink: assertion 'value != NULL' failed
cheese[352742]: g_settings_schema_key_type_check: assertion 'value != NULL' failed
cheese[352742]: g_variant_get_type_string: assertion 'value != NULL' failed
cheese[352742]: g_settings_set_value: key 'camera' in 'org.gnome.Cheese' expects type 's', but a ll)' was given
cheese[352742]: g_variant_unref: assertion 'value != NULL' failed
cheese[352742]: cheese_preferences_dialog_setup_resolutions_for_device: assertion 'device != NULL' failed

This is on Fedora 33 using MATE DE. As a side note, there is unfortunately a still-unpatched bug with Cheese’s Preferences menu being hidden for non-Gnome DE’s:

If a solution for that could come to Fedoraland that would be great…

Back to the camera issue, I also tried plugging it into a laptop running Fedora 33 Gnome Shell, but it got recognized differently there, seemingly as a keyboard. Cheese does not recognize the USB camera as an input device on that system either.

kernel: usb 2-2: new high-speed USB device number 5 using xhci_hcd
kernel: usb 2-2: New USB device found, idVendor=1a40, idProduct=0801, bcdDevice= 1.00
kernel: usb 2-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
kernel: usb 2-2: Product: USB 2.0 Hub
kernel: hub 2-2:1.0: USB hub found
kernel: hub 2-2:1.0: 4 ports detected
upowerd[1618]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb2/2-2
kernel: usb 2-2.4: new high-speed USB device number 6 using xhci_hcd
kernel: usb 2-2.4: New USB device found, idVendor=2b16, idProduct=6689, bcdDevice= 6.19
kernel: usb 2-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: usb 2-2.4: Product: DP 5M CAM
kernel: usb 2-2.4: Manufacturer: SunplusIT Inc
kernel: usb 2-2.4: SerialNumber: 01.00.00
kernel: uvcvideo: Found UVC 1.00 device DP 5M CAM (2b16:6689)
kernel: input: DP 5M CAM: DP 5M CAM as /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.4/2-2.4:1.0/input/input22
mtp-probe[6920]: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.4"
mtp-probe[6920]: bus: 2, device: 6 was not an MTP device
/usr/libexec/gdm-x-session[2187]: (II) config/udev: Adding input device DP 5M CAM: DP 5M CAM (/dev/input/event19)
/usr/libexec/gdm-x-session[2187]: (**) DP 5M CAM: DP 5M CAM: Applying InputClass "evdev keyboard catchall"
/usr/libexec/gdm-x-session[2187]: (**) DP 5M CAM: DP 5M CAM: Applying InputClass "libinput keyboard catchall"
/usr/libexec/gdm-x-session[2187]: (**) DP 5M CAM: DP 5M CAM: Applying InputClass "system-keyboard"
/usr/libexec/gdm-x-session[2187]: (II) Using input driver 'libinput' for 'DP 5M CAM: DP 5M CAM'
/usr/libexec/gdm-x-session[2187]: (II) systemd-logind: got fd for /dev/input/event19 13:83 fd 76 paused 0
/usr/libexec/gdm-x-session[2187]: (**) DP 5M CAM: DP 5M CAM: always reports core events
/usr/libexec/gdm-x-session[2187]: (**) Option "Device" "/dev/input/event19"
/usr/libexec/gdm-x-session[2187]: (**) Option "_source" "server/udev"
/usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: is tagged by udev as: Keyboard
/usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: device is a keyboard
/usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: device removed
/usr/libexec/gdm-x-session[2187]: (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.4/2-2.4:1.0/input/input22/event19"
/usr/libexec/gdm-x-session[2187]: (II) XINPUT: Adding extended input device "DP 5M CAM: DP 5M CAM" (type: KEYBOARD, id 16)
/usr/libexec/gdm-x-session[2187]: (**) Option "xkb_layout" "us,ca"
/usr/libexec/gdm-x-session[2187]: (**) Option "xkb_variant" ",multix"
/usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: is tagged by udev as: Keyboard
/usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: device is a keyboard
mtp-probe[6952]: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.4"
mtp-probe[6952]: bus: 2, device: 6 was not an MTP device
/usr/libexec/gdm-x-session[6954]: The XKEYBOARD keymap compiler (xkbcomp) reports:
/usr/libexec/gdm-x-session[6954]: > Error:            Key <MDSW> added to map for multiple modifiers
/usr/libexec/gdm-x-session[6954]: >                   Using Mod3, ignoring Mod5.
/usr/libexec/gdm-x-session[6954]: > Warning:          Could not resolve keysym XF86FullScreen
/usr/libexec/gdm-x-session[6954]: Errors from xkbcomp are not fatal to the X server

No ideas why the camera is not working with Cheese? Any suggestions for a better program to try?

The camera is working on both computers with other programs, such as vlc v4l2:///dev/video2, but cheese just won’t detect it even if the device is specified: cheese -d /dev/video2. Cheese always starts with the (USB or built-in) webcam it works with, but not this specific USB camera.

In fact, even specifying a non-existent device with cheese -d /dev/video5 will still work to open the webcam, but not the USB camera.

A helpful article for testing cameras: Webcam - Community Help Wiki

How to get Cheese to cooperate?

More info:

$ gst-device-monitor-1.0 Video/Source
Probing devices...


Device found:

	name  : DP 5M CAM: DP 5M CAM
	class : Video/Source
	caps  : image/jpeg, width=2592, height=1944, pixel-aspect-ratio=1/1, framerate=20/1
	        image/jpeg, width=2048, height=1936, pixel-aspect-ratio=1/1, framerate=20/1
	        image/jpeg, width=1920, height=1080, pixel-aspect-ratio=1/1, framerate=25/1
	        image/jpeg, width=1600, height=1200, pixel-aspect-ratio=1/1, framerate=25/1
	        image/jpeg, width=1280, height=720, pixel-aspect-ratio=1/1, framerate=25/1
	        image/jpeg, width=640, height=480, pixel-aspect-ratio=1/1, framerate=25/1
	properties:
		udev-probed = true
		device.bus_path = pci-0000:01:00.0-usb-0:3.4:1.0
		sysfs.path = /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-3/1-3.4/1-3.4:1.0/video4linux/video2
		device.bus = usb
		device.subsystem = video4linux
		device.vendor.id = 2b16
		device.vendor.name = "SunplusIT\\x20Inc"
		device.product.id = 6689
		device.product.name = "DP\ 5M\ CAM:\ DP\ 5M\ CAM"
		device.serial = SunplusIT_Inc_DP_5M_CAM_01.00.00
		device.capabilities = :capture:
		device.api = v4l2
		device.path = /dev/video2
		v4l2.device.driver = uvcvideo
		v4l2.device.card = "DP\ 5M\ CAM:\ DP\ 5M\ CAM"
		v4l2.device.bus_info = usb-0000:01:00.0-3.4
		v4l2.device.version = 330511 (0x00050b0f)
		v4l2.device.capabilities = 2225078273 (0x84a00001)
		v4l2.device.device_caps = 69206017 (0x04200001)
	gst-launch-1.0 v4l2src device=/dev/video2 ! ...


Device found:

	name  : UVC Camera (046d:0990)
	class : Video/Source
	caps  : video/x-raw, format=YUY2, width=1600, height=1200, pixel-aspect-ratio=1/1, framerate=5/1
	        video/x-raw, format=YUY2, width=960, height=720, pixel-aspect-ratio=1/1, framerate={ (fraction)10/1, (fraction)5/1 }
	        video/x-raw, format=YUY2, width=800, height=600, pixel-aspect-ratio=1/1, framerate={ (fraction)25/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)5/1 }
	        video/x-raw, format=YUY2, width=640, height=480, pixel-aspect-ratio=1/1, framerate={ (fraction)30/1, (fraction)25/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)5/1 }
	        video/x-raw, format=YUY2, width=352, height=288, pixel-aspect-ratio=1/1, framerate={ (fraction)30/1, (fraction)25/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)5/1 }
	        video/x-raw, format=YUY2, width=320, height=240, pixel-aspect-ratio=1/1, framerate={ (fraction)30/1, (fraction)25/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)5/1 }
	        video/x-raw, format=YUY2, width=176, height=144, pixel-aspect-ratio=1/1, framerate={ (fraction)30/1, (fraction)25/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)5/1 }
	        video/x-raw, format=YUY2, width=160, height=120, pixel-aspect-ratio=1/1, framerate={ (fraction)30/1, (fraction)25/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)5/1 }
	        image/jpeg, width=960, height=720, pixel-aspect-ratio=1/1, framerate={ (fraction)15/1, (fraction)10/1, (fraction)5/1 }
	        image/jpeg, width=800, height=600, pixel-aspect-ratio=1/1, framerate={ (fraction)30/1, (fraction)25/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)5/1 }
	        image/jpeg, width=640, height=480, pixel-aspect-ratio=1/1, framerate={ (fraction)30/1, (fraction)25/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)5/1 }
	        image/jpeg, width=352, height=288, pixel-aspect-ratio=1/1, framerate={ (fraction)30/1, (fraction)25/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)5/1 }
	        image/jpeg, width=320, height=240, pixel-aspect-ratio=1/1, framerate={ (fraction)30/1, (fraction)25/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)5/1 }
	        image/jpeg, width=176, height=144, pixel-aspect-ratio=1/1, framerate={ (fraction)30/1, (fraction)25/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)5/1 }
	        image/jpeg, width=160, height=120, pixel-aspect-ratio=1/1, framerate={ (fraction)30/1, (fraction)25/1, (fraction)20/1, (fraction)15/1, (fraction)10/1, (fraction)5/1 }
	properties:
		udev-probed = true
		device.bus_path = pci-0000:0a:00.3-usb-0:2:1.0
		sysfs.path = /sys/devices/pci0000:00/0000:00:07.1/0000:0a:00.3/usb5/5-2/5-2:1.0/video4linux/video0
		device.bus = usb
		device.subsystem = video4linux
		device.vendor.id = 046d
		device.vendor.name = 046d
		device.product.id = 0990
		device.product.name = "UVC\ Camera\ \(046d:0990\)"
		device.serial = 046d_0990_56E693ED
		device.capabilities = :capture:
		device.api = v4l2
		device.path = /dev/video0
		v4l2.device.driver = uvcvideo
		v4l2.device.card = "UVC\ Camera\ \(046d:0990\)"
		v4l2.device.bus_info = usb-0000:0a:00.3-2
		v4l2.device.version = 330511 (0x00050b0f)
		v4l2.device.capabilities = 2225078273 (0x84a00001)
		v4l2.device.device_caps = 69206017 (0x04200001)
	gst-launch-1.0 v4l2src ! ...
$ gst-launch-1.0 v4l2src device=/dev/video2 ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.000084550
Setting pipeline to NULL ...
Freeing pipeline ...