Orin Nano freezes and reboots when pipeline contains HW encoder
Issue Overview
Users have reported that the Nvidia Jetson Orin Nano freezes and subsequently reboots when attempting to utilize hardware-based encoding in their GStreamer pipelines. The issue primarily arises when users employ the nvv4l2h264enc
or nvv4l2h265enc
encoders, which are still present in the Jetpack images despite the Orin Nano’s lack of support for hardware encoding. Symptoms include:
- Freezing and rebooting: The device may freeze during operation, often leading to a hard reboot, likely triggered by a watchdog timer.
- Error messages: Occasionally, users may receive error messages indicating that memory could not be allocated.
- Context: This issue typically occurs during the execution of video processing applications, particularly those using GStreamer pipelines with RTSP sinks.
The problem has been consistently reported across multiple user experiences, indicating a significant impact on the functionality of applications relying on video encoding.
Possible Causes
Several potential causes for this issue have been identified:
- Hardware incompatibility: The Orin Nano does not support hardware encoding, which leads to conflicts when attempting to use these encoders.
- Software bugs: The presence of unsupported encoder libraries in the Jetpack images can lead to unexpected behavior.
- Configuration errors: Incorrectly configured GStreamer pipelines may inadvertently attempt to use hardware encoding.
- Driver issues: Conflicts or bugs within the drivers for video processing could result in system instability.
- User errors: Misconfigurations in the pipeline setup may lead to attempts to allocate resources that are not available.
Troubleshooting Steps, Solutions & Fixes
To address the freezing and rebooting issue on the Jetson Orin Nano, follow these troubleshooting steps:
-
Modify GStreamer Pipeline:
- Replace hardware encoder plugins with software alternatives. For example, modify your GStreamer command from:
gst-launch-1.0 videotestsrc ! nvvidconv ! nvv4l2h264enc bitrate=5000000 insert-sps-pps=true ! h264parse ! mpegtsmux ! rtpmp2tpay ! udpsink host=127.0.0.1 port=5000 sync=false
to:
gst-launch-1.0 videotestsrc ! nvvidconv ! nvvideoconvert ! video/x-raw,format=I420 ! x264enc ! ...
- This change will utilize a software encoder instead of a hardware one.
- Replace hardware encoder plugins with software alternatives. For example, modify your GStreamer command from:
-
Check for Software Updates:
- Ensure that you are using the latest version of Jetpack that is stable and compatible with your development needs. Avoid using developer preview versions unless necessary.
-
Test with Different Configurations:
- Isolate the issue by testing different configurations of your GStreamer pipeline and verifying if certain elements cause instability.
-
Monitor System Resources:
- Use tools like
htop
orfree -m
to monitor memory usage and ensure that there is sufficient RAM available during operation.
- Use tools like
-
Review Logs for Errors:
- Check system logs for any error messages related to memory allocation or device failures that occur before a freeze or reboot.
-
Documentation and Resources:
- Refer to the official Nvidia documentation for GStreamer and Jetpack for guidance on supported features and configurations.
- Keep an eye on community forums for updates or patches related to this issue.
-
Best Practices for Future Use:
- Always verify compatibility of encoders with your specific hardware before implementation.
- Regularly update your development environment and dependencies to minimize conflicts.
-
Unresolved Issues:
- Some users have noted ongoing difficulties with specific configurations or setups that remain unresolved, indicating a need for further investigation into driver support and encoder functionality on the Orin Nano.
By following these steps, users can mitigate the freezing and rebooting issues while working with video encoding on their Nvidia Jetson Orin Nano devices.