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

DKMS failure on kernel 5.0.0-23-generic #4586

Closed
kevindehecker opened this issue Aug 6, 2019 · 24 comments
Closed

DKMS failure on kernel 5.0.0-23-generic #4586

kevindehecker opened this issue Aug 6, 2019 · 24 comments
Assignees

Comments

@kevindehecker
Copy link
Contributor


Required Info
Camera Model D400
Firmware Version
Operating System & Version Linux Ubuntu 18
Kernel Version (Linux Only) 5.0.0-23-generic
Platform PC
SDK Version 2.25
Language
Segment

Issue Description

The installation of 2.25 fails on ubuntu 18.04 5.0.0-23-generic:

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 0 not upgraded.
Need to get 4122 kB/114 MB of archives.
After this operation, 172 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.6-0ubuntu0 [4122 kB]
Fetched 4122 kB in 4s (1128 kB/s)             
Selecting previously unselected package librealsense2:amd64.
(Reading database ... 282600 files and directories currently installed.)
Preparing to unpack .../0-librealsense2_2.25.0-0~realsense0.1332_amd64.deb ...
Unpacking librealsense2:amd64 (2.25.0-0~realsense0.1332) ...
Selecting previously unselected package librealsense2-dbg:amd64.
Preparing to unpack .../1-librealsense2-dbg_2.25.0-0~realsense0.1332_amd64.deb ...
Unpacking librealsense2-dbg:amd64 (2.25.0-0~realsense0.1332) ...
Selecting previously unselected package librealsense2-dev:amd64.
Preparing to unpack .../2-librealsense2-dev_2.25.0-0~realsense0.1332_amd64.deb ...
Unpacking librealsense2-dev:amd64 (2.25.0-0~realsense0.1332) ...
Selecting previously unselected package librealsense2-dkms.
Preparing to unpack .../3-librealsense2-dkms_1.3.6-0ubuntu0_all.deb ...
Unpacking librealsense2-dkms (1.3.6-0ubuntu0) ...
Selecting previously unselected package librealsense2-gl:amd64.
Preparing to unpack .../4-librealsense2-gl_2.25.0-0~realsense0.1332_amd64.deb ...
Unpacking librealsense2-gl:amd64 (2.25.0-0~realsense0.1332) ...
Selecting previously unselected package librealsense2-gl-dbg:amd64.
Preparing to unpack .../5-librealsense2-gl-dbg_2.25.0-0~realsense0.1332_amd64.deb ...
Unpacking librealsense2-gl-dbg:amd64 (2.25.0-0~realsense0.1332) ...
Selecting previously unselected package librealsense2-gl-dev:amd64.
Preparing to unpack .../6-librealsense2-gl-dev_2.25.0-0~realsense0.1332_amd64.deb ...
Unpacking librealsense2-gl-dev:amd64 (2.25.0-0~realsense0.1332) ...
Selecting previously unselected package librealsense2-udev-rules:amd64.
Preparing to unpack .../7-librealsense2-udev-rules_2.25.0-0~realsense0.1332_amd64.deb ...
Unpacking librealsense2-udev-rules:amd64 (2.25.0-0~realsense0.1332) ...
Selecting previously unselected package librealsense2-utils:amd64.
Preparing to unpack .../8-librealsense2-utils_2.25.0-0~realsense0.1332_amd64.deb ...
Unpacking librealsense2-utils:amd64 (2.25.0-0~realsense0.1332) ...
Setting up librealsense2:amd64 (2.25.0-0~realsense0.1332) ...
Setting up librealsense2-udev-rules:amd64 (2.25.0-0~realsense0.1332) ...
Setting up librealsense2-dkms (1.3.6-0ubuntu0) ...
Loading new librealsense2-dkms-1.3.6 DKMS files...
Building for 5.0.0-23-generic
Building initial module for 5.0.0-23-generic
Error! Bad return status for module build on kernel: 5.0.0-23-generic (x86_64)
Consult /var/lib/dkms/librealsense2-dkms/1.3.6/build/make.log for more information.

Loading the modified modules into kernel...modprobe: FATAL: Module hid_sensor_accel_3d is in use.
Current status:
librealsense2-dkms, 1.3.6: added
nvidia, 390.116, 4.15.0-55-generic, x86_64: installed
nvidia, 390.116, 4.18.0-25-generic, x86_64: installed
nvidia, 390.116, 5.0.0-23-generic, x86_64: installed
mod: videodev 			
mod: uvcvideo 			 version: 1.1.1
mod: hid_sensor_gyro_3d 	
mod: hid_sensor_accel_3d 	
Setting up librealsense2-dev:amd64 (2.25.0-0~realsense0.1332) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up librealsense2-dbg:amd64 (2.25.0-0~realsense0.1332) ...
Setting up librealsense2-gl:amd64 (2.25.0-0~realsense0.1332) ...
Setting up librealsense2-gl-dev:amd64 (2.25.0-0~realsense0.1332) ...
Setting up librealsense2-gl-dbg:amd64 (2.25.0-0~realsense0.1332) ...
Setting up librealsense2-utils:amd64 (2.25.0-0~realsense0.1332) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...

The contents of make.log:

DKMS make.log for librealsense2-dkms-1.3.6 for kernel 5.0.0-23-generic (x86_64)
di  6 aug 2019 15:28:51 CEST
make: Entering directory '/usr/src/linux-headers-5.0.0-23-generic'
arch/x86/Makefile:146: CONFIG_X86_X32 enabled but no binutils support
scripts/Makefile.build:42: /var/lib/dkms/librealsense2-dkms/1.3.6/build/5.0.0/drivers/media/usb/uvc/Makefile: No such file or directory
make[1]: *** No rule to make target '/var/lib/dkms/librealsense2-dkms/1.3.6/build/5.0.0/drivers/media/usb/uvc/Makefile'.  Stop.
Makefile:1778: recipe for target 'uvcvideo.ko' failed
make: *** [uvcvideo.ko] Error 2
make: Leaving directory '/usr/src/linux-headers-5.0.0-23-generic'
@ev-mp
Copy link
Collaborator

ev-mp commented Aug 6, 2019

@kevindehecker hello, DKMS currently provides for LTS versions up to v4.18.
Adding support for v5.0 is scheduled in future releases.

@ev-mp ev-mp self-assigned this Aug 6, 2019
@ev-mp ev-mp added the Linux label Aug 6, 2019
@kevindehecker
Copy link
Contributor Author

Right, I didn't even notice my kernel got upgraded. This was an automatic update...

@kevindehecker
Copy link
Contributor Author

So actually this is not related to the 2.25 release at all. I'll change the title. I have 2.25 working fine now with the downgraded 4.18 kernel.

@kevindehecker kevindehecker changed the title DKMS failure 2.25 DKMS failure on kernel 5.0.0-23-generic Aug 6, 2019
@mjscosta
Copy link

mjscosta commented Aug 8, 2019

We've also encountered this issue. Just to double check, we are not using DKMS modules, just the librealsense packages to access the camera.

The camera can no longer be accessed via librealsense2 in kernel version 5?

@kevindehecker
Copy link
Contributor Author

For me the camera itself works fine (I get images etc), but the advanced features don't work. Like the hardware clock.

@mimfgg
Copy link

mimfgg commented Aug 9, 2019

Hi! When would this update be scheduled for?

@fnoop
Copy link

fnoop commented Aug 9, 2019

Hi, this is a pretty major issue as anyone who runs the latest LTS and keeps it up to date will now be broken!

@milagorecki
Copy link

@kevindehecker After downgrading to 4.18, did you remove the 5.0-kernel? I ran into exactly the same problem and changed the kernel I'm booting from by changing the GRUB_DEFAULT.
uname -r now returns 4.18.0-25-generic, but the error remains when entering
sudo apt-get install librealsense2-dkms. Any suggestions?

@kevindehecker
Copy link
Contributor Author

Nope, I didn't uninstall 5.0 kernel.

@s-hemer
Copy link

s-hemer commented Aug 22, 2019

Adding to @fnoop's comment: With the latest, clean 18.04 LTS one is now completely lost, cmp #4669 (beside manual downgrading the kernel of course).

@kevindehecker
Copy link
Contributor Author

I just updated everything, now running kernel 5.0.0-29-generic with realsense api v 2.29, and this problems seems to be fixed!

@drzraf
Copy link

drzraf commented Oct 7, 2019

Installation for Ubuntu via package (inc. dkms) is still failing.
Shouldn't this bug be reopened, or at least redirect to another one?

@stefan-enway
Copy link

which kernel/realsense version are you using? did you treid the -29/ api v 2.29 version as kevin did?

@drzraf
Copy link

drzraf commented Oct 7, 2019

Even better : 5.0.0-31

$ cat /var/lib/dkms/librealsense2-dkms/1.3.6/build/make.log
DKMS make.log for librealsense2-dkms-1.3.6 for kernel 5.0.0-31-generic (x86_64)
Mon 07 Oct 2019 06:10:45 PM -03
make: Entering directory '/usr/src/linux-headers-5.0.0-31-generic'
arch/x86/Makefile:146: CONFIG_X86_X32 enabled but no binutils support
scripts/Makefile.build:42: /var/lib/dkms/librealsense2-dkms/1.3.6/build/5.0.0/drivers/media/usb/uvc/Makefile: No such file or directory
make[1]: *** No rule to make target '/var/lib/dkms/librealsense2-dkms/1.3.6/build/5.0.0/drivers/media/usb/uvc/Makefile'.  Stop.
make: *** [Makefile:1780: uvcvideo.ko] Error 2
make: Leaving directory '/usr/src/linux-headers-5.0.0-31-generic'

@stefan-enway
Copy link

stefan-enway commented Oct 8, 2019

thats the point. check the 2.29 dpkms package and look which kernel version it pachtes. as long as intel does only provide this kind of closely tied patches, you cant just take the latest. try -29

@stefan-enway
Copy link

anotherway would be to do a sourcecode patch and use checkinstall https://wiki.ubuntuusers.de/checkinstall/ to create a debian package from that.

@kevindehecker
Copy link
Contributor Author

kevindehecker commented Oct 8, 2019

Yeah, indeed. I just tried with another system and with -31 the problem is there again. I'm starting to doubt if it was ever fixed, as the system I tested this with had somewhat messed up config to start with...

I have reopened the issue, though at the moment I lag the time to keep track of everything.

@kevindehecker kevindehecker reopened this Oct 8, 2019
@dapi
Copy link

dapi commented Oct 16, 2019

Same problem on kernel 5.0.0-31-generic:

DKMS make.log for librealsense2-dkms-1.3.6 for kernel 5.0.0-31-generic (x86_64)
Wed 16 Oct 2019 06:58:19 PM +04
make: Entering directory '/usr/src/linux-headers-5.0.0-31-generic'
arch/x86/Makefile:146: CONFIG_X86_X32 enabled but no binutils support
scripts/Makefile.build:42: /var/lib/dkms/librealsense2-dkms/1.3.6/build/5.0.0/drivers/media/usb/uvc/Makefile: No such file or directory
make[1]: *** No rule to make target '/var/lib/dkms/librealsense2-dkms/1.3.6/build/5.0.0/drivers/media/usb/uvc/Makefile'.  Stop.
make: *** [Makefile:1780: uvcvideo.ko] Error 2
make: Leaving directory '/usr/src/linux-headers-5.0.0-31-generic'
root@sandy2:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:        19.04
Codename:       disco
root@sandy2:~# 

@ev-mp
Copy link
Collaborator

ev-mp commented Oct 16, 2019

@dapi hello,
DKMS package currently supports LTS kernels up to 4.18 for Ubuntu 18. Support for v5.0 is yet to be provided.
Currently you need install the kernel patches for v5.0 with the developer's script -

./scripts/patch-realsense-ubuntu-lts.sh

@daenny
Copy link

daenny commented Dec 4, 2019

@ev-mp is there any update on the kernel v5.0 support? Ubuntu LTS 18.04.3 is shipping with v5.0 as default kernel, so it would be nice to have the dkms working for that release.

@ev-mp
Copy link
Collaborator

ev-mp commented Feb 6, 2020

DKMS package with kernels 5.0 and 5.3 support is available for download.
FYI

@MoBaT
Copy link

MoBaT commented Feb 20, 2020

DKMS package with kernels 5.0 and 5.3 support is available for download.
FYI

Hey ev-mp,

I used the ./scripts/patch-realsense-ubuntu-lts.sh to build the kernal modules for kenel 5.3.0-40-generic and it successfully applied the patches and loaded up the modules. I'm having a lot of trouble getting data from certain sensors. Whenever I try to use the "get_frame_metadata()" call, I get "UVC header is not available". This is my dmesg output:

[ 1144.584826] usb 2-2: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[ 1144.605776] usb 2-2: New USB device found, idVendor=8086, idProduct=0b3a, bcdDevice=50.c2
[ 1144.605782] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1144.605786] usb 2-2: Product: Intel(R) RealSense(TM) Depth Camera 435i
[ 1144.605789] usb 2-2: Manufacturer: Intel(R) RealSense(TM) Depth Camera 435i
[ 1144.605791] usb 2-2: SerialNumber: 911623051229
[ 1144.610211] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) Depth Camera 435i (8086:0b3a)
[ 1144.612920] uvcvideo 2-2:1.0: Entity type for entity Intel(R) RealSense(TM) Depth Ca was not initialized!
[ 1144.612925] uvcvideo 2-2:1.0: Entity type for entity Processing 2 was not initialized!
[ 1144.612928] uvcvideo 2-2:1.0: Entity type for entity Camera 1 was not initialized!
[ 1144.613135] input: Intel(R) RealSense(TM) Depth Ca as /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/input/input28
[ 1144.613922] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) Depth Camera 435i (8086:0b3a)
[ 1144.615857] uvcvideo 2-2:1.3: Entity type for entity Processing 7 was not initialized!
[ 1144.615861] uvcvideo 2-2:1.3: Entity type for entity Extension 8 was not initialized!
[ 1144.615864] uvcvideo 2-2:1.3: Entity type for entity Camera 6 was not initialized!
[ 1144.732642] hid-sensor-hub 0003:8086:0B3A.0006: No report with id 0xffffffff found
[ 1147.240078] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1147.290960] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1147.343858] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1147.485689] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1147.536555] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1150.021591] hid-sensor-hub 0003:8086:0B3A.0006: No report with id 0xffffffff found
[ 1150.322856] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1154.403783] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1154.554643] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1154.604929] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1154.655421] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1154.705724] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1155.388722] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1155.621841] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1156.758262] hid-sensor-hub 0003:8086:0B3A.0006: No report with id 0xffffffff found
[ 1156.809331] hid-sensor-hub 0003:8086:0B3A.0006: No report with id 0xffffffff found
[ 1166.068919] mce: CPU6: Core temperature above threshold, cpu clock throttled (total events = 853)
[ 1166.068919] mce: CPU0: Core temperature above threshold, cpu clock throttled (total events = 853)
[ 1166.069903] mce: CPU6: Core temperature/speed normal
[ 1166.069903] mce: CPU0: Core temperature/speed normal
[ 1172.104208] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1173.005431] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1173.136267] uvcvideo: Non-zero status (-71) in video completion handler.
[ 1173.377930] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1173.449496] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1173.499749] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1173.550259] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1173.600533] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1173.651015] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 1173.701182] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).

I've been having trouble getting the realsense camera to work completely on my Ubuntu 18.04.1 machine.

@kevindehecker
Copy link
Contributor Author

@ev-mp I can confirm that the DKMS package installs without errors with kernel 5.3.0-40-generic.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  librealsense2-udev-rules
The following NEW packages will be installed:
  librealsense2-dkms librealsense2-udev-rules
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/10,2 MB of archives.
After this operation, 54,6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package librealsense2-dkms.
(Reading database ... 381916 files and directories currently installed.)
Preparing to unpack .../librealsense2-dkms_1.3.13-0ubuntu1_all.deb ...
Unpacking librealsense2-dkms (1.3.13-0ubuntu1) ...
Selecting previously unselected package librealsense2-udev-rules:amd64.
Preparing to unpack .../librealsense2-udev-rules_2.32.1-0~realsense0.1976_amd64.deb ...
Unpacking librealsense2-udev-rules:amd64 (2.32.1-0~realsense0.1976) ...
Setting up librealsense2-udev-rules:amd64 (2.32.1-0~realsense0.1976) ...
Setting up librealsense2-dkms (1.3.13-0ubuntu1) ...
Loading new librealsense2-dkms-1.3.13 DKMS files...
Building for 5.3.0-40-generic
Building initial module for 5.3.0-40-generic
Secure Boot not enabled on this system 25/02 12:36:36,898 WARNING [140498295576320] (ds5-timestamp.cpp:76) UVC metadata payloads not available. Please refer to the installation chapter for details.
Done.

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

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

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

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

depmod...

DKMS: install completed.

Loading the modified modules into kernel... complete
Current status:
librealsense2-dkms, 1.3.13, 5.3.0-40-generic, x86_64: installed
nvidia, 390.116, 4.15.0-88-generic, x86_64: installed
nvidia, 390.116, 4.18.0-25-generic, x86_64: installed
nvidia, 390.116, 5.3.0-28-generic, x86_64: installed
nvidia, 390.116, 5.3.0-40-generic, x86_64: installed
mod: videodev 			 version: realsense2-dkms
mod: uvcvideo 			 version: 1.1.2.realsense-1.3.13
mod: hid_sensor_gyro_3d 	 version: realsense2-dkms
mod: hid_sensor_accel_3d 	 version: realsense2-dkms

However, the advanced metadata is not available out of the box after this, the realsense viewer gives me: 25/02 12:36:36,898 WARNING [140498295576320] (ds5-timestamp.cpp:76) UVC metadata payloads not available. Please refer to the installation chapter for details
Among others. I guess I'll open a new issue for this.

@MoBaT this issue is about the dkms package giving errors... Suggest you open another issue as well.

@mikepurvis
Copy link
Contributor

I'm still having the same error message from the original post, with 1.3.11-0ubuntu1 and kernel version 5.0.0-41.45. Any thoughts?

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

No branches or pull requests