Camera no longer detected in Linux
-
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
- Consider checking out SDK examples.
- Have you looked in our documentations?
- Is you question a frequently asked one?
- Try searching our GitHub Issues (open and closed) for a similar issue.
-
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 | { D400 } |
| Firmware Version | (Cannot See the Camera) |
| Operating System & Version | {Linux (Ubuntu 16.04) |
| Kernel Version (Linux Only) | (e.g. 4.4.0-187) |
| Platform | PC |
| SDK Version | { 2.36.0 } |
| Language | {python } |
Issue Description
Our realsense cameras are no longer detected by the realsense-viewer nor our Python code. I've uninstalled and reinstalled the SDK (was previously running 2.30 when this occurred), but no luck.
The devices show up with lsusb:
lsusb
Bus 002 Device 008: ID 0bda:0328 Realtek Semiconductor Corp.
Bus 002 Device 016: ID 8086:0b07 Intel Corp.
Bus 002 Device 017: ID 8086:0b07 Intel Corp.
Bus 002 Device 009: ID 0bda:0411 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 413c:2113 Dell Computer Corp.
Bus 001 Device 002: ID 413c:301a Dell Computer Corp.
Bus 001 Device 004: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The output of
modinfo uvcvideo | grep "version:"
version: 1.1.2.realsense-1.3.12
srcversion: DDBE13A2FE2520639CCCF70
But neither camera (D435) is recognized:
rs-enumerate-devices
No device detected. Is it plugged in?
What's surprising is that this seemed to happen 'spontaneously', i.e. it wasn't following any change to the system (updates, upgrades etc). Things were working fine, and then they suddenly stopped after a reboot.
Hi @jkenney9a Do the cameras remain undetectable by rs-enumerate-devices if you unplug them, wait a couple of seconds and then re-insert them, please?
Yes. I've unplugged and re-plugged them back in multiple times, into different ports etc. without any luck.
Would it be possible to try building librealsense and pyrealsense2 together using the backend method of installation, please? As it is not dependent on Linux versions or kernel versions and does not need patching, it can eliminate a lot of the things that can go wrong in a librealsense build on Linux.
https://github.com/IntelRealSense/librealsense/issues/6964#issuecomment-665650908
Thanks I'll try this in a bit. However, we only use pyrealsense2 within an Anaconda environment, so I don't see how it would interfere with the realsense from recognizing the cameras outside the environment. Or perhaps I'm misunderstanding something.
Ok I tried this and got the following errors:
cmake ../ -DFORCE_RSUSB_BACKEND=ON -DBUILD_PYTHON_BINDINGS:bool=true -DPYTHON_EXECUTABLE=...
-- Internet connection identified
-- Info: REALSENSE_VERSION_STRING=2.36.0
-- Setting Unix configurations
-- libusb not found; using internal version (missing: LIBUSB_LIB LIBUSB_INC)
CMake Error at /usr/share/cmake-3.5/Modules/ExternalProject.cmake:1757 (message):
error: could not find git for clone of libusb
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/ExternalProject.cmake:2459 (_ep_add_download_command)
CMake/external_libusb.cmake:3 (ExternalProject_Add)
CMake/libusb_config.cmake:11 (include)
CMake/global_config.cmake:69 (include)
CMakeLists.txt:44 (global_set_flags)
-- Configuring incomplete, errors occurred!
I installed libusb-dev via apt-get, but didn't correct the error. Any ideas?
Hi @jkenney9a You mentioned that the camera was not detected in the RealSense Viewer. The RealSense Viewer is not a Python program, it is C++ (a librealsense SDK program) and not connected to pyrealsense2. So if the camera was not detectable in the Viewer then it would suggest a wider problem with librealsense or with Linux kernel / patching, rather than one that is isolated to just the Python wrapper.
Did you run the CMake instruction from inside the Build directory of the librealsense source-code folder please? librealsense > build
The link below has information on the missing libusb problem:
https://github.com/IntelRealSense/librealsense/issues/4009
Yes, I believe so:
pwd
/home/jkenney9/Documents/librealsense/librealsense-2.36.0/build
ls
CMakeCache.txt CMakeFiles libusb-prefix third-party
It finds CMakeLists.txt no problem when I run cmake
Do you think updating my kernel would do it? And reinstalling using apt-get?
Okay, I believe I've solved the issue; at least realsense viewer is working. It looks like it was a kernel-related issue. We had two kernels installed on the computer (4.4.0-186 and 4.4.0-187). It doesn't seem to work under 187 but it does for 186. Reinstalled using apt-get and made sure to choose the 186 kernel during boot and we're back to where we were.
That's great news - thanks so much for the update! :)