Issue with RTSP Streaming on Jetson Orin NX (Jetpack 5.1.2)

I am currently using a Jetson Orin NX with Jetpack 5.1.2 and facing an issue while using v4l2loopback to create a virtual video device (video3), which is then used for RTSP streaming.

Issue Description:

When an RTSP connection is first established to my device, it works fine. However, if I attempt to reconnect, my application crashes with the following logs:

stream ready at rtsp://127.0.0.1:8554/payload
RTSP[run] (): rtsp running 
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 4 
===== NvVideo: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
H264: Profile = 66, Level = 0 
NVMEDIA: Need to set EMC bandwidth : 846000 
Opening in BLOCKING MODE 
Failed to open /dev/video1: No such file or directory
Opening in BLOCKING MODE
/usr/bin/payload/app-rtsp/run_rtsp_app.sh: line 47: 14017 Segmentation fault      sudo ./rtsp_app

The issue is resolved when I stop the nvargus-daemon service using:

sudo systemctl stop nvargus-daemon.service

However, stopping this service causes image corruption in certain cases. If I do not stop nvargus-daemon, I receive the following logs:

minhvo@ubuntu:~$ sudo /usr/sbin/nvargus-daemon
=== NVIDIA Libargus Camera Service (0.99.33)=== Listening for connections...=== rtsp_app[14018]: Connection established (FFFF814BC900)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module1
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
---- imager: No override file found. ----
(NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
(NvCamV4l2) Error ModuleNotPresent:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 111)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 0. (error 0xA000E)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 726)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 453)

Request for Assistance:

  1. How can I resolve this issue without stopping nvargus-daemon?
  2. If stopping nvargus-daemon is the only solution, what are the potential side effects on my system?
  3. Is there an alternative approach to avoid segmentation faults while keeping nvargus-daemon running?

Previously, when using JetPack 4.6, no issues occurred. However, after upgrading to JetPack 5.1.2, the issue appeared.

Hi,
If you don’t use Argus stack, please disable the daemon and remove the lib:

/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so

And check if the issue is still present.

Can you explain to me what is wrong with libv4l2_nvargus.so and if i disable it what parts i cant use?

The RTSP app issue has been resolved, but the image captured from the camera appears to have a problem. You can see the image below. It seems that disabling the library you mentioned is causing this error. Do you have any suggestions for a solution? I am capturing the camera using nvv4l2camerasrc.
Additionally, here are some dmesg errors I’d like to share with you, which I hope might be useful

[T3 Feb 11 10:37:39 2025] falcon 154c0000.nvenc: Direct firmware load for nvhost_nvenc080.fw failed with error -2
[T3 Feb 11 10:37:39 2025] falcon 154c0000.nvenc: Falling back to sysfs fallback for: nvhost_nvenc080.fw
[T3 Feb 11 10:37:39 2025] falcon 154c0000.nvenc: looking for firmware in subdirectory
[T3 Feb 11 10:37:42 2025] cpufreq: cpu4,cur:2102000,set:1984000,set ndiv:155
[T3 Feb 11 10:37:42 2025] pwm-tegra-tachometer 39c0000.tachometer: Tachometer Overflow is detected
[T3 Feb 11 10:37:45 2025] nvmap_alloc_handle: PID 2192: Payload-App: WARNING: All NvMap Allocations must have a tag to identify the subsystem allocating memory. Please pass the tag to the API call NvRmMemHanldeAllocAttr() or relevant.
[T3 Feb 11 10:37:45 2025] bwmgr API not supported
[T3 Feb 11 10:38:13 2025] nvgpu: 17000000.ga10b             railgate_enable_store:323  [INFO]  railgate is disabled.
[T3 Feb 11 10:39:54 2025] NVRM rpcRmApiControl_dce: NVRM_RPC_DCE: Failed RM ctrl call cmd:0x731341 result 0xffff:
[T3 Feb 11 10:39:57 2025] NVRM rpcRmApiControl_dce: NVRM_RPC_DCE: Failed RM ctrl call cmd:0x731341 result 0xffff:

Hi,
Please share information about the camera. Not sure but probably it uses Argus stack.

We use a Sony camera block and custom driver, is there anything we need to note?

Hi,
Please share the gstreamer command for launching the camera for reference. Would like to confirm which software stack it goes through.


this is my main pipeline then the rtsp app will read the video3

Hi,
After removing libv4l2_nvargus.so, please clean gstreamer cache:

$ rm .cache/gstreamer-1.0/registry.aarch64.bin

And re-launch the pipelines. See if it works.

If it still does not work, please try v4l2src for video3. Would like to clarify if it is specific to nvv4l2camerasrc.

The issue has been resolved. The blue image was caused by the H265 decoder on the client machine; simply switching the server to H264 fixed it. Thank you for your support!

1 Like

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