Camera D435i not detected after reboot
Device: Nvidia Jetson AGX Orin JetPack Version: 6.2.1 Kernel: 5.15.148-tegra System: Ubuntu 22.04 Camera: D435i
I followed the LibUVC-backend installation to install the driver (suggested #13611) and it goes through. I open rs-enumerate-device and it returns the correct output of my camera.
But whenever I restart the pc, the device cannot be detected anymore
02/10 11:34:09,513 ERROR [281473527812128] (rs.cpp:256) [rs2_create_device( info_list:0xaaab05ec62c0, index:0 ) UNKNOWN] bad optional access
02/10 11:34:09,513 ERROR [281473527812128] (rs.cpp:256) [rs2_delete_device( device:nullptr ) UNKNOWN] null pointer passed for argument "device"
Could not create device - bad optional access . Check SDK logs for details
No device detected. Is it plugged in?
```. realsense-viewer also cannot detect the camera. Why is it the case?
Hi @XiaoweiLinXL This issue of a camera not being detected after rebooting the computer has occurred in a small number of past cases - see examples at https://github.com/IntelRealSense/librealsense/issues/1615 and https://github.com/IntelRealSense/librealsense/issues/5913 - and seems to be related to the BIOS configuration of a particular computer set by its manufacturer rather than a problem with the camera.
The camera may be detected if a full shutdown and start-up with the power button instead of a reboot is performed.
For some RealSense users, using an rtcwake command to 'wake up' the computer has made the camera detectable - see https://github.com/IntelRealSense/librealsense/issues/1615#issuecomment-501050619
You could also test the camera with a USB hub device if you are not doing so already, as a hub will have its own USB controller separate from the USB controller on the computer that handles its USB ports.
Hi @XiaoweiLinXL Do you require further assistance with this case, please? Thanks!
I have same problem. After fixing laptop and IMU problem, I connect D456 camera to Jetson Orin Nano Super dev kit and following ROS-wrapper installation guide. After that got same error when executing rs-enumerate-devices. Excecuting realsense-viewer i got error: 17/10 15:04:32,749 ERROR [281473236008992] (context.cpp:40) No valid configuration file found at : /home/orin/.realsense-config.json loading defaults ros2 launch realsense2_camera rs_launch.py gives me those errors: [realsense2_camera_node-1] [INFO] [1760703119.738849893] [camera.camera]: RealSense ROS v4.56.4 [realsense2_camera_node-1] [INFO] [1760703119.739131512] [camera.camera]: Built with LibRealSense v2.56.4 [realsense2_camera_node-1] [INFO] [1760703119.739177334] [camera.camera]: Running with LibRealSense v2.56.4 [realsense2_camera_node-1] 17/10 15:11:59,767 WARNING [281472374126816] (ds-motion-common.cpp:452) No HID info provided, IMU is disabled [realsense2_camera_node-1] 17/10 15:11:59,768 ERROR [281472374126816] (rs.cpp:256) [rs2_create_device( info_list:0xffff5c01ede0, index:0 ) UNKNOWN] bad optional access [realsense2_camera_node-1] 17/10 15:11:59,768 ERROR [281472374126816] (rs.cpp:256) [rs2_delete_device( device:nullptr ) UNKNOWN] null pointer passed for argument "device" [realsense2_camera_node-1] 17/10 15:11:59,769 WARNING [281472374126816] (rs.cpp:392) null pointer passed for argument "device" [realsense2_camera_node-1] [WARN] [1760703119.769020725] [camera.camera]: Device 1/1 failed with exception: bad optional access [realsense2_camera_node-1] [ERROR] [1760703119.769129328] [camera.camera]: The requested device with is NOT found. Will Try again.
But streaming with gstreamer works fine.
Hi @laidovaldvee The No valid configuration file found realsense-viewer error may not be a problem, as realsense-viewer should automatically use its default settings if the file realsense-config.json cannot be found on the computer.
In regard to the ROS2 wrapper error No HID info provided, IMU is disabled, are you using JetPack 6? If you are then cameras equipped with an IMU may have problems such as no access to the IMU or the camera not being detected at all. This is because JetPack 6 removed a function called hiddraw that RealSense IMU-equipped cameras depended upon.
A workaround that succeeds in most of these JP6 problems with IMU is to build the librealsense SDK from source code with CMake with the libuvc backend installation method at the link below, as this method of building from source code bypasses the kernel.
https://github.com/IntelRealSense/librealsense/blob/master/doc/libuvc_installation.md
The libuvc procedure provides a pre-made build script called 'libuvc_installation.sh'
https://github.com/IntelRealSense/librealsense/blob/master/scripts/libuvc_installation.sh
You may read in some places that if the libuvc backend installation method still does not resolve the problem then the older firmware 5.13.0.50 can be installed to achieve a solution. Do not do this with your D456 or it will make the camera stop functioning, as firmware 5.13.0.50 does not have support for the D456 camera model.
After installing librealsense with libuvc backend, rs-enumerate-device only works with sudo rights.
@laidovaldvee Does launching programs with sudo cause difficulties for your particular computer system, please?
@XiaoweiLinXL Can you provide an update about your own problem, please - do you still require assistance with it?
@MartyG-RealSense I found a solution. I have multiple librealsense installations. One from libuvc and one from ROS-wrapper. By default ROS one wants to start. But after I add export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH} at the end of .bashrc then everything works.
That's great to hear, @laidovaldvee - thanks so much for the update and for sharing the details of the solution that worked for you!
Case closed due to solution achieved and no further comments received.