Closed ruffsl closed 4 years ago
@ruffsl hello, The difference in timestamp domains for gyro and accel is rooted in kernel inconsistency and requires kernel patch to rectify. The SDK provides the patches suites for Ubuntu LTS kernels, and v4.20 is not on the list. You can switch to LTS kernel and have the kernels patches applied manually/with DKMS , or, you can port the kernel patches to the specific kernel you're using (imo patches for 4.18 are closest to origin) Duplicate of #3980
Ok, it wasn't obvious to me that at first, that installation of the DKMS deb packages and manually patching of the LTS kernel where both required simultaneously. I've switched back to the LTS kernel, and applied the kernel patch via the repo provided patch script, however rebooting after the patch, I'm still encountering the same issue.
$ sudo apt-get --only-upgrade install librealsense2-utils librealsense2-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
librealsense2-dkms is already the newest version (1.3.12-0ubuntu1).
librealsense2-utils is already the newest version (2.32.1-0~realsense0.1913).
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
$ uname -a
Linux dox 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ realsense-viewer
26/01 13:16:41,438 WARNING [140269806679808] (types.cpp:49) set_pu(id=9) failed! Last Error: Input/output error
26/01 13:16:41,439 WARNING [140269806679808] (sensor.cpp:630) Exception was thrown when inspecting Raw RGB Camera property Controls white balance of color image. Setting any value will disable auto white balance
26/01 13:16:56,647 WARNING [140270577784704] (types.cpp:49) Accel Sensitivity:hwmon command 0x4f failed. Error type: No data to return (-21).
26/01 13:16:56,866 WARNING [140270577784704] (backend-v4l2.cpp:1208) Pixel format 36315752-1a66-a242-9065-d01814a likely requires patch for fourcc code RW16!
26/01 13:17:06,979 WARNING [140269504673536] (backend-hid.cpp:681) HID set_power 1 failed for /sys/devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb4/4-1/4-1:1.5/0003:8086:0B3A.0003/HID-SENSOR-200073.1.auto/iio:device1/buffer/enable
26/01 13:17:07,061 WARNING [140269471102720] (sensor.cpp:968) HID timestamp not found, switching to Host timestamps.
...
Log from scripts/patch-realsense-ubuntu-lts.sh
:
After looking closer at the patch-realsense-ubuntu-lts.sh
script, looks like it stalls from the v1-media-uvcvideo-mark-buffer-error-where-overflow.patch
may already be upstreamed in Ubuntu LTS tag Ubuntu-4.15.0-74.84. I commented this section out, and proceed to install the built kernel modules:
(We may want to update that if condition logic.)
Looks like the gyro metadata is working fine now:
@ruffsl hello,it great that you've managed to resolve the issue. Two notes:
There is no need to apply both DKMS and the manual script. ... DKMS should be preferred for LTS kernels.
Thanks for the clarification. After I had rolled back to the LST kennel with the DKMS still installed, the issue persisted until I manually patched. Perhaps if I happen to repeat this with a fresh Ubuntu install this wouldn't be repeatable, but in theory the DKMS provided should work with 4.15.0-74.84 ?
The DKMS package for Ubuntu 18 is compatible with LTS kernels 4.15 and 4.18 branches (all patch numbers included). It will be extended to support 5.0 and 5.3 in the next release.
It will be extended to support 5.0 and 5.3 in the next release.
Nice, looking forward to simply using the DKMS packages for the current kernel shipped in Ubuntu.
I've noticed that for 5.0.0-23-generic
, I encountered device detection issues when applying the 3rd-party patchs that affects USB2 behavior, and so got working again by commenting them out.
Just something to be aware of when making the release DKMS packages.
Issue Description
I'm trying to verify that the clock domain for the accelerometer and gyro are both
Global Time
. However, with current release, it seems that only the gyro has faltered toSystem Time
:This error message reports:
I presume the message is referencing this document:
https://github.com/IntelRealSense/librealsense/blob/master/doc/frame_metadata.md#metadata-support-for-intel-realsense-devices
However, all other metadata streams seem to correctly display a
Global Time
clock domain:What could cause this inconsistency? I've been able to replicate the exact issue on two different ubuntu PCs, two different D435i devices, as well as building from source as of 83f952a .
FYI: versions of debian package used:
Second sample device without latest firmware: