Select Timeout Error When Capturing Images using OpenCV VideoCapture and USB2.0 Camera

I occassionally see the error select timeout when capturing images from an OpenCV VideoCapture object in Python 3 on my Jetson Nano. Prior to launching video capture, I run the following two commands (based on this article):

rmmod uvcvideo
modprobe uvcvideo nodrop=1 timeout=5000 quirks=0x80

Despite this, I still see the select timeout error. Running dmesg on a device experiencing these errors returns the following:

[ 2234.847075] nvgpu: 57000000.gpu gk20a_fifo_tsg_unbind_channel_verify_status:2200 [ERR]  Channel 500 to be removed from TSG 8 has NEXT set!
[ 2234.859701] nvgpu: 57000000.gpu          gk20a_tsg_unbind_channel:164  [ERR]  Channel 500 unbind failed, tearing down TSG 8
[ 2234.872166] nvgpu: 57000000.gpu gk20a_fifo_tsg_unbind_channel_verify_status:2200 [ERR]  Channel 502 to be removed from TSG 7 has NEXT set!
[ 2234.884674] nvgpu: 57000000.gpu          gk20a_tsg_unbind_channel:164  [ERR]  Channel 502 unbind failed, tearing down TSG 7
[ 2237.087451] usb 1-2.3: usb_suspend_both: status 0
[ 2238.743060] usbcore: deregistering interface driver uvcvideo
[ 2239.068130] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (05a3:8830)
[ 2239.068137] uvcvideo: Forcing device quirks to 0x80 by module parameter for testing purpose.
[ 2239.068141] uvcvideo: Please report required quirks to the linux-uvc-devel mailing list.
[ 2239.077947] uvcvideo 1-2.3:1.0: Entity type for entity Extension 4 was not initialized!
[ 2239.086275] uvcvideo 1-2.3:1.0: Entity type for entity Extension 3 was not initialized!
[ 2239.095262] uvcvideo 1-2.3:1.0: Entity type for entity Processing 2 was not initialized!
[ 2239.103455] uvcvideo 1-2.3:1.0: Entity type for entity Camera 1 was not initialized!
[ 2239.111504] input: USB 2.0 Camera as /devices/70090000.xusb/usb1/1-2/1-2.3/1-2.3:1.0/input/input5
[ 2239.111789] usbcore: registered new interface driver uvcvideo
[ 2239.111792] USB Video Class driver (1.1.1)
[ 2241.184416] usb 1-2.3: usb_suspend_both: status 0
[ 2284.967512] uvcvideo: Non-zero status (-71) in video completion handler.

Do any of these errors indicate any reason why the Nano would fail to interface with the camera?

For launching USB camera in OpenCV, we would suggest combine gstreamer+OpenCV. Please refer to

Hi @DaneLLL

Thanks for the info, looks like that approach involves compiling OpenCV from source. I’ve tried this on my Jetson Nano in the past and had some issues (specifically, setting the image capture resolution using cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1920) and cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080) would cause my VideoCapture object to stop returning frames when trying to read frames). Is there any other way that I can use gstreamer and OpenCV?

You don’t need to compile OpenCV. It is 4.1.1 in Jetpack4.3(R32.3.1).
You can apply width, height, format, framerate of your source to the sample and it should work.