IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.61k stars 4.83k forks source link

modprobe: ERROR: could not insert 'uvcvideo': Invalid argument on Ubuntu 14.04.6 LTS #4917

Closed ravijo closed 5 years ago

ravijo commented 5 years ago
Required Info
Camera Model D435
Firmware Version
Operating System & Version Ubuntu 14.04.6 LTS
Kernel Version (Linux Only) 4.4.0-148-generic
Platform PC
SDK Version
Language
Segment

Issue Description

The process of applying a patch on kernel modules is failing. Please note that I have already run sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade and updated boot by sudo update-grub && sudo reboot multiple times. Please see below the output reported at the terminal-

ravi@lab:~/tools/librealsense$ ./scripts/patch-realsense-ubuntu-lts.sh

Reading package lists... 0%
Reading package lists... 100%
Reading package lists... Done

Building dependency tree... 0%
Building dependency tree... 50%
Building dependency tree

Reading state information... 0%
Reading state information... Done

bc is already the newest version.
build-essential is already the newest version.
git is already the newest version.
linux-headers-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Package required libusb-1.0-0-dev:  - found
Package required libssl-dev:  - found
Create patches workspace in ubuntu-xenial-master folder

The kernel has modified files:
    modified:   drivers/iio/accel/hid-sensor-accel-3d.c
    modified:   drivers/iio/gyro/hid-sensor-gyro-3d.c
    modified:   drivers/media/usb/uvc/Makefile
    modified:   drivers/media/usb/uvc/uvc_ctrl.c
    modified:   drivers/media/usb/uvc/uvc_driver.c
    modified:   drivers/media/usb/uvc/uvc_video.c
    modified:   drivers/media/usb/uvc/uvcvideo.h
    modified:   drivers/media/v4l2-core/v4l2-ioctl.c
    modified:   include/linux/hid-sensor-ids.h
    modified:   include/uapi/linux/videodev2.h
Proceeding will reset all local kernel changes. Press 'n' within 3 seconds to abort the operation
Do you want to proceed? [Y/n]Y
Update the folder content with the latest from mainline branch

remote: Total 0 (delta 0), reused 0 (delta 0)
From https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/xenial
 * branch            master     -> FETCH_HEAD
Resetting local changes in ubuntu-xenial-master folder
 HEAD is now at 1296204 UBUNTU: Ubuntu-4.4.0-164.192
Applying patches for xenial-master line
Applying realsense-uvc patch
patching file drivers/media/usb/uvc/Makefile
patching file drivers/media/usb/uvc/uvc_driver.c
patching file drivers/media/usb/uvc/uvcvideo.h
patching file drivers/media/v4l2-core/v4l2-ioctl.c
patching file include/uapi/linux/videodev2.h
Applying realsense-metadata patch
patching file drivers/media/usb/uvc/uvc_driver.c
Hunk #1 succeeded at 2768 (offset 69 lines).
patching file drivers/media/usb/uvc/uvc_video.c
Hunk #1 succeeded at 1253 (offset 25 lines).
Hunk #2 succeeded at 1291 (offset 25 lines).
patching file drivers/media/usb/uvc/uvcvideo.h
Hunk #1 succeeded at 194 (offset 39 lines).
Hunk #2 succeeded at 214 (offset 39 lines).
Applying realsense-hid patch
patching file drivers/iio/accel/hid-sensor-accel-3d.c
patching file drivers/iio/gyro/hid-sensor-gyro-3d.c
patching file include/linux/hid-sensor-ids.h
Applying realsense-powerlinefrequency-fix patch
patching file drivers/media/usb/uvc/uvc_ctrl.c
Hunk #1 succeeded at 356 (offset -1 lines).
Retrofit uvc bug fix enabled with 4.18+
patching file drivers/media/usb/uvc/uvc_video.c
Hunk #1 succeeded at 1108 (offset 31 lines).
Prepare kernel modules configuration
scripts/kconfig/conf  --olddefconfig Kconfig
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     scripts/mod/devicetable-offsets.h
Compiling uvc module
make: Entering directory `/home/ravi/tools/librealsense/ubuntu-xenial-master'
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/usb/uvc/uvc_driver.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/usb/uvc/uvc_queue.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/usb/uvc/uvc_v4l2.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/usb/uvc/uvc_video.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/usb/uvc/uvc_ctrl.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/usb/uvc/uvc_status.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/usb/uvc/uvc_isight.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/usb/uvc/uvc_debugfs.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/usb/uvc/uvc_entity.o
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/usb/uvc/uvcvideo.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/usb/uvc/uvcvideo.mod.o
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/usb/uvc/uvcvideo.ko
make: Leaving directory `/home/ravi/tools/librealsense/ubuntu-xenial-master'
Compiling accelerometer and gyro modules
make: Entering directory `/home/ravi/tools/librealsense/ubuntu-xenial-master'
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/hid-sensor-accel-3d.o
  Building modules, stage 2.
  MODPOST 18 modules
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/bma180.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/bmc150-accel-core.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/bmc150-accel-i2c.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/hid-sensor-accel-3d.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/bmc150-accel-spi.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/kxcjk-1013.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/kxsd9.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/mma8452.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/mma9551.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/mma9551_core.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/mma9553.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/mxc4005.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/ssp_accel_sensor.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/st_accel.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/st_accel_i2c.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/st_accel_spi.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/stk8312.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/stk8ba50.mod.o
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/bma180.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/bmc150-accel-i2c.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/bmc150-accel-spi.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/hid-sensor-accel-3d.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/kxcjk-1013.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/kxsd9.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/bmc150-accel-core.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/mma8452.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/mxc4005.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/mma9551.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/mma9553.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/mma9551_core.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/st_accel.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/ssp_accel_sensor.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/stk8312.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/st_accel_i2c.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/stk8ba50.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/accel/st_accel_spi.ko
make: Leaving directory `/home/ravi/tools/librealsense/ubuntu-xenial-master'
make: Entering directory `/home/ravi/tools/librealsense/ubuntu-xenial-master'
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/hid-sensor-gyro-3d.o
  Building modules, stage 2.
  MODPOST 14 modules
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/adis16080.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/adis16130.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/adis16136.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/adis16260.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/adxrs450.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/bmg160_core.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/bmg160_i2c.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/bmg160_spi.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/hid-sensor-gyro-3d.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/itg3200.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/ssp_gyro_sensor.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/st_gyro.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/st_gyro_i2c.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/st_gyro_spi.mod.o
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/adis16136.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/adxrs450.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/adis16130.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/adis16260.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/adis16080.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/bmg160_core.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/hid-sensor-gyro-3d.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/bmg160_i2c.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/bmg160_spi.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/ssp_gyro_sensor.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/st_gyro_i2c.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/st_gyro_spi.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/st_gyro.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/iio/gyro/itg3200.ko
make: Leaving directory `/home/ravi/tools/librealsense/ubuntu-xenial-master'
Compiling v4l2-core modules
make: Entering directory `/home/ravi/tools/librealsense/ubuntu-xenial-master'
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-dev.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-ioctl.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-device.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-fh.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-event.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-ctrls.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-subdev.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-clk.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-async.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-compat-ioctl32.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-trace.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-common.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-dv-timings.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/tuner-core.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-mem2mem.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-flash-led-class.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf-core.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf-dma-sg.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf-vmalloc.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf-dvb.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-v4l2.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-memops.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-vmalloc.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-dma-contig.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-dma-sg.o
  CC [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-dvb.o
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/tuner.o
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videodev.o
  Building modules, stage 2.
  MODPOST 17 modules
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/tuner.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-common.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-dv-timings.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-flash-led-class.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-mem2mem.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf-core.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf-dma-sg.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf-dvb.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf-vmalloc.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-core.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-dma-contig.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-dma-sg.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-dvb.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-memops.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-v4l2.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-vmalloc.mod.o
  CC      /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videodev.mod.o
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/tuner.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-common.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-flash-led-class.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-mem2mem.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf-core.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf-dma-sg.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf-dvb.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/v4l2-dv-timings.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-core.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf-vmalloc.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-memops.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-dma-sg.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-dma-contig.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-vmalloc.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-v4l2.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videobuf2-dvb.ko
  LD [M]  /home/ravi/tools/librealsense/ubuntu-xenial-master/drivers/media/v4l2-core/videodev.ko
make: Leaving directory `/home/ravi/tools/librealsense/ubuntu-xenial-master'
Patched kernels modules were created successfully

Replacing mvideodev  -
Module is resident, unloading ...  succeeded.
    Applying the patched module ...  succeeded
Replacing muvcvideo  -
    Applying the patched module ... modprobe: ERROR: could not insert 'uvcvideo': Invalid argument
Failed to insert the patched module. Operation is aborted, the original module is restored
Verify that the current kernel version is aligned to the patched module version
modprobe: ERROR: could not insert 'uvcvideo': Invalid argument

Please note that due to some issue (maybe the firewall), git:// was showing connection timed out. Therefore, I modified the line number 56 of patch-realsense-ubuntu-lts.sh as shown below:

[ ! -d ${kernel_name} ] && git clone -b $kernel_branch https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/xenial --depth 1 ./${kernel_name}

Possible Culprit

I see the following line HEAD is now at 1296204 UBUNTU: Ubuntu-4.4.0-164.192 in the output of patch-realsense-ubuntu-lts.sh.

The cloned kernel belongs to the version 4.4.0-164.192. However, my kernel is a little bit different. See below-

ravi@lab:~$ uname -a
Linux lab 4.4.0-148-generic #174~14.04.1-Ubuntu SMP Thu May 9 08:17:37 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Additional Info.

  1. The output of modinfo uvcvideo
    ravi@lab:~$ modinfo uvcvideo
    filename:       /lib/modules/4.4.0-148-generic/kernel/drivers/media/usb/uvc/uvcvideo.ko
    version:        1.1.1
    license:        GPL
    description:    USB Video Class driver
    author:         Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    srcversion:     DE7B77D93EEF4843175A33B
    alias:          usb:v*p*d*dc*dsc*dp*ic0Eisc01ip01in*
    alias:          usb:v*p*d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v2833p0201d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v1C4Fp3000d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v1B3Bp2951d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v19ABp1000d00*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v19ABp1000d01[0-1]*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v19ABp1000d012[0-6]dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v199Ep8102d*dc*dsc*dp*icFFisc01ip00in*
    alias:          usb:v18ECp3290d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v18ECp3288d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v18ECp3188d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v18CDpCAFEd*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v1871p0516d*dc*dsc*dp*icFFisc01ip00in*
    alias:          usb:v1871p0306d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v17EFp480Bd*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v17DCp0202d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v174Fp8A34d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v174Fp8A33d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v174Fp8A31d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v174Fp8A12d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v174Fp5931d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v174Fp5212d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v152Dp0310d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v13D3p5103d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v0E8Dp0004d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v0BD3p0555d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v0AC8p3420d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v0AC8p3410d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v0AC8p332Dd*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v06F8p300Cd*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v05E3p0505d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v05C8p0403d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v05ACp8501d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v05A9p2643d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v05A9p7670d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v05A9p264Ad*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v05A9p2643d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v05A9p2641d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v05A9p2640d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v058Fp3820d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v04F2pB071d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v046Dp082Dd*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v046Dp08C7d*dc*dsc*dp*icFFisc01ip00in*
    alias:          usb:v046Dp08C6d*dc*dsc*dp*icFFisc01ip00in*
    alias:          usb:v046Dp08C5d*dc*dsc*dp*icFFisc01ip00in*
    alias:          usb:v046Dp08C3d*dc*dsc*dp*icFFisc01ip00in*
    alias:          usb:v046Dp08C2d*dc*dsc*dp*icFFisc01ip00in*
    alias:          usb:v046Dp08C1d*dc*dsc*dp*icFFisc01ip00in*
    alias:          usb:v045Ep0723d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v045Ep0721d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v045Ep00F8d*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v0458p706Ed*dc*dsc*dp*ic0Eisc01ip00in*
    alias:          usb:v0416pA91Ad*dc*dsc*dp*ic0Eisc01ip00in*
    depends:        videodev,videobuf2-core,videobuf2-v4l2,media,videobuf2-vmalloc
    retpoline:      Y
    intree:         Y
    vermagic:       4.4.0-148-generic SMP mod_unload modversions 
    parm:           clock:Video buffers timestamp clock
    parm:           hwtimestamps:Use hardware timestamps (uint)
    parm:           nodrop:Don't drop incomplete frames (uint)
    parm:           quirks:Forced device quirks (uint)
    parm:           trace:Trace level bitmask (uint)
    parm:           timeout:Streaming control requests timeout (uint)
  2. GCC version
    ravi@lab:~$ gcc --version
    gcc (Ubuntu 5.5.0-12ubuntu1~14.04) 5.5.0 20171010
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  3. CMake version

    ravi@lab:~$ cmake --version
    cmake version 3.10.1
    
    CMake suite maintained and supported by Kitware (kitware.com/cmake).
  4. Newly created files in $HOME dir
    ravi@lab:~$ ll 4.4*
    -rw-r--r-- 1 root root  15761 Sep 23 19:27 4.4.0-148-generic-hid-sensor-accel-3d.ko
    -rw-r--r-- 1 root root  15745 Sep 23 19:27 4.4.0-148-generic-hid-sensor-gyro-3d.ko
    -rw-r--r-- 1 root root 144498 Sep 23 19:27 4.4.0-148-generic-uvcvideo.ko
    -rw-r--r-- 1 root root 295744 Sep 23 19:27 4.4.0-148-generic-videodev.ko
  5. Snippet of dmesg
    [    2.379731] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [    2.379733] Bluetooth: BNEP filters: protocol multicast
    [    2.379734] Bluetooth: BNEP socket layer initialized
    [    2.390315] audit: type=1400 audit(1569232141.250:10): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/sbin/dhclient" pid=944 comm="apparmor_parser"
    [    2.605882] clocksource: Switched to clocksource tsc
    [    2.632728] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    [    2.840484] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready
    [    3.051098] NVRM: Your system is not currently configured to drive a VGA console
    [    3.051098] on the primary VGA device. The NVIDIA Linux graphics driver
    [    3.051098] requires the use of a text-mode VGA console. Use of other console
    [    3.051098] drivers including, but not limited to, vesafb, may result in
    [    3.051098] corruption and stability problems, and is not supported.
    [    3.324924] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input14
    [    3.325062] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input15
    [    3.325486] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input16
    [    3.325546] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input17
    [    3.411781] systemd-udevd[1293]: failed to execute '/bin/systemctl' '/bin/systemctl stop --no-block nvidia-persistenced': No such file or directory
    [    3.451780] init: nvidia-prime main process (1338) terminated with status 127
    [    3.849629] systemd-udevd[1705]: failed to execute '/bin/systemctl' '/bin/systemctl start --no-block nvidia-persistenced.service': No such file or directory
    [    4.461094] nvidia-modeset: Allocated GPU:0 (GPU-afd57357-76fe-34cf-46bf-7a3b8b80f468) @ PCI:0000:01:00.0
    [    4.852087] init: plymouth-upstart-bridge main process ended, respawning
    [    5.288535] ahci 0000:00:17.0: port does not support device sleep
    [    5.325610] init: plymouth-stop pre-start process (2801) terminated with status 1
    [    5.878530] e1000e: eth2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
    [    5.878573] IPv6: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready
    [   32.376964] audit_printk_skb: 60 callbacks suppressed
    [   32.376966] audit: type=1400 audit(1569232171.238:31): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/cups/backend/cups-pdf" pid=3076 comm="apparmor_parser"
    [   32.376969] audit: type=1400 audit(1569232171.238:32): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=3076 comm="apparmor_parser"
    [ 1762.745727] systemd-hostnamed[3926]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
    [ 1828.593211] v4l2_common: disagrees about version of symbol v4l2_subdev_init
    [ 1828.593213] v4l2_common: Unknown symbol v4l2_subdev_init (err -22)
    [ 1828.593217] v4l2_common: disagrees about version of symbol v4l2_device_register_subdev
    [ 1828.593218] v4l2_common: Unknown symbol v4l2_device_register_subdev (err -22)
    [ 1845.617130] v4l2_common: disagrees about version of symbol v4l2_subdev_init
    [ 1845.617132] v4l2_common: Unknown symbol v4l2_subdev_init (err -22)
    [ 1845.617136] v4l2_common: disagrees about version of symbol v4l2_device_register_subdev
    [ 1845.617137] v4l2_common: Unknown symbol v4l2_device_register_subdev (err -22)
    [ 1847.449121] v4l2_common: disagrees about version of symbol v4l2_subdev_init
    [ 1847.449123] v4l2_common: Unknown symbol v4l2_subdev_init (err -22)
    [ 1847.449127] v4l2_common: disagrees about version of symbol v4l2_device_register_subdev
    [ 1847.449128] v4l2_common: Unknown symbol v4l2_device_register_subdev (err -22)
    [ 1848.120518] v4l2_common: disagrees about version of symbol v4l2_subdev_init
    [ 1848.120520] v4l2_common: Unknown symbol v4l2_subdev_init (err -22)
    [ 1848.120524] v4l2_common: disagrees about version of symbol v4l2_device_register_subdev
    [ 1848.120525] v4l2_common: Unknown symbol v4l2_device_register_subdev (err -22)
    [ 1848.784528] v4l2_common: disagrees about version of symbol v4l2_subdev_init
    [ 1848.784530] v4l2_common: Unknown symbol v4l2_subdev_init (err -22)
    [ 1848.784534] v4l2_common: disagrees about version of symbol v4l2_device_register_subdev
    [ 1848.784535] v4l2_common: Unknown symbol v4l2_device_register_subdev (err -22)
    [ 1849.768577] v4l2_common: disagrees about version of symbol v4l2_subdev_init
    [ 1849.768579] v4l2_common: Unknown symbol v4l2_subdev_init (err -22)
    [ 1849.768583] v4l2_common: disagrees about version of symbol v4l2_device_register_subdev
    [ 1849.768584] v4l2_common: Unknown symbol v4l2_device_register_subdev (err -22)
    [ 1914.744842] usb 2-4: USB disconnect, device number 2
    [ 1915.960870] usb 2-4: new SuperSpeed USB device number 3 using xhci_hcd
    [ 1915.977956] usb 2-4: New USB device found, idVendor=8086, idProduct=0b07
    [ 1915.977965] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 1915.977972] usb 2-4: Product: Intel(R) RealSense(TM) Depth Camera 435 
    [ 1915.977977] usb 2-4: Manufacturer: Intel(R) RealSense(TM) Depth Camera 435 
    [ 1915.977982] usb 2-4: SerialNumber: 816513022023
    [ 1915.987579] v4l2_common: disagrees about version of symbol v4l2_subdev_init
    [ 1915.987581] v4l2_common: Unknown symbol v4l2_subdev_init (err -22)
    [ 1915.987586] v4l2_common: disagrees about version of symbol v4l2_device_register_subdev
    [ 1915.987587] v4l2_common: Unknown symbol v4l2_device_register_subdev (err -22)
    [ 1916.008906] v4l2_common: disagrees about version of symbol v4l2_subdev_init
    [ 1916.008910] v4l2_common: Unknown symbol v4l2_subdev_init (err -22)
    [ 1916.008919] v4l2_common: disagrees about version of symbol v4l2_device_register_subdev
    [ 1916.008921] v4l2_common: Unknown symbol v4l2_device_register_subdev (err -22)
    [ 2206.013789] usb 2-4: USB disconnect, device number 3
    [ 2329.936691] media: Linux media interface: v0.10
    [ 2329.945934] Linux video capture interface: v2.00
    [ 2330.024965] v4l2_common: disagrees about version of symbol v4l2_subdev_init
    [ 2330.024978] v4l2_common: Unknown symbol v4l2_subdev_init (err -22)
    [ 2330.024994] v4l2_common: disagrees about version of symbol v4l2_device_register_subdev
    [ 2330.025000] v4l2_common: Unknown symbol v4l2_device_register_subdev (err -22)
    [ 2330.074632] v4l2_common: disagrees about version of symbol v4l2_subdev_init
    [ 2330.074639] v4l2_common: Unknown symbol v4l2_subdev_init (err -22)
    [ 2330.074647] v4l2_common: disagrees about version of symbol v4l2_device_register_subdev
    [ 2330.074650] v4l2_common: Unknown symbol v4l2_device_register_subdev (err -22)
    [ 2358.856357] usb 2-4: new SuperSpeed USB device number 4 using xhci_hcd
    [ 2358.873291] usb 2-4: New USB device found, idVendor=8086, idProduct=0b07
    [ 2358.873300] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 2358.873306] usb 2-4: Product: Intel(R) RealSense(TM) Depth Camera 435 
    [ 2358.873312] usb 2-4: Manufacturer: Intel(R) RealSense(TM) Depth Camera 435 
    [ 2358.873317] usb 2-4: SerialNumber: 816513022023
    [ 2358.906688] v4l2_common: disagrees about version of symbol v4l2_subdev_init
    [ 2358.906698] v4l2_common: Unknown symbol v4l2_subdev_init (err -22)
    [ 2358.906709] v4l2_common: disagrees about version of symbol v4l2_device_register_subdev
    [ 2358.906714] v4l2_common: Unknown symbol v4l2_device_register_subdev (err -22)
    [ 2358.916355] v4l2_common: disagrees about version of symbol v4l2_subdev_init
    [ 2358.916356] v4l2_common: Unknown symbol v4l2_subdev_init (err -22)
    [ 2358.916359] v4l2_common: disagrees about version of symbol v4l2_device_register_subdev
    [ 2358.916360] v4l2_common: Unknown symbol v4l2_device_register_subdev (err -22)
    [ 2365.210215] v4l2_common: disagrees about version of symbol v4l2_subdev_init
    [ 2365.210218] v4l2_common: Unknown symbol v4l2_subdev_init (err -22)
    [ 2365.210220] v4l2_common: disagrees about version of symbol v4l2_device_register_subdev
    [ 2365.210221] v4l2_common: Unknown symbol v4l2_device_register_subdev (err -22)

Any workaround, please?

ev-mp commented 5 years ago

@ravijo hello, After updating the system you also need to specify the kernel to boot with - it is possible that it is predefined with the system you run to select 4.4.0-148. Using a 3rd-party tool, such as grub-customizer can be useful to manually pre-select the boot kernel version.

But before doing that - we recommend to use DKMS package whenever applicable as this a robust industrial solution compared to patching the kernel manually. Follow the Debian installation and run

sudo apt install librealsense2-dkms

This will deploy and install both the kernel patches and the udev-rules required by the SDK.

ravijo commented 5 years ago

Hi @ev-mp

Thanks for the quick response.

After updating the system you also need to specify the kernel to boot with - it is possible that it is predefined with the system you run to select 4.4.0-148. Using a 3rd-party tool, such as grub-customizer can be useful to manually pre-select the boot kernel version.

I understand. Well, the kernel before was 3.13.0-165-generic. As per the pre-requirements for librealsense, I upgraded the kernel to 4.4.0-148 by using command line. (This time I didn’t use grub-customizer). However, I agree with you that I didn’t manually select the kernel during boot process. I believe it automatically executes the latest version. That is why uname -r is showing 4.4.0-148-generic. Isn’t it?

But before doing that - we recommend to use DKMS package whenever applicable as this a robust industrial solution compared to patching the kernel manually.

I tried it in the first place. Unfortunately, while registering the server's public key, it shows timed out. It is probably due to the firewall. I am so sorry that I don’t have credentials for bypassing this firewall (this is why I changed git:// to https:// in the patch script as mentioned above).

Thanks again.

ev-mp commented 5 years ago

@ravijo hello, using proxy does not require credential, just getting the corporate proxy server url:port should suffice. There are additional method to handle firewall-related issues - see the troubleshooting link mentioned in the installation guide.

I will provide a direct download link for convenience - http://realsense-hw-public.s3-eu-west-1.amazonaws.com/Debian/apt-repo/pool/xenial/main/librealsense2-dkms_1.3.5-0ubuntu1_all.deb

Note that this is for xenial only. Install with sudo dpkg -i <filename> and update

ravijo commented 5 years ago

Hi @ev-mp

The installation worked. Please see below-

ravi@lab:~/Desktop$ sudo dpkg -i librealsense2-dkms_1.3.5-0ubuntu1_all.deb 
[sudo] password for ravi: 
Selecting previously unselected package librealsense2-dkms.
(Reading database ... 572225 files and directories currently installed.)
Preparing to unpack librealsense2-dkms_1.3.5-0ubuntu1_all.deb ...
Unpacking librealsense2-dkms (1.3.5-0ubuntu1) ...
Setting up librealsense2-dkms (1.3.5-0ubuntu1) ...
Loading new librealsense2-dkms-1.3.5 DKMS files...
First Installation: checking all kernels...
Building only for 4.4.0-148-generic
Building initial module for 4.4.0-148-generic
Done.

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

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

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

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

depmod....

DKMS: install completed.

Loading the modified modules into kernel... complete
Current status:
bbswitch, 0.7, 3.13.0-164-generic, x86_64: installed
bbswitch, 0.7, 3.13.0-165-generic, x86_64: installed
bbswitch, 0.7, 3.13.0-170-generic, x86_64: installed
bbswitch, 0.7, 4.2.0-42-generic, x86_64: installed
bbswitch, 0.7, 4.4.0-148-generic, x86_64: installed
librealsense2-dkms, 1.3.5, 4.4.0-148-generic, x86_64: installed
nvidia-384, 384.130, 3.13.0-164-generic, x86_64: installed
nvidia-384, 384.130, 3.13.0-165-generic, x86_64: installed
nvidia-384, 384.130, 3.13.0-170-generic, x86_64: installed
nvidia-384, 384.130, 4.2.0-42-generic, x86_64: installed
nvidia-384, 384.130, 4.4.0-148-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

However, realsense-viewer is not working as expected. Please see below-

ravi@lab:~/Desktop$ realsense-viewer 
 23/09 22:35:47,023 ERROR [140076101125888] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: No such device
 23/09 22:35:47,734 ERROR [140076117911296] (types.h:304) map_device_descriptor Cannot open '/dev/video0 Last Error: No such file or directory
 23/09 22:35:47,734 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: map_device_descriptor Cannot open '/dev/video0 Last Error: No such file or directory
 23/09 22:35:48,734 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:48,734 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:48,921 WARNING [140076403246976] (fw-update-device.cpp:52) DFU - failed to detach device
 23/09 22:35:48,921 WARNING [140076403246976] (rs.cpp:281) null pointer passed for argument "device"
 23/09 22:35:49,735 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:49,735 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:50,735 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:50,735 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:51,735 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:51,735 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:52,736 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:52,736 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:53,736 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:53,736 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:54,736 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:54,736 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:55,736 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:55,737 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:56,737 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:56,737 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:57,737 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:57,737 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:58,737 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:58,738 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:59,738 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:35:59,738 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:00,738 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:00,738 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:01,738 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:01,738 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:02,739 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:02,739 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:03,739 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:03,739 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:04,739 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:04,739 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:05,739 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:05,739 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:06,740 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:06,740 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:07,740 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:07,740 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:08,740 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:08,740 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:09,740 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:09,741 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:10,741 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:10,741 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:11,741 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:11,741 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:12,742 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:12,742 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:13,742 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:13,742 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:14,742 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:14,742 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:15,742 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:15,743 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:16,743 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:16,743 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:17,743 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:17,743 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:18,743 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:18,743 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:19,744 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:19,744 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:20,744 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:20,744 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:21,744 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:21,744 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:22,744 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:22,745 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:23,745 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:23,745 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:24,745 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:24,745 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:25,745 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:25,745 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:26,746 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:26,746 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:27,746 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:27,746 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:28,746 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:28,746 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:29,656 ERROR [140076101125888] (types.h:304) get_dev_capabilities: Cannot open '/dev/video0 Last Error: Permission denied
 23/09 22:36:29,657 ERROR [140076101125888] (types.h:304) get_dev_capabilities: Cannot open '/dev/video1 Last Error: Permission denied
 23/09 22:36:29,657 ERROR [140076101125888] (types.h:304) get_dev_capabilities: Cannot open '/dev/video2 Last Error: Permission denied
 23/09 22:36:29,746 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:29,746 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:30,747 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:30,747 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:31,747 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:31,747 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:32,747 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:32,747 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:33,748 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:33,748 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:34,748 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:34,748 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:35,748 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:35,748 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:36,749 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:36,749 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:37,749 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:37,749 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:38,749 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:38,749 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:39,750 ERROR [140076117911296] (types.h:304) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor
 23/09 22:36:39,750 ERROR [140076117911296] (error-handling.cpp:68) Error during polling error handler: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Bad file descriptor

If you notice carefully, you can see the following error Cannot open '/dev/video0 Last Error: Permission denied

Do I need to manually set permissions to the device? Can you please help?

ev-mp commented 5 years ago

@ravijo , you need to install device permissions - udev-rules - follow the installation guide here

Run Intel Realsense permissions script located from librealsense root directory: ./scripts/setup_udev_rules.sh

Then reconnect the camera to make sure the're applied

ravijo commented 5 years ago

@ev-mp It worked. Thank you very much.