librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Support for kernels v4.16+

Open ghost opened this issue 8 years ago • 18 comments


Required Info
Camera Model D435
Operating System & Version Linux (OpenSuse Tumbleweed)
Kernel Version (Linux Only) 4.16.0-1
Platform PC
SDK Version 2

Issue Description

Realsense viewer 2.10.3 and examples won't connect to D435 camera.

Error message: 10/04 10:48:52,180 ERROR [139867025590016] (types.h:179) set_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Inappropriate ioctl for device

10/04 10:48:52,181 WARNING [139867025590016] (rs.cpp:328) null pointer passed for argument "device"

ghost avatar Apr 10 '18 08:04 ghost

Hi @dlemke6 There is indeed a problem running librealsense with 4.16 Kernel at the moment. We are working to fix it, but were hoping we have a bit more time to address it. Is downgrading to one of the supported Kernels an option for you? Just to clarify, this would be only a temporary measure until we fix it in librealsense. Long term, 4.16 is going to be the first Kernel that would not require kernel patches for any of the RealSense devices.

dorodnic avatar Apr 10 '18 08:04 dorodnic

Hi @dorodnic Sorry for not answering. i'll try downgrading next week. Is it possible to determine how long it will take?

Keep up the good work

ghost avatar Apr 27 '18 08:04 ghost

Hi @dlemke6 Thank you. We are constrained by limited resources, but it is clear that we have to address this issue very soon as the Kernel becomes more "mainstream". To the best of my understanding, the new kernel exposes UVC devices with per-frame metadata as two video devices - one for frames and one for metadata. librealsense currently doesn't properly handle the "metadata" video device, hence the crash. As a first measure we will add check to ignore it as a work-around. Next, we will have to modify the library to take advantage of this new kernel feature.

dorodnic avatar Apr 29 '18 12:04 dorodnic

Hi, any news on this? Using 4.16.12-1-ARCH I still get

what(): set_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Inappropriate ioctl for device

fubsan avatar May 30 '18 13:05 fubsan

[Realsense Customer Engineering Team Comment] @fubsan The issue has been put into our sprint, should be finished by mid June. Sorry to keep you wait, please understand the limited resource.

Also reproduced on 4.17.3-1-ARCH

fubsan avatar Jul 02 '18 12:07 fubsan

[Realsense Customer Engineering Team Comment] @fubsan Thank you for the new information, I've already update it to team.

Also hitting this on Arch (4.17.2-1-ARCH and 4.17.4). Looking forward to the fix!

alspitz avatar Jul 09 '18 20:07 alspitz

[Realsense Customer Engineering Team Comment] @pumaking Thank you for the update, fed information to the team again.

We are still working on this (there were some complications). @ev-mp, perhaps you could share some details on current status?

dorodnic avatar Jul 12 '18 14:07 dorodnic

Still present on 4.17.6-1-ARCH. Looking forward to a fix!

rimio avatar Jul 17 '18 13:07 rimio

Does any input from the user side help here? This makes the device currently unusable for me as other hardware requires kernel version >= 4.16. What is your current projection on this?

alexswerner avatar Jul 27 '18 22:07 alexswerner

[Realsense Customer Engineering Team Comment] @alexswerner The problem is WIP, few items related to this issue has been fixed, but few still in progress. Sorry to keep you wait, but still need some time to finish it.

Hmmm, we're migrating to OpenSuSE and running 4.17.13 here at work and I was hoping I could hack this into working but, alas, it is no go. We're making do with some old ubuntu docker containers for the moment but that's pretty suboptimal.

Any updates on how this is going?

VileLasagna avatar Aug 16 '18 04:08 VileLasagna

Hello @VileLasagna , The work is being finalized and there is a pending PR for Kernel 4.16 support that is being reviewed. It includes essential UVC functionalities: enumeration, controls, streaming. D400-proprietary metadata extensions which will be submitted separately. You're welcomed to try it and provide a feedback.

In any case kernel 4.16 support will be part of the next week's release.

ev-mp avatar Aug 16 '18 12:08 ev-mp

So I just gave the code on the PR a go and it seems to be working just fine. Did take a couple of tweaks in the kernel patching for the UVC driver, but pretty easy. Might make a PR with those myself once this is merged. good stuff

VileLasagna avatar Aug 17 '18 02:08 VileLasagna

Kernel 4.16 support is now part of the latest v2.16 release. It delivers HW timestamps for all UVC stream types without need of kernel patches. Note that a kernel patch is required for the extended metadata attributes (actual exposure, gain, etc')

ev-mp avatar Aug 28 '18 06:08 ev-mp

We seem to be in good shape with regards to new kernels (except the last last missing piece of auxiliary metadata fields, that is still being upstreamed, I was hoping the accepted patch would already include this...) If you see any problems on 4.16+ please open a new issue.

dorodnic avatar Aug 30 '18 16:08 dorodnic