Camera IMX477 NvBufSurfaceFromFd Failed

Hello,

Since an update I can’t get my CSI camera (IMX477) to work. Even after I reset the Jetson and reinstall the driver with https://github.com/ArduCAM/MIPI_Camera/releases/download/v0.0.3/install_full.sh

I have the Jetson Orin Nano Developer Kit and installed Jetpack 5.1.2 (I also tried on Jetpack 5.1.1 rev1 - same error)

I also configured the CSI connector with /opt/nvidia/jetson-io/jetson-io.py to IMX477 Dual

Here is the output from dmesg concerning the driver loading. There is currently only one camera connected:

[   12.630710] nv_imx477: no symbol version for module_layout
[   12.637330] imx477 9-001a: tegracam sensor driver:imx477_v2.0.6
[   12.941774] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx477 9-001a bound
[   12.944118] imx477 10-001a: tegracam sensor driver:imx477_v2.0.6
[   13.246631] imx477 10-001a: imx477_board_setup: error during i2c read probe (-121)
[   13.261341] imx477 10-001a: board setup failed
[   13.268348] imx477: probe of 10-001a failed with error -121

I can see the device /dev/camera0

When I try to capture whether is with gst-launch or nvgstcapture, I have the same error:

GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 4032 x 3040 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3840 x 2160 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 2 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)

The camera and cable works (I tried on a raspberry pi) I don’t know what to do?

hello luc12,

is this IMX477 running with 2-lane or 4-lane configuration?
there’s CSI0 D1 and CSI1 D0 P/N will always been swizzled for P/N.
please check you’ve used device tree property, lane_polarity to configure a polarity swap on any lane.

besides,
you may refer to developer guide, Applications Using V4L2 IOCTL Directly to check basic camera functionality with V4L2 IOCTL.

It’s running with 2-lane configuration.

When I run this, it is just stuck and the file ov5693.raw stay empty.
$ v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --stream-mmap --stream-count=1 -d /dev/video0 --stream-to=ov5693.raw

hello luc12,

is it able to pass v4l2-compliance test?
may I also know what’s the failure reported by kernel side, i.e. $ dmesg > klogs.txt

It fail the v4l2-compliance test

v4l2-compliance SHA: not available, 64 bits

Compliance test for tegra-video device /dev/video0:

Driver Info:
	Driver name      : tegra-video
	Card type        : vi-output, imx477 9-001a
	Bus info         : platform:tegra-capture-vi:1
	Driver version   : 5.10.120
	Capabilities     : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : tegra-camrtc-ca
	Model            : NVIDIA Tegra Video Input Device
	Serial           : 
	Bus info         : 
	Media version    : 5.10.120
	Hardware revision: 0x00000003 (3)
	Driver version   : 5.10.120
Interface Info:
	ID               : 0x0300000b
	Type             : V4L Video
Entity Info:
	ID               : 0x00000009 (9)
	Name             : vi-output, imx477 9-001a
	Function         : V4L2 I/O
	Pad 0x0100000a   : 0: Sink
	  Link 0x0200000f: from remote pad 0x1000003 of entity '13e40000.host1x:nvcsi@15a00000-': Data, Enabled

Required ioctls:
	test MC information (see 'Media Driver Info' above): OK
	test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
	test second /dev/video0 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)

Control ioctls (Input 0):
	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: 20

Format ioctls (Input 0):
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
		fail: v4l2-test-formats.cpp(1280): 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 (Input 0):
	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 (Input 0):
		fail: v4l2-test-buffers.cpp(715): q.create_bufs(node, 1, &fmt) != EINVAL
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
	test VIDIOC_EXPBUF: OK
	test Requests: OK (Not Supported)

Total for tegra-video device /dev/video0: 45, Succeeded: 43, Failed: 2, Warnings: 0

Here is the dmesg output with the camera connected on port CAM0:
klogs.txt (71.3 KB)

It worked friday two weeks ago and it seems it’s after an update that it doesn’t work anymore, I don’t know if ubuntu have a snapshot system for their update. Does it seem plausible or is it more probable to be an hardware problem? Is there a way to test the low level memory?

1 Like

Hello,

Was there any more advice available or possibly a solution - I’m having the exact same problem only on an Xavier (Jetpack 5.1.2, IMX477)

Hello,

I just tried exactly the same on a new Jetson nano orin that I received today and the camera work. I conclude that it was related to a hardware problem.

I would like to know if many people have the same problem, maybe there is a weak part in the hardware that must be fixed?

Best

Apologies all, in my case I re-fetched and re-installed the required libraries (DeepStream 6.3 and deps) and that fixed my issue.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.