Issue with qv4l2 for R32.5

I’ve been on the Jetson platform for a while now and have been using qv4l2 just fine with the command qv4l2 -d /dev/video0. Now if I try to use that command for any of my 4 cameras on the devkit (2 CSI and 2 UVC), I get the following:

Opening in BLOCKING MODE
Available Sensor modes :
Resolution:
...

DEFAULT no IOCTL called
DEFAULT no IOCTL called
DEFAULT no IOCTL called
DEFAULT no IOCTL called
DEFAULT no IOCTL called
DEFAULT no IOCTL called
DEFAULT no IOCTL called
DEFAULT no IOCTL called
DEFAULT no IOCTL called
Not Implemented
DEFAULT no IOCTL called
DEFAULT no IOCTL called
DEFAULT no IOCTL called
DEFAULT no IOCTL called
DEFAULT no IOCTL called
Unsupported memory type
Segmentation fault (core dumped)

I’ve never seen this before and the only thing I can think of that is different on my setup is that I moved to R32.5 from R32.4. The cameras are still working fine for my application. The command also still works if I use raw mode with -R. I don’t know what raw mode is and why it works though.

What’s the pixel type of the CSI camera?
Have you try the v4l2-ctl.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/camera_sensor_prog.html#wwpID0E0LF0HA

Using v4l2-ctrl --list-formats-ext, the CSI cameras are RG10 and the UVC are YUYV although I’m capturing in MJPG.

Using v4l2-compliance, I get the following:
CSI:

v4l2-compliance -d /dev/video0
v4l2-compliance SHA   : not available

Driver Info:
	Driver name   : tegra-video
	Card type     : vi-output, imx219 7-0010
	Bus info      : platform:54080000.vi:0
	Driver version: 4.9.201
	Capabilities  : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps   : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
	test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
	test second video open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
	test for unlimited opens: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Test input 0:

	Control ioctls:
		test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
		test VIDIOC_QUERYCTRL: OK
		test VIDIOC_G/S_CTRL: OK
		test VIDIOC_G/S/TRY_EXT_CTRLS: OK
		test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
		test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
		Standard Controls: 1 Private Controls: 17

	Format ioctls:
		test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
		fail: v4l2-test-formats.cpp(1184): ret && node->has_frmintervals
		test VIDIOC_G/S_PARM: FAIL
		test VIDIOC_G_FBUF: OK (Not Supported)
		test VIDIOC_G_FMT: OK
		test VIDIOC_TRY_FMT: OK
		test VIDIOC_S_FMT: OK
		test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
		test Cropping: OK (Not Supported)
		test Composing: OK (Not Supported)
		test Scaling: OK (Not Supported)

	Codec ioctls:
		test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
		test VIDIOC_G_ENC_INDEX: OK (Not Supported)
		test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

	Buffer ioctls:
		test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
		test VIDIOC_EXPBUF: OK

Test input 0:


Total: 43, Succeeded: 42, Failed: 1, Warnings: 0

UVC:

v4l2-compliance -d /dev/video3
v4l2-compliance SHA   : not available

Driver Info:
	Driver name   : uvcvideo
	Card type     : USB 2.0 Camera
	Bus info      : usb-70090000.xusb-2.4
	Driver version: 4.9.201
	Capabilities  : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps   : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format

Compliance test for device /dev/video3 (not using libv4l2):

Required ioctls:
	test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
	test second video open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
	test for unlimited opens: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Test input 0:

	Control ioctls:
		fail: v4l2-test-controls.cpp(214): missing control class for class 00980000
		fail: v4l2-test-controls.cpp(251): missing control class for class 009a0000
		test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL
		test VIDIOC_QUERYCTRL: OK
		warn: v4l2-test-controls.cpp(434): s_ctrl returned EIO
		warn: v4l2-test-controls.cpp(434): s_ctrl returned EIO
		warn: v4l2-test-controls.cpp(434): s_ctrl returned EIO
		test VIDIOC_G/S_CTRL: OK
		warn: v4l2-test-controls.cpp(671): s_ext_ctrls returned EIO
		warn: v4l2-test-controls.cpp(671): s_ext_ctrls returned EIO
		warn: v4l2-test-controls.cpp(695): g_ext_ctrls(0) invalid error_idx 0
		warn: v4l2-test-controls.cpp(740): s_ext_ctrls returned EIO
		warn: v4l2-test-controls.cpp(756): error_idx should be equal to count
		warn: v4l2-test-controls.cpp(774): error_idx should be equal to count
		test VIDIOC_G/S/TRY_EXT_CTRLS: OK
		test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
		test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
		Standard Controls: 14 Private Controls: 0

	Format ioctls:
		test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
		warn: v4l2-test-formats.cpp(1216): S_PARM is supported but doesn't report V4L2_CAP_TIMEPERFRAME
		fail: v4l2-test-formats.cpp(1140): node->has_frmintervals && !cap->capability
		test VIDIOC_G/S_PARM: FAIL
		test VIDIOC_G_FBUF: OK (Not Supported)
		test VIDIOC_G_FMT: OK
		test VIDIOC_TRY_FMT: OK
		warn: v4l2-test-formats.cpp(887): Could not set fmt2
		test VIDIOC_S_FMT: OK
		test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
		test Cropping: OK (Not Supported)
		test Composing: OK (Not Supported)
		test Scaling: OK (Not Supported)

	Codec ioctls:
		test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
		test VIDIOC_G_ENC_INDEX: OK (Not Supported)
		test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

	Buffer ioctls:
		test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
		test VIDIOC_EXPBUF: OK

Test input 0:


Total: 43, Succeeded: 41, Failed: 2, Warnings: 11

Does the error for both CSI and USB camera?

Yes, it happens for 2 CSI and 2 UVC cameras. All of which were fine using qv4l2 before. v4l2-ctl --set-ctrl seems to work fine and which is what I use in my program, but qv4l2 was much easier to experiment with different settings. The version of qv4l2 I have is 1.14.2-1.

I think the error could be the sensor didn’t implement some function that could be normal.
Did you try the USB camera on any x86 host PC.

You may try adding --raw (-R) option:

qv4l2 -R -d /dev/video3

Yes, the UVC cameras work just fine on my Windows 10 laptop with the default camera application. Does the error from v4l2-compliance not tell us anything? It had 1 error for the CSI and 2 errors and 11 warnings for the UVC.

@Honey_Patouceul, yeah I saw that -R makes it work. Do you know why? The command was working just fine without raw mode.

No, I’ve just noticed that with R32.5.1 and found this workaround.

Seems I’m unable to use guvcview as well…
I have a CSI IMX219 and USB ZED Camera on NX, but guvcview fails and only propose 2 argus devices while I’m specifying my ZED video node.
Not sure, but seems to me that that any V4L enumeration may now result in some Argus action, logging when not appropriate, and blocking further.
Someone from NVIDIA should be able to reproduce that and provide more correct information.

I think qv4l2 failed without -R should be the APP issue. It’s could be the UVC didn’t implement some CID or memory operation cause the issue. Did you have verify on any others platform with qv4l2?