I have Dell desktop computer with Ubuntu 18.04 and Logitech BRIO camera. It worked good with Ubuntu 16.04 and worked good for a few weeks after upgrading to 18.04, taking hundreds of shots. Then starting a week or two ago, it gets a few shots, sometimes 30, sometimes 50, and then stops working until it is disconnected and reconnected.
I have another Dell desktop, also with Ubuntu 18.04 and the same camera, but that one has no internet connection and does not get updated. That one continues to work fine. I swap cameras, and the problem is still with this computer.
I reconnect camera and run this script for test, using fswebcam to get shots and save as jpg:
#!/bin/bash
for index in {0..100}
do
echo shot $index
echo Time: `date +"%Y-%m-%d %T"`
fswebcam -d v4l2:/dev/video0 -r 4096x2160 --jpeg -1 --no-banner -S 9 --verbose temp/shot.jpg
sleep 1
done
exit
It works good 20 to 50 times, and then fswebcam says "Unable to find a compatible palette format."
This is output for two consecutive shots, the last that worked and the first that failed:
shot 62
Time: 2021-11-30 11:26:17
--- Opening v4l2:/dev/video0...
>>> Using 'v4l2' source module.
/dev/video0 opened.
src_v4l2_get_capability,87: /dev/video0 information:
src_v4l2_get_capability,88: cap.driver: "uvcvideo"
src_v4l2_get_capability,89: cap.card: "Logitech BRIO"
src_v4l2_get_capability,90: cap.bus_info: "usb-0000:00:14.0-8"
src_v4l2_get_capability,91: cap.capabilities=0x84200001
src_v4l2_get_capability,92: - VIDEO_CAPTURE
src_v4l2_get_capability,103: - STREAMING
No input was specified, using the first.
src_v4l2_set_input,181: /dev/video0: Input 0 information:
src_v4l2_set_input,182: name = "Camera 1"
src_v4l2_set_input,183: type = 00000002
src_v4l2_set_input,185: - CAMERA
src_v4l2_set_input,186: audioset = 00000000
src_v4l2_set_input,187: tuner = 00000000
src_v4l2_set_input,188: status = 00000000
src_v4l2_set_pix_format,520: Device offers the following V4L2 pixel formats:
src_v4l2_set_pix_format,533: 0: [0x56595559] 'YUYV' (YUYV 4:2:2)
src_v4l2_set_pix_format,533: 1: [0x47504A4D] 'MJPG' (Motion-JPEG)
src_v4l2_set_pix_format,533: 2: [0x3231564E] 'NV12' (Y/CbCr 4:2:0)
Using palette MJPEG
src_v4l2_set_mmap,672: mmap information:
src_v4l2_set_mmap,673: frames=4
src_v4l2_set_mmap,722: 0 length=17694720
src_v4l2_set_mmap,722: 1 length=17694720
src_v4l2_set_mmap,722: 2 length=17694720
src_v4l2_set_mmap,722: 3 length=17694720
--- Capturing frame...
Skipping 9 frames...
Capturing 1 frames...
Captured 10 frames in 0.31 seconds. (32 fps)
--- Processing captured image...
Setting output format to JPEG, quality -1
Disabling banner.
Writing JPEG image to 'temp/shot.jpg'.
shot 63
Time: 2021-11-30 11:26:29
--- Opening v4l2:/dev/video0...
>>> Using 'v4l2' source module.
/dev/video0 opened.
src_v4l2_get_capability,87: /dev/video0 information:
src_v4l2_get_capability,88: cap.driver: "uvcvideo"
src_v4l2_get_capability,89: cap.card: "Logitech BRIO"
src_v4l2_get_capability,90: cap.bus_info: "usb-0000:00:14.0-8"
src_v4l2_get_capability,91: cap.capabilities=0x84200001
src_v4l2_get_capability,92: - VIDEO_CAPTURE
src_v4l2_get_capability,103: - STREAMING
No input was specified, using the first.
src_v4l2_set_input,181: /dev/video0: Input 0 information:
src_v4l2_set_input,182: name = "Camera 1"
src_v4l2_set_input,183: type = 00000002
src_v4l2_set_input,185: - CAMERA
src_v4l2_set_input,186: audioset = 00000000
src_v4l2_set_input,187: tuner = 00000000
src_v4l2_set_input,188: status = 00000000
src_v4l2_set_pix_format,520: Device offers the following V4L2 pixel formats:
src_v4l2_set_pix_format,533: 0: [0x56595559] 'YUYV' (YUYV 4:2:2)
src_v4l2_set_pix_format,533: 1: [0x47504A4D] 'MJPG' (Motion-JPEG)
src_v4l2_set_pix_format,533: 2: [0x3231564E] 'NV12' (Y/CbCr 4:2:0)
Unable to find a compatible palette format.
dmesg -T shows this, starting from when the camera was reconnected:
[Tue Nov 30 11:18:03 2021] usb 2-8: USB disconnect, device number 7
[Tue Nov 30 11:18:10 2021] usb 2-8: new SuperSpeed USB device number 8 using xhci_hcd
[Tue Nov 30 11:18:10 2021] usb 2-8: New USB device found, idVendor=046d, idProduct=085e
[Tue Nov 30 11:18:10 2021] usb 2-8: New USB device strings: Mfr=0, Product=2,
SerialNumber=3
[Tue Nov 30 11:18:10 2021] usb 2-8: Product: Logitech BRIO
[Tue Nov 30 11:18:10 2021] usb 2-8: SerialNumber: 93004248
[Tue Nov 30 11:18:10 2021] uvcvideo: Found UVC 1.00 device Logitech BRIO (046d:085e)
[Tue Nov 30 11:18:10 2021] input: Logitech BRIO as
/devices/pci0000:00/0000:00:14.0/usb2/2-8/2-8:1.0/input/input20
[Tue Nov 30 11:18:10 2021] usb 2-8: current rate 16000 is different from the runtime rate 24000
[Tue Nov 30 11:18:10 2021] usb 2-8: current rate 16000 is different from the runtime rate 32000
[Tue Nov 30 11:18:10 2021] usb 2-8: current rate 16000 is different from the runtime rate 48000
[Tue Nov 30 11:18:10 2021] input: Logitech BRIO as /devices/pci0000:00/0000:00:14.0/usb2/2-8/2-8:1.4/0003:046D:085E.0006/input/input21
[Tue Nov 30 11:18:10 2021] hid-generic 0003:046D:085E.0006: input,hidraw0: USB HID v1.11 Device [Logitech BRIO] on usb-0000:00:14.0-8/input4
[Tue Nov 30 11:18:10 2021] usb 2-8: current rate 16000 is different from the runtime rate 48000
[Tue Nov 30 11:18:10 2021] usb 2-8: current rate 16000 is different from the runtime rate 48000
[Tue Nov 30 11:18:10 2021] usb 2-8: current rate 16000 is different from the runtime rate 48000
[Tue Nov 30 11:26:21 2021] usb 2-8: Set SEL for device-initiated U1 failed.
[Tue Nov 30 11:26:21 2021] usb 2-8: Set SEL for device-initiated U2 failed.
[Tue Nov 30 11:26:27 2021] usb 2-8: Set SEL for device-initiated U1 failed.
[Tue Nov 30 11:26:27 2021] usb 2-8: Set SEL for device-initiated U2 failed.
[Tue Nov 30 11:26:28 2021] uvcvideo: Failed to set UVC probe control : -32 (exp. 26).
[Tue Nov 30 11:26:28 2021] uvcvideo: Failed to set UVC probe control : -32 (exp. 26).
[Tue Nov 30 11:26:28 2021] uvcvideo: Failed to set UVC probe control : -32 (exp. 26).
[Tue Nov 30 11:26:28 2021] uvcvideo: Failed to set UVC probe control : -32 (exp. 26).
[Tue Nov 30 11:26:28 2021] uvcvideo: Failed to set UVC probe control : -32 (exp. 26).
[Tue Nov 30 11:26:28 2021] uvcvideo: Failed to set UVC probe control : -32 (exp. 26).
And that last thing is repeated many times.
I have tried this many times and it always fails the same way, starting with that "usb 2-8: Set SEL for device-initiated U1 failed."
How might I find and fix this problem?