D457 "ds5_read(): i2c read failed -121"
After several days of operation on a mobile robot, the Realsense D457 stops streaming images. Restarting of ROS driver doesn't help, only cold reboot. Camera is connected via GMSL. Please find the full dmesg log attached.
-
Hi Shepel If a RealSense camera streams for several days before a failure occurs, typically the problem is not related to the camera hardware but to an aspect external to the camera such as the USB system (cable or port), the computer hardware or its operating system.
I retrieved the section of your kindly provided log showing the parts immediately before and after the first time that the error that you described appeared. It appears that the problem occurred in relation to accessing the camera's GMSL serializer component. As the issue is corrected by a cold reboot, it is likely that it was due to a temporary glitch in software (such as the GMSL driver) rather than a hardware problem.
[Thu Apr 25 10:00:54 2024] d4xx 44-001a: Setting up gmsl serdes...
[Thu Apr 25 10:00:54 2024] max9296 40-0048: max9296_setup_link: setup link.
[Thu Apr 25 10:00:55 2024] max9295 40-0040: max9295_write_reg:i2c write failed, 0x0 = 84
[Thu Apr 25 10:00:55 2024] max9295 40-0042: max9295_write_reg:i2c write failed, 0x10 = 21
[Thu Apr 25 10:00:55 2024] max9295 40-0042: max9295_setup_control: ERROR: ser device not found
[Thu Apr 25 10:00:55 2024] d4xx 44-001a: gmsl serializer setup failed
[Thu Apr 25 10:00:55 2024] max9296 40-0048: max9296_setup_control: serializer not found.
[Thu Apr 25 10:00:55 2024] d4xx 44-001a: serdes setup.
[Thu Apr 25 10:00:55 2024] d4xx 44-001a: ds5_serdes_setup gmsl serdes setup failed
[Thu Apr 25 10:00:55 2024] d4xx: probe of 44-001a failed with error -121
[Thu Apr 25 10:00:55 2024] i2c i2c-40: Added multiplexed i2c bus 44
[Thu Apr 25 10:00:55 2024] d4xx 45-001a: Probing new driver for D45x
[Thu Apr 25 10:00:55 2024] d4xx 45-001a: serializer reg: 0x42
[Thu Apr 25 10:00:55 2024] d4xx 45-001a: dst-csi-port = a
[Thu Apr 25 10:00:55 2024] d4xx 45-001a: src-csi-port = b
[Thu Apr 25 10:00:55 2024] d4xx 45-001a: serdes-csi-link = a
[Thu Apr 25 10:00:55 2024] d4xx 45-001a: Serdes csi link val: 1
[Thu Apr 25 10:00:55 2024] d4xx 45-001a: Board setup not supported.
[Thu Apr 25 10:00:55 2024] d4xx 45-001a: ds5_read(): i2c read failed -121, 0x5020 -
I'm also having the same issue. It is sometimes solved by a cold reboot but not always. Here is a log of the ROS driver + kernel failure.
Jun 05 11:04:44 goose-1-jetson kernel: d4xx 44-001a: ds5_raw_write(): i2c raw write failed -121, 4900 size(24) bytes
Jun 05 11:04:44 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [WARN] [1717578284.777963212] [perception.front_left.realsense]: Device 2/2 failed with exception: xioctl(VIDIOC_S_EXT_CTRLS) failed Last Error: Invalid argument
Jun 05 11:04:44 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [ERROR] [1717578284.778196689] [perception.front_left.realsense]: The requested device with serial number 242422301823 is NOT found. Will Try again.
Jun 05 11:04:51 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [INFO] [1717578291.157084626] [perception.front_left.realsense]: Device with serial number 242422304505 was found.
Jun 05 11:04:51 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3]
Jun 05 11:04:51 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [INFO] [1717578291.157483099] [perception.front_left.realsense]: Device with physical ID /sys/devices/platform/tegra-capture-vi/video4linux/video6 was found.
Jun 05 11:04:51 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [INFO] [1717578291.157594622] [perception.front_left.realsense]: Device with name Intel RealSense D457 was found.
Jun 05 11:04:51 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [WARN] [1717578291.158021960] [perception.front_left.realsense]: Error extracting usb port from device with physical ID: /sys/devices/platform/tegra-capture-vi/video4linux/video6
Jun 05 11:04:51 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] Please report on github issue at https://github.com/IntelRealSense/realsense-ros
Jun 05 11:04:51 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] 05/06 11:04:51,247 ERROR [281473475131808] (librealsense-exception.h:52) xioctl(VIDIOC_S_EXT_CTRLS) failed Last Error: Invalid argument
Jun 05 11:04:51 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] 05/06 11:04:51,248 WARNING [281473475131808] (rs.cpp:312) null pointer passed for argument "device"
Jun 05 11:04:51 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [WARN] [1717578291.248674188] [perception.front_left.realsense]: Device 2/2 failed with exception: xioctl(VIDIOC_S_EXT_CTRLS) failed Last Error: Invalid argument
Jun 05 11:04:51 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [ERROR] [1717578291.248926514] [perception.front_left.realsense]: The requested device with serial number 242422301823 is NOT found. Will Try again.
Jun 05 11:04:51 goose-1-jetson kernel: d4xx 44-001a: ds5_raw_write(): i2c raw write failed -121, 4900 size(24) bytes
Jun 05 11:04:57 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [INFO] [1717578297.543484672] [perception.front_left.realsense]: Device with serial number 242422304505 was found.
Jun 05 11:04:57 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3]
Jun 05 11:04:57 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [INFO] [1717578297.543706981] [perception.front_left.realsense]: Device with physical ID /sys/devices/platform/tegra-capture-vi/video4linux/video6 was found.
Jun 05 11:04:57 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [INFO] [1717578297.543784359] [perception.front_left.realsense]: Device with name Intel RealSense D457 was found.
Jun 05 11:04:57 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [WARN] [1717578297.544167056] [perception.front_left.realsense]: Error extracting usb port from device with physical ID: /sys/devices/platform/tegra-capture-vi/video4linux/video6
Jun 05 11:04:57 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] Please report on github issue at https://github.com/IntelRealSense/realsense-ros
Jun 05 11:04:57 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] 05/06 11:04:57,635 ERROR [281473475131808] (librealsense-exception.h:52) xioctl(VIDIOC_S_EXT_CTRLS) failed Last Error: Invalid argument
Jun 05 11:04:57 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] 05/06 11:04:57,635 WARNING [281473475131808] (rs.cpp:312) null pointer passed for argument "device"
Jun 05 11:04:57 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [WARN] [1717578297.635948271] [perception.front_left.realsense]: Device 2/2 failed with exception: xioctl(VIDIOC_S_EXT_CTRLS) failed Last Error: Invalid argument
Jun 05 11:04:57 goose-1-jetson 524800c637cd[1848]: [realsense2_camera_node-3] [ERROR] [1717578297.636117779] [perception.front_left.realsense]: The requested device with serial number 242422301823 is NOT found. Will Try again.And here is the complete kernel log: https://pastebin.com/nhYaWJef
-
Hi Tony Najjar In general, if there is a xioctl(VIDIOC_S_EXT_CTRLS) error then it is likely to be caused by a conflict between the librealsense SDK and the kernel. Building the SDK from source code in RSUSB = true mode (if you are not doing so already) may help to resolve this, as an RSUSB = true build of the SDK bypasses the kernel.
-
I have not previously seen a case of the RSUSB build mode being used with the D457's GMSL mode. The libuvc backend build script at the link below does install a MIPI version of the udev device handling rule though. The libuvc backend was the predecessor of the RSUSB method and also bypasses the kernel.
https://github.com/IntelRealSense/librealsense/blob/master/doc/libuvc_installation.md
-
I see. I don't think I would want to run it with the libuvc backend though. My reasoning is that I read there are drawbacks to RSUSB and if libuvc is the predecessor of it then it's probably even worse (?).
You did make me realize that we don't have the udev rules correctly setup for our MIPI device. Do you think that might be related? In any case I'll set them up and see if that fixes it
-
There is usually not a noticeable difference in performance between installing with libuvc or RSUSB. Whilst RSUSB is the successor of libuvc, both approaches remain valid and essentially perform the same function. The introduction of the RSUSB build flag essentially simplified configuration by acting as a single replacement for three different UVC flags (ANDROID_USB_HOST_UVC, FORCE_WINUSB_UVC and FORCE_LIBUVC).
libuvc / RSUSB is not ideal for multiple camera applications as it is best suited for use with a single camera. There are other reasons why a non-RSUSB build is superior. The link below has a good comparison of the advantages and disadvantages of a libuvc-based install vs kernel patching. Scroll down to the section of the linked-to comment headed What are the advantages and disadvantages of using libuvc vs patched kernel modules?
https://github.com/IntelRealSense/librealsense/issues/5212#issuecomment-552184604
libuvc / RSUSB is a helpful installation method in situations where there is a conflict between librealsense and the Linux kernel or librealsense is being installed on a computer with an 'exotic' hardware / software configuration instead of a typical desktop / laptop PC, such as an industrial computing board. This is because libuvc / RSUSB is not dependent on a particular Linux version or kernel version and does not require a patch to be applied to the kernel.
Installation of the udev rules are important as they are related to handling of the camera device. The link below describes how access permissions could be denied if the rules are missing or outdated unless an application is running in sudo admin permissions mode.
-
Hi MartyG
We have the same problem with the D457 camera connected via GMSL, in our case we use a Yocto Linux kernel (based on meta-tegra layer).
We have tried to compile librealsense with RSUSB backend using CMake flag -DFORCE_RSUSB_BACKEND:BOOL=ON but it does not find any GMSL camera using this method (rs-enumerate-devices does not detect anything), however the /dev is created, so the camera is present in the system.
Any idea? Any help will be very appreciated. Thank you very much. Here you can find our logs (similar to the ones previously uploaded): https://forums.developer.nvidia.com/uploads/short-url/8ZzR5Qf5GLFlUq04qcKC4T5NWf.txt
-
Hi Dp If your problem is an i2C Read Fail error with a D457 on a GMSL connection and, like the original poster of this discussion, only a cold reboot corrects the issue then there was a similar recent case here:
https://github.com/IntelRealSense/librealsense/issues/13901
The advice given was to create a support ticket for this problem on Intel's Zendesk private support channel so that a member of the Intel RealSense team can assist.
-
Hi MartyG, I have just opened a support ticket. Thank you.
Please sign in to leave a comment.
Comments
10 comments