Jetson Nano crashes when I try to stream camera

So I have a JetRacer AI kit (with Jetson Nano Dev Kit 4GB), and it has JetPack 4.5.1. I am trying to open the camera, but every time I do, the Jetson Nano crashes and reboots itself. I thought it might be a power issue, so I switched to a 5V 4A barrel jack power supply instead of using pins, but the problem persists.

I also checked the power mode and set it to maximum performance using:

sudo nvpmodel -m 0
sudo jetson_clocks

Then, I tested the camera with GStreamer using:

gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink

However, the Jetson still crashes when running this command. I tried restarting the camera daemon with:

sudo systemctl restart nvargus-daemon

but that didn’t resolve the issue either.

To rule out memory-related crashes, I increased the swap memory to 4GB:

sudo fallocate -l 4G /mnt/swapfile
sudo chmod 600 /mnt/swapfile
sudo mkswap /mnt/swapfile
sudo swapon /mnt/swapfile

Then, I made it permanent by adding it to /etc/fstab:

echo "/mnt/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab

still nothing.

Hello @Ege_Mineas,

That is very interesting.

Just out of curiosity, have you tried running a much simpler pipeline such as sending the buffers directly to a fakesink after the nvarguscamerasrc ?

gst-launch-1.0 nvarguscamerasrc ! fakesink

Also, do you have the option of connecting a USB camera into the board for testing?

best regards,
Andrew

Hello Andrew,

Thank you for your response and for looking into this issue!

I tried running the simpler pipeline you suggested:

gst-launch-1.0 nvarguscamerasrc ! fakesink

Unfortunately, the Jetson Nano still crashes and reboots immediately when executing this command.

I don’t have a USB camera available for testing, but I do have Raspberry Pi Camera Module 2 and 3. If it would help with debugging, I can try using one of those.

Additionally, I should mention that my system is booting from USB storage instead of an SD card. Could this be a factor in the issue?

Let me know if you have any further suggestions. I really appreciate your help!

Hi @Ege_Mineas,

Thanks for trying the test we suggested and getting back to us so quickly.

Hmm… Interesting.

There are a couple of tests we could also try:

  1. We could try using a videotestsrc in order to take nvarguscamerasrc out of the equation:
gst-launch-1.0 videotestsrc ! fakesink
  1. We can try capturing with v4l2-ctl instead of GStreamer:
v4l2-ctl --device /dev/video0 --stream-mmap --set-ctrl bypass_mode=0

Note: with bypass_mode you can either bypass or not the ISP processing.

  1. Trying a different camera module could also be a good test. Just be aware that you might need to use a different DTB or DTB overlay in order to use that one instead.

Just out of curiosity, what camera module are you using?

best regards,
Andrew
Embedded Software Engineer at ProventusNova

Hi Andrew,

Thanks again for your help and the additional test suggestions!

I tried both commands you provided:

gst-launch-1.0 videotestsrc ! fakesink

Unfortunately, the Jetson still crashes and reboots immediately.

v4l2-ctl --device /dev/video0 --stream-mmap --set-ctrl bypass_mode=0

This also results in a no command found.

Since both tests fail, I’m starting to suspect that the camera driver might be corrupted or there is a deeper system-related issue. Do you think reinstalling the camera-related drivers or checking dmesg logs would help pinpoint the problem?

Hello @Ege_Mineas,

Thanks for getting back with the test results.

We don’t think is a camera issue given that the first command we sent also crashed the board:

gst-launch-1.0 videotestsrc ! fakesink

This command does not even use the camera, it creates a virtual test source without requiring any camera resource to be available. Therefore, this means that the board is crashing only by running the get-launch-1.0 application.

Can you try running the following command so we can check if is only get-launch-1.0 that gives issues?

get-inspect-1.0

Also, as per the second command I sent last time.
It is giving you the command not found error probably because you don’t have v4l-utils installed. Please try installing the package:

sudo apt install v4l-tools

after that, you can retry capturing from the camera with:

v4l2-ctl --device /dev/video0 --stream-mmap --set-ctrl bypass_mode=0

If nothing works. It might be worth trying a re-flash.

Please keep us posted on the test results.

best regards,
Andrew
Embedded Software Engineer at ProventusNova

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