Failed to access the onboard camera using 'nvcamerasrc'

Hello,

I find it a bit odd but when I ran one of the gstreamer pipelines to access onboard camera, it gives me an error.

nvidia@tegra-ubuntu:~$ gst-launch-1.0 nvcamerasrc fpsRange="30.0 30.0" ! "video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12" ! nvvidconv flip-method=0 ! "video/x-raw(memory:NVMM), format=I420" ! nvoverlaysink -e
Setting pipeline to PAUSED ...
Socket read error. Camera Daemon stopped functioning.....
gst_nvcamera_open() failed ret=0
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
gstbasesrc.c(3354): gst_base_src_start (): /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0:
Failed to start
Setting pipeline to NULL ...
Freeing pipeline ...

Has anyone faced this issue before? What could be the possible solution?

Not sure, and away from my Jetson so cannot test, but the camera has 3 modes, the one with 1280x720 is 120 fps but you’re restricting to 30 fps.
If you want to use 30 fps, you may try the following:

gst-launch-1.0 nvcamerasrc ! "video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=30/1, format=(string)I420" ! nvoverlaysink -e

Hi,

Thanks for your response. I ran the above pipeline and still got the same error.

gst-launch-1.0 nvcamerasrc ! "video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=30/1, format=(string)I420" ! nvoverlaysink -e
Setting pipeline to PAUSED ...
Socket read error. Camera Daemon stopped functioning.....
gst_nvcamera_open() failed ret=0
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
gstbasesrc.c(3354): gst_base_src_start (): /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0:
Failed to start
Setting pipeline to NULL ...
Freeing pipeline ...

I checked a few similar posts and it looks like a kernel problem. However, I have zero experience in building/debugging kernels.

BTW, I am using TX1 devkit. No custom boards.

You may get some info about the failure with gstreamer debug:

GST_DEBUG=*.3 gst-launch-1.0 nvcamerasrc ! "video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=30/1, format=(string)I420" ! nvoverlaysink -e

You may also look at syslog by running:

tail --follow /var/log/syslog

in a second shell. This way you will see some messages and errors as you run your command in first shell.

Is it the same after a fresh reboot?

Even after reboot, it doesn’t work at all.

Debug information:

nvidia@tegra-ubuntu:~$ GST_DEBUG=3 gst-launch-1.0 nvcamerasrc ! "video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=30/1, format=(string)I420" ! nvoverlaysink -e
0:00:00.052786285  2333       0x5f9f80 WARN                     omx gstomx.c:2836:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/nvidia/.config:/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
Setting pipeline to PAUSED ...
Socket read error. Camera Daemon stopped functioning.....
0:00:00.287065542  2333       0x5f9f80 ERROR            nvcamerasrc gstnvcamerasrc.cpp:2336:gst_nvcamera_open:<nvcamerasrc0> REQ_NVCAM_CREATE_SESSION to camera_daemon failed

gst_nvcamera_open() failed ret=0
0:00:00.287097581  2333       0x5f9f80 WARN                 basesrc gstbasesrc.c:3354:gst_base_src_start:<nvcamerasrc0> error: Failed to start
0:00:00.287178746  2333       0x5f9f80 WARN                 basesrc gstbasesrc.c:3725:gst_base_src_activate_push:<nvcamerasrc0> Failed to start in push mode
0:00:00.287197552  2333       0x5f9f80 WARN                GST_PADS gstpad.c:1106:gst_pad_set_active:<nvcamerasrc0:src> Failed to activate pad
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
gstbasesrc.c(3354): gst_base_src_start (): /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0:
Failed to start
Setting pipeline to NULL ...
Freeing pipeline ...

The information provided by logs:

Dec 14 16:17:20 tegra-ubuntu nvcamera-daemon[1054]: nvcamera-daemon started new client thread = 547475096032
Dec 14 16:17:20 tegra-ubuntu nvcamera-daemon[1054]: (547475096032) USB Sensors :  0 CSI Sensors :  0
Dec 14 16:17:20 tegra-ubuntu nvcamera-daemon[1054]: (547475096032) Could not create source error= 4 sensor-id= 0
Dec 14 16:17:20 tegra-ubuntu nvcamera-daemon[1054]: (547475096032) Closing Client Connection Thread: nbytes 820
Dec 14 16:17:20 tegra-ubuntu nvcamera-daemon[1054]: (547475096032) Capture Done: Thread Exiting....

If I am not wrong, shouldn’t one of the USB or CSI sensors be 1 instead of 0?

Yes, it seems the camera is not detected. Unless your devkit is a SE edition, it doesn’t look normal to me. Do you see related errors to this in dmesg ?

dmesg | grep -iv "scsi" | egrep -i "csi|ov5693"

Hi,

Sorry for the late reply. I was away from the Jetson TX1 Kit. After a fresh install of JetPack and Flashing the L4T the same error still persists.

The output of the suggested command returns nothing.

Could this be a hardware problem?

I cannot say for sure, but if you still get this after a fresh JetPack full install flash and your board is a standard Jetson devkit, hw failure is a possible cause.
On my TX1 running R28.1, I get this:

dmesg | egrep -i "ov5693|capture"
[    0.346993] Linux video capture interface: v2.00
[    3.064971] [OV5693]: probing v4l2 sensor.

Do you see errors in dmesg ?

No, I don’t see anything as an output of that command.

No, I don’t see anything as an output of that command.

You can check for errors with :

dmesg | less

You can also attach file kmsg.log generated with:

dmesg > kmsg.log

Note that you can only attach a file to a previously posted message. If you attach your kmsg.log file, I may be able (or not) to see where your case comes different from mine working.

Here is the log file.

To generate this, I ran the nvcamerasrc pipeline ad then saved the dmesg output to log file. I believe that should capture the right information if any.

Thanks.
kmsg.log (85.8 KB)

Please see if below comment helps in your case.

[url]https://devtalk.nvidia.com/default/topic/1019986/jetson-tx1/getting-errors-in-using-onboard-camera-jetpack-3-1-/post/5203796/#5203796[/url]

I will check this. Currently, cannot reflash the TX1 because it takes some time to get other libraries installed.

Thanks for the suggestion.

Your log is incomplete…I cannot see the boot time, it’s only full of:

tegra_soctherm 700e2000.soctherm: soctherm: trip temperature -2147483647 forced to -127000

Searching for this on the forum leads to various posts, and the one mentioned by @vickyy seems very relevant.
Do you have any boot script for clocks or thermal zones ?
You may also try to boot with no USB nor HDMI device, using only serial console or wired ethernet and check if it’s the same in dmesg, but reflashing cboot is probably the way to move on.

Hi, I am not sure if there is any startup script running. Someone else worked on this board before but I have done a fresh install of Jetpack and L4T. Shouldn’t it remove all the previous files?

Anyways, I think that trying vickyy’s suggestion looks like the right next step. However, I am not going to do this soon as I am able to use another (IP) Camera for now.

Hi bhargavK,

Have you solved this ? If reflashing cboot has not improved, I’ve seen this post describing similar symptoms (CSI camera not detected) because of EEPROM not giving right information : [url]Hardware Issue on Camera Board - Jetson TX2 - NVIDIA Developer Forums.

Hi,

Thanks for the update. I haven’t had time to try the cboot as using the onboard camera isn’t the priority and I’m away from TX1 for a few days. I’ll try sometime over a weekend and update.

Thanks.

the camera module itself may need to be re-seated.