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

Request to push patches to main line Linux kernel sources #9806

Closed
mlederhi opened this issue Sep 30, 2021 · 6 comments
Closed

Request to push patches to main line Linux kernel sources #9806

mlederhi opened this issue Sep 30, 2021 · 6 comments
Labels

Comments

@mlederhi
Copy link

Intel RealSense team, please consider getting your changes back into the mainline Linux kernel. It is really cumbersome if everybody has to do it on it's own and every time again when the upstream kernel sources change. It would be really a plus for a product if it works out of the box.

Sincerely,

Martin Lederhilger
DS Automotion GmbH
Austria

@MartyG-RealSense
Copy link
Collaborator

Hi @mlederhi At #5212 (comment) there is a discussion of the advantages and disadvantages of using an RSUSB installation of librealsense (also known as libuvc backend) versus a patch-based installation. A quote from that information regarding a patch-based installation that may be relevant to your question is as follows:

"All kernel patches should eventually get upstreamed into Linux or abandoned. From the user's perspective the main obstacle in accepting the kernel patch model is the deployment scheme that requires certain engineering skills level. We address this by by wrapping and redistributing the patches with DKMS Debian package, at least for Ubuntu LTS kernels".

Installations that use the RSUSB Backend method are not dependent on Linux versions or kernel versions and do not require patching. As highlighted in #5212 (comment) though, RSUSB does have disadvantages that may make it unsuited for some projects.

@MartyG-RealSense
Copy link
Collaborator

Hi @mlederhi Do you require further assistance with this case, please? Thanks!

@mlederhi
Copy link
Author

mlederhi commented Oct 8, 2021

Hello, thanks for your reply. I'm currently busy with other stuff, but I have read in different posts, that patching should not be required with recent Kernels anymore.

I have Kernel version

Linux version 5.10.27-gentoo-x86_64 (root@wslederhi2) (x86_64-pc-linux-gnu-gcc (Gentoo 10.3.0 p1) 10.3.0, GNU ld (Gentoo 2.35.2 p1) 2.35.2) #3 SMP PREEMPT Wed Sep 29 16:11:43 CEST 2021

but when I run

rs-enumerate-devices

I receive

No device detected. Is it plugged in?

I have installed the udev rules, and when plugging the camera in I can see in dmesg the following output

[87948.358201] usb 2-4: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[87948.380164] usb 2-4: New USB device found, idVendor=8086, idProduct=0b5c, bcdDevice=50.c7
[87948.380168] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[87948.380169] usb 2-4: Product: Intel(R) RealSense(TM) Depth Camera 455
[87948.380170] usb 2-4: Manufacturer: Intel(R) RealSense(TM) Depth Camera 455
[87948.380172] usb 2-4: SerialNumber: 117623060223
[87948.406382] hid-generic 0003:8086:0B5C.0008: hiddev96,hidraw4: USB HID v1.10 Device [Intel(R) RealSense(TM) Depth Camera 455 Intel(R) RealSense(TM) Depth Camera 455 ] on usb-0000:03:00.0-4/input5
[87948.416278] videodev: Linux video capture interface: v2.00
[87948.421718] uvcvideo: Unknown video format 00000050-0000-0010-8000-00aa00389b71
[87948.422422] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) Depth Camera 455 (8086:0b5c)
[87948.435003] input: Intel(R) RealSense(TM) Depth Ca as /devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb2/2-4/2-4:1.0/input/input24
[87948.435682] uvcvideo: Unknown video format 36315752-1a66-a242-9065-d01814a8ef8a
[87948.435685] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) Depth Camera 455 (8086:0b5c)
[87948.452283] usbcore: registered new interface driver uvcvideo
[87948.452284] USB Video Class driver (1.1.1)

I can even watch the video streams for example with "Qt V4L2 test utility" (but only once for each /dev/videoX device, then I have to unplug and replug the camera again).

What Kernel options are actually required for using the cameras? Maybe I am missing something.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Oct 8, 2021

My understanding is that the main reason in the present-day for patching the kernel when building the librealsense SDK from source code is to add support for hardware metadata and so is worth doing for that reason regardless of the kernel's age if you require access to metadata and are building the librealsense SDK from source code without using the RSUSB method.

Metadata support should be already included if building librealsense from the packages on the distribution_linux.md instructions page linked to below, or from source code using the RSUSB method (which does not require patching).

https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md

Currently, librealsense has support for up to Kernel 5.8 officially at the time of writing this, though newer kernels may still work but with unpredictable effects in terms of stability.

image

@mlederhi
Copy link
Author

I have upgraded the firmware of the camera on a Windows computer and now RealSense viewer can connect on my Linux computer. I still have to unplug the camera because only the first stream of each /dev/videoX device works, but at least it's a progress. I'll close the ticket now.

@MartyG-RealSense
Copy link
Collaborator

Thanks very much @mlederhi for the update - it's great to hear that you made progress!

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