IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.53k stars 4.81k forks source link

RealSense D456 Camera Not Detected #13303

Open jrecasens opened 2 weeks ago

jrecasens commented 2 weeks ago

Hello,

I am currently facing an issue with one of two RealSense D456 cameras on a production device at a client site . After a month of normal operation, one camera is no longer detected on the system (Ubuntu 22.04.4 LTS / Kernel 6.8.0-40-generic). Since the camera is installed in another country, remote resolution is crucial, as physical access is not possible.

Here’s a summary of the troubleshooting steps I’ve taken so far:

Despite these efforts, the issue persists, with this camera remaining undetected while the other functions properly. Both cameras are connected to the same bus, and we have visually confirmed that the problematic camera is securely in place inside our enclosure.

Thank you for your support.

jrecasens commented 2 weeks ago

After performing a hard restart with the power off for 1 minute, the issue resolved itself, and the camera came back online. Does anyone have insights into why this might be happening?

MartyG-RealSense commented 2 weeks ago

Hi @jrecasens As you mentioned, unbinding and rebinding xhci_hcd can help, as described at https://github.com/IntelRealSense/librealsense/issues/6899#issuecomment-672293804

Some RealSense users have also found that reboot reliability increases if they enable a feature called Wake On LAN in the computer's BIOS settings.

Users at https://github.com/IntelRealSense/librealsense/issues/1615#issuecomment-501050619 and https://github.com/IntelRealSense/librealsense/issues/5913#issuecomment-590936871 (who was deploying hundreds of cameras in the field in their particular case) found that the rtcwake reboot method worked well for them, activated with the command below.

rtcwake -m off -s 30

Ultimately, I believe that it is an issue related to the BIOS of the computer, the set of stored configuration settings that are applied immediately after pressing the power button to boot up from a cold start, before the operating system starts loading. The BIOS that a particular model of computer has depends on the choice made by the manufacturer.

jrecasens commented 2 weeks ago

Thanks, Marty. I've decided to make some changes in the BIOS to help stabilize the system. It's crucial that our USB devices are either fully powered or not powered at all to maintain clear power states. This is that I am going to try:

I hope these changes will resolve the issue.

MartyG-RealSense commented 2 weeks ago

You are very welcome. Please do let me know if BIOS changes resolve your issue. Good luck!

MartyG-RealSense commented 4 days ago

Hi @jrecasens Do you require further assistance with this case, please? Thanks!

jrecasens commented 4 days ago

Hi Marty,

I'm currently using the poweroff and rtcwake approach as a temporary workaround, but I haven't yet found a permanent solution to the issue. I've upgraded the BIOS firmware and adjusted various settings, but the problem still persists.

One thing I've noticed is that enabling the infrared emitter to "Always ON" significantly increases the frequency of the issue, occurring almost every time. Additionally, changing the USB settings has led to a noticeable increase in the device's operating temperature.

Here’s the problematic code causing the issue:

sensor = pipeline_profile.get_device().first_depth_sensor()
enable_emitter_always_on = 1
sensor.set_option(rs.option.emitter_always_on, 1 if enable_emitter_always_on else 0)
MartyG-RealSense commented 4 days ago

What Always On does, as the name suggests, is to keep the projector in an always-on state. It does not mean that the emitter will be disabled though if it is false.

On the D415 camera model, the projector is always on. On the other RealSense 400 Series models though, the emitter instead pulses in line with exposure. Enabling Always On for the emitter enables it to emulate the always-on behavior of the D415's emitter. Non-D415 cameras can still function normally though if Always On is off and the projector pulses instead.