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

UDEV rules issue after updating to 2.24 #4350

Closed
kevindehecker opened this issue Jul 2, 2019 · 20 comments
Closed

UDEV rules issue after updating to 2.24 #4350

kevindehecker opened this issue Jul 2, 2019 · 20 comments
Assignees
Labels

Comments

@kevindehecker
Copy link
Contributor


Required Info
Camera Model D400
Firmware Version 5.11.6.250
Operating System & Version Ubuntu 18.04.01
Kernel Version (Linux Only) 4.15.0-54-generic
Platform PC
SDK Version 2.24

Issue Description

After updating to 2.24 I started the realsense-viewer, which gives me the following warning:
Screenshot from 2019-07-03 00-09-09

Timestamp: 1562104878089.143555
Severity: Warn
Description: RealSense UDEV-Rules file:
 /lib/udev/rules.d/60-librealsense2-udev-rules.rules
 is not up-to date!
UDEV-Rules permissions configuration 
 for RealSense devices.


Missing/outdated UDEV-Rules will cause 'Permissions Denied' errors
unless the application is running under 'sudo' (not recommended)
In case of Debians use: 
sudo apt-get upgrade/install librealsense2-udev-rules
To manually install UDEV-Rules in terminal run:
$ sudo cp ~/.99-realsense-libusb.rules /etc/udev/rules.d/99-realsense-libusb.rules && sudo udevadm control --reload-rules && udevadm trigger

It is also not detecting the camera that is connected and was detected just fine before all this. I've diffed the udev rules file with the current one in the repo, no differences except the name (which starts with 60 instead of 99)

The problem persists over rebooting. I can reproduce on both my desktop and my laptop. Completely sudo apt remove/install librealsense* does not help and does not show errors. Log:

~$ sudo apt remove librealsense2* 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'librealsense2-dbg' for glob 'librealsense2*'
Note, selecting 'librealsense2-dev' for glob 'librealsense2*'
Note, selecting 'librealsense2' for glob 'librealsense2*'
Note, selecting 'librealsense2-gl-dbg' for glob 'librealsense2*'
Note, selecting 'librealsense2-gl-dev' for glob 'librealsense2*'
Note, selecting 'librealsense2-gl' for glob 'librealsense2*'
Note, selecting 'librealsense2-utils' for glob 'librealsense2*'
Note, selecting 'librealsense2-dkms' for glob 'librealsense2*'
Note, selecting 'librealsense2-udev-rules' for glob 'librealsense2*'
Package 'librealsense2-gl-dbg' is not installed, so not removed
Package 'librealsense2-gl-dev' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  libatk-bridge2.0-dev libatspi2.0-dev libdbus-1-dev libepoxy-dev libglfw3
  libgtk-3-dev libxkbcommon-dev libxtst-dev wayland-protocols
  x11proto-record-dev
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  librealsense2 librealsense2-dbg librealsense2-dev librealsense2-dkms
  librealsense2-gl librealsense2-udev-rules librealsense2-utils
0 upgraded, 0 newly installed, 7 to remove and 5 not upgraded.
After this operation, 200 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 304695 files and directories currently installed.)
Removing librealsense2-dbg:amd64 (2.24.0-0~realsense0.1244) ...
Removing librealsense2-utils:amd64 (2.24.0-0~realsense0.1244) ...
Removing librealsense2-dev:amd64 (2.24.0-0~realsense0.1244) ...
Removing librealsense2-dkms (1.3.5-0ubuntu1) ...

-------- Uninstall Beginning --------
Module:  librealsense2-dkms
Version: 1.3.5
Kernel:  4.15.0-52-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

uvcvideo.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.15.0-52-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


videodev.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.15.0-52-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


hid-sensor-accel-3d.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.15.0-52-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


hid-sensor-gyro-3d.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.15.0-52-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod...

DKMS: uninstall completed.

-------- Uninstall Beginning --------
Module:  librealsense2-dkms
Version: 1.3.5
Kernel:  4.15.0-54-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

uvcvideo.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.15.0-54-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


videodev.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.15.0-54-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


hid-sensor-accel-3d.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.15.0-54-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


hid-sensor-gyro-3d.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.15.0-54-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod...

DKMS: uninstall completed.

------------------------------
Deleting module version: 1.3.5
completely from the DKMS tree.
------------------------------
Done.
Reloading original modules into kernel... complete
Current status:
nvidia, 390.116, 4.15.0-52-generic, x86_64: installed
nvidia, 390.116, 4.15.0-54-generic, x86_64: installed
mod: videodev 			
mod: uvcvideo 			 version: 1.1.1
mod: hid_sensor_gyro_3d 	
mod: hid_sensor_accel_3d 	
Removing librealsense2-gl:amd64 (2.24.0-0~realsense0.1244) ...
Removing librealsense2-udev-rules:amd64 (2.24.0-0~realsense0.1244) ...
Removing librealsense2:amd64 (2.24.0-0~realsense0.1244) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
$ sudo apt install librealsense2* 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'librealsense2-dbg' for glob 'librealsense2*'
Note, selecting 'librealsense2-dev' for glob 'librealsense2*'
Note, selecting 'librealsense2' for glob 'librealsense2*'
Note, selecting 'librealsense2-gl-dbg' for glob 'librealsense2*'
Note, selecting 'librealsense2-gl-dev' for glob 'librealsense2*'
Note, selecting 'librealsense2-gl' for glob 'librealsense2*'
Note, selecting 'librealsense2-utils' for glob 'librealsense2*'
Note, selecting 'librealsense2-dkms' for glob 'librealsense2*'
Note, selecting 'librealsense2-udev-rules' for glob 'librealsense2*'
The following NEW packages will be installed:
  librealsense2 librealsense2-dbg librealsense2-dev librealsense2-dkms librealsense2-gl librealsense2-gl-dbg librealsense2-gl-dev
  librealsense2-udev-rules librealsense2-utils
0 upgraded, 9 newly installed, 0 to remove and 5 not upgraded.
Need to get 6597 kB/116 MB of archives.
After this operation, 200 MB of additional disk space will be used.
Get:1 http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic/main amd64 librealsense2-dkms all 1.3.5-0ubuntu1 [6583 kB]
Get:2 http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic/main amd64 librealsense2-gl-dbg amd64 2.24.0-0~realsense0.1244 [5738 B]
Get:3 http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic/main amd64 librealsense2-gl-dev amd64 2.24.0-0~realsense0.1244 [8722 B]
Fetched 6597 kB in 2s (3857 kB/s)         
Selecting previously unselected package librealsense2:amd64.
(Reading database ... 300350 files and directories currently installed.)
Preparing to unpack .../0-librealsense2_2.24.0-0~realsense0.1244_amd64.deb ...
Unpacking librealsense2:amd64 (2.24.0-0~realsense0.1244) ...
Selecting previously unselected package librealsense2-dbg:amd64.
Preparing to unpack .../1-librealsense2-dbg_2.24.0-0~realsense0.1244_amd64.deb ...
Unpacking librealsense2-dbg:amd64 (2.24.0-0~realsense0.1244) ...
Selecting previously unselected package librealsense2-dev:amd64.
Preparing to unpack .../2-librealsense2-dev_2.24.0-0~realsense0.1244_amd64.deb ...
Unpacking librealsense2-dev:amd64 (2.24.0-0~realsense0.1244) ...
Selecting previously unselected package librealsense2-dkms.
Preparing to unpack .../3-librealsense2-dkms_1.3.5-0ubuntu1_all.deb ...
Unpacking librealsense2-dkms (1.3.5-0ubuntu1) ...
Selecting previously unselected package librealsense2-gl:amd64.
Preparing to unpack .../4-librealsense2-gl_2.24.0-0~realsense0.1244_amd64.deb ...
Unpacking librealsense2-gl:amd64 (2.24.0-0~realsense0.1244) ...
Selecting previously unselected package librealsense2-gl-dbg:amd64.
Preparing to unpack .../5-librealsense2-gl-dbg_2.24.0-0~realsense0.1244_amd64.deb ...
Unpacking librealsense2-gl-dbg:amd64 (2.24.0-0~realsense0.1244) ...
Selecting previously unselected package librealsense2-gl-dev:amd64.
Preparing to unpack .../6-librealsense2-gl-dev_2.24.0-0~realsense0.1244_amd64.deb ...
Unpacking librealsense2-gl-dev:amd64 (2.24.0-0~realsense0.1244) ...
Selecting previously unselected package librealsense2-udev-rules:amd64.
Preparing to unpack .../7-librealsense2-udev-rules_2.24.0-0~realsense0.1244_amd64.deb ...
Unpacking librealsense2-udev-rules:amd64 (2.24.0-0~realsense0.1244) ...
Selecting previously unselected package librealsense2-utils:amd64.
Preparing to unpack .../8-librealsense2-utils_2.24.0-0~realsense0.1244_amd64.deb ...
Unpacking librealsense2-utils:amd64 (2.24.0-0~realsense0.1244) ...
Setting up librealsense2:amd64 (2.24.0-0~realsense0.1244) ...
Setting up librealsense2-udev-rules:amd64 (2.24.0-0~realsense0.1244) ...
Setting up librealsense2-dkms (1.3.5-0ubuntu1) ...
Loading new librealsense2-dkms-1.3.5 DKMS files...
Building for 4.15.0-54-generic
Building initial module for 4.15.0-54-generic
Done.

uvcvideo:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.15.0-54-generic/updates/dkms/

videodev.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.15.0-54-generic/updates/dkms/

hid-sensor-accel-3d.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.15.0-54-generic/updates/dkms/

hid-sensor-gyro-3d.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.15.0-54-generic/updates/dkms/

depmod...

DKMS: install completed.

Loading the modified modules into kernel... complete
Current status:
librealsense2-dkms, 1.3.5, 4.15.0-54-generic, x86_64: installed
nvidia, 390.116, 4.15.0-52-generic, x86_64: installed
nvidia, 390.116, 4.15.0-54-generic, x86_64: installed
mod: videodev 			 version: realsense2-dkms
mod: uvcvideo 			 version: 1.1.2.realsense-1.3.5
mod: hid_sensor_gyro_3d 	 version: realsense2-dkms
mod: hid_sensor_accel_3d 	 version: realsense2-dkms
Setting up librealsense2-dev:amd64 (2.24.0-0~realsense0.1244) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up librealsense2-dbg:amd64 (2.24.0-0~realsense0.1244) ...
Setting up librealsense2-gl:amd64 (2.24.0-0~realsense0.1244) ...
Setting up librealsense2-gl-dev:amd64 (2.24.0-0~realsense0.1244) ...
Setting up librealsense2-gl-dbg:amd64 (2.24.0-0~realsense0.1244) ...
Setting up librealsense2-utils:amd64 (2.24.0-0~realsense0.1244) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...

@ijsmallman
Copy link

I have this issue too

@fgolemo
Copy link

fgolemo commented Jul 3, 2019

+1

@ev-mp ev-mp added the bug label Jul 4, 2019
@ev-mp
Copy link
Collaborator

ev-mp commented Jul 4, 2019

@kevindehecker thanks for report.
Seem be due inconsistency in release vs debug builds. We're working on it.
As for now - the specific pop-up is a false alarm, it doesn't not affect functionality and can be safely disregarded

@ev-mp ev-mp self-assigned this Jul 4, 2019
@beduffy
Copy link

beduffy commented Jul 4, 2019

I have the same issue, should I revert back to 2.23 or is there another way to fix this?
The popup seems to be related to not being able to see any output from my 435i so it affects my functionality.

@bsamadi
Copy link

bsamadi commented Jul 5, 2019

realsense-viewer cannot see 435i or T265. It affects functionality.

@zinan93
Copy link

zinan93 commented Jul 8, 2019

I also have the same issue, cannot see d435
Is there a way to revert back to 2.23 using debian package install?

@kevindehecker
Copy link
Contributor Author

kevindehecker commented Jul 8, 2019

#sudo apt-cache policy  librealsense2 #pick v2.23
sudo apt remove librealsense2*
sudo apt-get install librealsense2=2.23.0-0~realsense0.1166
sudo apt-get install librealsense2-dev=2.23.0-0~realsense0.1166
sudo apt-get install librealsense2-dbg=2.23.0-0~realsense0.1166
sudo apt-get install librealsense2-gl*=2.23.0-0~realsense0.1166
sudo apt-get install librealsense2-udev*=2.23.0-0~realsense0.1166
sudo apt-get install librealsense2-utils=2.23.0-0~realsense0.1166
sudo apt-get install librealsense2-dkms

BTW, for me the warning in the realsense-viewer V2.24 still does appear, but I can actually use both D435 and D435i's like normal.

@atyshka
Copy link

atyshka commented Jul 8, 2019

Yeah having this issue too. However it seems that the rules are actually not installed. Running ls /etc/udev/rules.d/ does not show anything related to realsense, and yet the device seems to work fine except for the viewer warning

@gtiongco95
Copy link

Same as other people. No rules installed. Warning appears. Camera not detected/working.

@ev-mp
Copy link
Collaborator

ev-mp commented Jul 9, 2019

@gtiongco95 hello,
The udev rules files will be installed into the ``/etc/udev/rules.d" and/or "/lib/udev/rules.d" based on the type of installation selected (manual or via debian packages accordingly).
The purpose of this notification is to alert the user in case one has outdated or even multiple udev files in those locations which can lead to an unexpected behavior.

Make sure to follow and pickup the udev step from the installation guide. For debian distro - running "dpkg -L librealsense2-udev-rules" will show the full location of the installed file.
Regarding the false warning - the fix PR has already been merged into the development branch, so in case you've resolved the udev installation issue, rebuilding the SDK from source should also remove the notification.

@tarekmuallim
Copy link

I have the same problem.
Also Realsense viewer can't detect any d400 camera.

@nyanko-box
Copy link

Hello, there.

I have the same issue under following environment (Ubuntu 16.04 LTS) .

librealsense2/xenial,now 2.24.0-0~realsense0.1243 amd64 [インストール済み、自動]
librealsense2-dbg/xenial,now 2.24.0-0~realsense0.1243 amd64 [インストール済み]
librealsense2-dev/xenial,now 2.24.0-0~realsense0.1243 amd64 [インストール済み]
librealsense2-dkms/xenial,now 1.3.5-0ubuntu1 all [インストール済み]
librealsense2-gl/xenial,now 2.24.0-0~realsense0.1243 amd64 [インストール済み、自動]
librealsense2-gl-dbg/xenial 2.24.0-0~realsense0.1243 amd64
librealsense2-gl-dev/xenial 2.24.0-0~realsense0.1243 amd64
librealsense2-udev-rules/xenial,now 2.24.0-0~realsense0.1243 amd64 [インストール済み]
librealsense2-utils/xenial,now 2.24.0-0~realsense0.1243 amd64 [インストール済み]

My d435 is not found in realsense viewer v2.24.0, even via other USB port (2.0 and 3.0) or other Type-C2A USB cable.

I tried degrading above library version to 2.23.0-0~realsense0.1165, this issue still occured.

This d435 is found and works in other PC (Windows 10).

@nyanko-box
Copy link

Hello, there.

Above comment of mine is solved by following procedure.

  1. turning off "secure boot function" on BIOS
  2. reinstall ubuntu
  3. reinstall RealSense SDK

I wish this help for you!

@fvillml
Copy link

fvillml commented Jul 24, 2019

Same problem here! I have already turned off the secure boot function before installing ubuntu and the SDK, and it does not work though. I cannot see the camera when using RTAB-map.

@xudooo
Copy link

xudooo commented Jul 25, 2019

@nyanko-box
turning off "secure boot function" on BIOS WORKS on my computer, thanks.

@ev-mp
Copy link
Collaborator

ev-mp commented Jul 28, 2019

@afvillamil231 , @tarekmuallim , @ijsmallman, @fgolemo , @gtiongco95 , any updates?
In case you still experience issues with camera not being recognized/working please provide the output of rs-enumerate-devices and dmesg -wT when connecting the camera and run the tool.

Also specify the platform, sdk and kernel versions used to make you're not shifting the thread's focus.

@tarekmuallim
Copy link

I reinstall the sdk and realsense viewer is detecting the cameras right now.
Thank you for your care.

@SainaRez
Copy link

SainaRez commented Jul 30, 2019

I ran the command:
sudo cp ~/.99-realsense-libusb.rules /etc/udev/rules.d/99-realsense-libusb.rules && sudo udevadm control --reload-rules && udevadm trigger

and removed the duplicate:
sudo rm /lib/udev/rules.d/60-librealsense2-udev-rules.rules

the problem is solved and I don't get the warning anymore.

@kevindehecker
Copy link
Contributor Author

Just tested this with release of 2.25, seems to be fixed! So, closing this.

@mathiassteger
Copy link

I had to add a sudo-call at the end too. So in my case I had to

sudo cp ~/.99-realsense-libusb.rules /etc/udev/rules.d/99-realsense-libusb.rules && sudo udevadm control --reload-rules && sudo udevadm trigger

Thanks alot for your comment though, it saved my night!

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