Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RealSense error calling rs2_pipeline_start( ):xioctl(VIDIOC_S_FMT) failed, errno=5 Last Error: Input/output error. #13685

Open
kummerrrrrr opened this issue Jan 16, 2025 · 12 comments
Labels

Comments

@kummerrrrrr
Copy link

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model { D435i }
Firmware Version (2.55.1)
Operating System & Version {VM (Ubuntu 20.04)
Kernel Version (Linux Only) (Linux vision 5.15.0-130-generic)
Platform PC
SDK Version { 2.0 }
Language {C++/opencv/pcl/ }
Segment {Robot }

Issue Description

<Describe your issue / question / feature request / etc..>
I compiled librealsense using source code, located the executable file, and executed ./rs-pointcloud and ./realsense-viewer respectively.
The former reported an error: RealSense error calling rs2_pipeline_start(pipe:0x5560af0439b0):xioctl(VIDIOC_S_FMT) failed, errno=5 Last Error: Input/output error.
The latter can run normally. (Please see the attachment)
May I ask why this result occurs?
2025-01-16 103328
2025-01-16 103409

@kummerrrrrr
Copy link
Author

By the way, it seems that all errors point to one point (as shown in the figure below), pipe.start(cfg); The pipeline is opened incorrectly because two streams are enabled at the same time.
a87d0481b63233a064ba9d66d36a21e
I don't know if you still remember that I came here a few weeks ago and discussed this issue. At that time, I ruled out some possible problems, such as I have changed the USB to 3.2, and the firmware and SDK are kept to the latest version. Other than that, I really don't know what the problem is.
Thank you!

@MartyG-RealSense
Copy link
Collaborator

Hi @kummerrrrrr Can you confirm please that realsense-viewer is not streaming depth at the time that you launch rs-pointcloud? Only one program at a time can access a particular camera stream, so if depth was enabled in realsense-viewer first and then rs-pointcloud was launched, rs-pointcloud would have a blank black screen because realsense-viewer has already claimed exclusive use of the depth stream until it is stopped or realsense-viewer is closed.

@kummerrrrrr
Copy link
Author

Yes, I always close the current program before launching another one.

@MartyG-RealSense
Copy link
Collaborator

If you built the tools and examples when compiling librealsense from source code, can you look for the pre-built executable version of rs-pointcloud in the usr/local/bin folder of Ubuntu please and try launching it from that location?

@kummerrrrrr
Copy link
Author

It's the same

Image

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jan 16, 2025

If realsense-viewer is able to work correctly then it indicates that the problem is not related to the ability to run RealSense programs that use graphics.

A difference between your realsense-viewer program and rs-pointcloud is that in realsense-viewer you do not have RGB color enabled, whilst rs-pointcloud automatically uses both depth and the RGB color stream.

If you enable depth first and then RGB secondly in the 3D pointcloud mode of realsense-viewer, is a pointcloud with both depth and color detail on it able to be displayed?

@kummerrrrrr
Copy link
Author

Yes,I can get the pointcloud of color.

Image

@MartyG-RealSense
Copy link
Collaborator

Thank you. Next, please run rs-capture. If it works and can display both depth and color streams then that would indicate that the input-output error is a problem that is specific to the rs-pointcloud example program on your computer.

@kummerrrrrr
Copy link
Author

Still reports the error
(ros-foxy) vision@vision:~/librealsense-master/build/Release$ ./rs-capture
16/01 20:43:57,762 ERROR [139951433836288] (librealsense-exception.h:52) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Connection timed out
16/01 20:43:57,762 ERROR [139952346539840] (librealsense-exception.h:52) xioctl(VIDIOC_S_FMT) failed, errno=5 Last Error: Input/output error
16/01 20:43:57,763 ERROR [139951433836288] (global_timestamp_reader.cpp:239) Error during time_diff_keeper polling: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Connection timed out
16/01 20:43:57,867 ERROR [139952346539840] (rs.cpp:237) [rs2_pipeline_start( pipe:0x55b9699c8a90 ) Backend] xioctl(VIDIOC_S_FMT) failed, errno=5 Last Error: Input/output error
16/01 20:43:57,868 ERROR [139952346539840] (rs.cpp:237) [rs2_delete_pipeline_profile( profile:nullptr ) UNKNOWN] null pointer passed for argument "profile"
RealSense error calling rs2_pipeline_start(pipe:0x55b9699c8a90):
xioctl(VIDIOC_S_FMT) failed, errno=5 Last Error: Input/output error

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jan 16, 2025

It is not clear why realsense-viewer would work but the example programs would not, as the the input/output error would typically be related to a problem with USB (the USB port or the USB cable). The USB cable is detected by realsense-viewer as 3.2, suggesting that it is in good working order.

Which method did you use to install librealsense from source code?

@kummerrrrrr
Copy link
Author

According to the method shown in the link below:
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md

@MartyG-RealSense
Copy link
Collaborator

The procedure for building librealsense from source code with CMake in RSUSB = true mode is described at #9931 (comment)

With the RSUSB installation method, the kernel is bypassed, so it is not necessary to apply a kernel patch script. You also do not need to install prerequisites, as the RSUSB method installs them over an internet connection instead. This install method works well on computers that experience conflicts between librealsense and the Linux kernel. xioctl(VIDIOC_S_FMT) failed errors are usually related to such kernel conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants