IntelRealSense / librealsense

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

Realsense Viewer won't open in Ubuntu 18.04 #4881

Closed alextac98 closed 5 years ago

alextac98 commented 5 years ago

Required Info
Camera Model N/A
Firmware Version ???
Operating System & Version Ubuntu 18.04 Kernel 4.15.0-62
Platform PC
SDK Version 2.28
Language N/A
Segment N/A

Issue Description

<Describe your issue / question / feature request / etc..> Every time I try to open the realsense-viewer, I get the following error:

12:30:13.808 [13923] [E] infra/Poller: poll: epoll_wait error 4
12:30:13.808 [13923] [E] Dispatcher: handleEvents(): Poller::poll() ret -1
 17/09 12:30:13,937 WARNING [140086725306112] (backend-v4l2.cpp:1148) Pixel format 20303157-0000-0010-8000-00aa003 likely requires patch for fourcc code W10 !
 17/09 12:30:13,951 WARNING [140086725306112] (backend-v4l2.cpp:1148) Pixel format 36315752-1a66-a242-9065-d01814a likely requires patch for fourcc code RW16!
 17/09 12:30:14,105 ERROR [140086725306112] (types.h:304) xioctl(VIDIOC_G_CTRL) failed Last Error: Invalid argument
 17/09 12:30:14,107 WARNING [140086725306112] (sensor.cpp:766) Exception was thrown when inspecting RGB Camera property Enable / disable auto-exposure
 17/09 12:30:23,069 WARNING [140086331045632] (ds5-timestamp.cpp:64) UVC metadata payloads not available. Please refer to the installation chapter for details.

Sometimes, it crashes immediately, and sometimes it crashes after I try to view the image coming from my cameras. The cameras aren't problematic because they work on other computers just fine. Any help is greatly appreciated!

Edit: Installation was done using the following instructions: https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md I did not build the libraries from source

Edit 2: I tried the fix in #4669, problem still persisted. New error received:

Backend in rs2_get_option(options:0x557b5df2dc70, option:Laser Power):
get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: No such device
ev-mp commented 5 years ago

@alextac98 , the errors are due to communication/hw issues between host and the device. The second error often indicates that the device was forcefully disconnected from host due to insufficient power or a similar issue.

get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: No such device

Knowing the camera type/fw version and also attaching the kernel logs when those errors occur is needed for review. You haven't specified the platform you're using that produces those errors, and whether the setup/cabling is the same as with the other PCs where the camera work correctly. But in many cases switching to an external self-powered USB3 hub was able to mitigate power-related issues (if that proves to be correct)

g2-bernotas commented 5 years ago

I only know from Windows side, but I had something similar when the SDK crashes every time you want to change any parameter (exposure, laser etc etc.). My solution was reported here.

alextac98 commented 5 years ago

@ev-mp It seems like the hardware was resetting due to power limitations by my laptop (I was plugging it directly into my laptop port). Now that I have plugged the cameras into a powered port, it works as expected. Thank you for your help!