No /dev/video0 file found for onboard camera

Hello,

I have been trying to use the onboard camera on the Jetson Tx2 in my application. It is not working and I have found that the video node for the camera is not created, and I have confirmed that /dev/video0 does not exist even though the onboard camera is plugged into the camera connector on the board.

For additional information:
Using Gstreamer pipeline:
"nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720,
format=(string)NV12, framerate=(fraction)60/1 ! nvvidconv !
video/x-raw, width=(int)1280, height=(int)720, format=(string)BGRx !
queue max-size-buffers=1 leaky=downstream !
videoconvert ! video/x-raw, format=(string)BGR ! appsink sync=false "

Returns : “Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:521 No cameras available”

While using the same pipeline but instead with nvcamerasrc, it returns:
"(python3:12182): GStreamer-CRITICAL **: 23:09:00.682:
Trying to dispose element capsfilter1, but it is in PAUSED instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

(python3:12182): GStreamer-CRITICAL **: 23:09:00.683:
Trying to dispose element capsfilter0, but it is in PAUSED instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

(python3:12182): GStreamer-CRITICAL **: 23:09:00.684:
Trying to dispose element videoconvert0, but it is in PAUSED instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

(python3:12182): GStreamer-CRITICAL **: 23:09:00.684:
Trying to dispose element queue0, but it is in PAUSED instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

(python3:12182): GStreamer-CRITICAL **: 23:09:00.684:
Trying to dispose element nvvconv0, but it is in PAUSED instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

(python3:12182): GStreamer-CRITICAL **: 23:09:00.685:
Trying to dispose element pipeline0, but it is in READY instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
) in cvCaptureFromCAM_GStreamer, file /home/nvidia/build_opencv/opencv/modules/videoio/src/cap_gstreamer.cpp, line 887
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:

/home/nvidia/build_opencv/opencv/modules/videoio/src/cap_gstreamer.cpp:887: error: (-2) GStreamer: unable to start pipeline
in function cvCaptureFromCAM_GStreamer"

Only once the program is forcefully stopped.

I believe the error may lie mostly in the fact that /dev/video0 does not exist. So my question is what the reason for this could be, is it a hardware issue?

Thank you.

First you would poweroff your TX2 and try to re-seat the onboard camera module.

After reboot, check for kernel messages about camera in dmesg.

Then check for /dev/video0:
ls /dev/video*

Also note that nvvidconv plugin may require at least one of its input or output to be in NVMM memory.

I have done as recommended, but after re-seating the module /dev/video0 is still not created.

[ 0.460256] GPIO line 461 (camera-control-output-low) hogged as output/low
[ 0.460280] GPIO line 456 (camera-control-output-low) hogged as output/low
[ 0.460301] GPIO line 457 (camera-control-output-low) hogged as output/low
[ 0.460322] GPIO line 426 (camera-control-output-low) hogged as output/low

[ 1.055037] tegra_camera_platform tegra-camera-platform: tegra_camera_probe:camera_platform_driver probe
[ 1.055207] misc tegra_camera_ctrl: tegra_camera_isomgr_register tpg_max_iso = 3916800KBs
[ 1.055218] misc tegra_camera_ctrl: tegra_camera_isomgr_register isp_iso_bw=4687500, vi_iso_bw=2000000, max_bw=4687500
[ 1.058230] tegra-pcie 10003000.pcie-controller: probing port 2, using 1 lanes

These are kernel messages I could find regarding camera, I do not know what messages I should specifically look for, so please tell me if there are any additional information messages I should include in my reply.

If you are using the standard ov5693 sensor onboard camera module, this should help (output from a Xavier R32.4.2):

dmesg | egrep "ov5693|camera"
[    0.869374] GPIO line 347 (camera-control-output-low) hogged as output/low
[    0.869405] GPIO line 350 (camera-control-output-low) hogged as output/low
[    1.484160] tegra_camera_platform tegra-camera-platform: tegra_camera_probe:camera_platform_driver probe
[    1.484383] misc tegra_camera_ctrl: tegra_camera_isomgr_register tpg_max_iso = 3916800KBs
[    1.484396] misc tegra_camera_ctrl: tegra_camera_isomgr_register isp_iso_bw=4687500, vi_iso_bw=1500000, max_bw=4687500
[    7.297684] ov5693 2-0036: probing v4l2 sensor.
[    7.299731] ov5693 2-0036: tegracam sensor driver:ov5693_v2.0.6
[    8.260398] tegra194-vi5 15c10000.vi: subdev ov5693 2-0036 bound

Yes I am currently using the onboard camera that comes as part of the tx2 developer kit. Running the same from my tx2 I receive:

tx2@tx2:/$ dmesg | egrep “ov5693|camera”
[ 0.460256] GPIO line 461 (camera-control-output-low) hogged as output/low
[ 0.460280] GPIO line 456 (camera-control-output-low) hogged as output/low
[ 0.460301] GPIO line 457 (camera-control-output-low) hogged as output/low
[ 0.460322] GPIO line 426 (camera-control-output-low) hogged as output/low
[ 1.055037] tegra_camera_platform tegra-camera-platform: tegra_camera_probe:camera_platform_driver probe
[ 1.055207] misc tegra_camera_ctrl: tegra_camera_isomgr_register tpg_max_iso = 3916800KBs
[ 1.055218] misc tegra_camera_ctrl: tegra_camera_isomgr_register isp_iso_bw=4687500, vi_iso_bw=2000000, max_bw=4687500

I cannot say much more.
Someone else may better advise.
You may also say if you’ve modified your DT, kernel or modules

I have not :/, thank you anyways for help.

Which BSP?
If r32.3.1 or later version please have a check if there’s ov5693.ko at /lib/modules/4.9.140-tegra/kernel/drivers/media/i2c/

I am currently on L4T 32.2.3, having still tried to look for the file i found that the directory i2c does not exist within /lib/modules/4.9.140-tegra/kernel/drivers/media/

OV5693 kernel drive in R32.2.3 still a build in kernel driver it’s normally can’t find it.
Did you apply your customizer Image? If not with default dtb and Image should not have problem for register ov5693.

Hi malcolmvas,

Have your managed to get issue resolved? Any result can be shared?