Skip to main content
Participant
November 2, 2014

oculusd won't run on my Ubuntu 14.04 system

On my system, oculusd of SDK 0.4.3 won't run properly.

The camera is not always detected.
After the camera is detected and it enters the tracking loop, it exits with a segfault.
The camera is attached and working as can be checked by VLC player for example.

The camera is reported by oculusd with different resolutions from run to run. I guess some setup code is missing from oculusd, and the settings are those that stay left after last use, eg. by VLC.

oculusd is a closed source component, so there is nothing I can do about I guess?


Additional info:

After plugging the camera, dmesg says:

[ 5859.624052] usb 8-1: new full-speed USB device number 3 using uhci_hcd
[ 5859.790082] usb 8-1: not running at top speed; connect to a high speed hub
[ 5859.829090] usb 8-1: New USB device found, idVendor=2833, idProduct=0201
[ 5859.829097] usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 5859.829103] usb 8-1: Product: Camera DK2
[ 5859.829107] usb 8-1: Manufacturer: Oculus VR,Inc.
[ 5859.838144] uvcvideo: Found UVC 1.00 device Camera DK2 (2833:0201)
[ 5859.840082] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
[ 5859.842289] input: Camera DK2 as /devices/pci0000:00/0000:00:1d.2/usb8/8-1/8-1:1.0/input/input20


oculusd crashes with:

[TrackingManager] Camera (320x240) added: PrintedSerial=215ZZ4042W8G UUID=H1DE49R6N1E2KW008100
Speicherzugriffsfehler (Speicherabzug geschrieben)


gdb backtrace:

#0 0x000000000049e2b9 in ?? ()
#1 0x000000000049e3e9 in ?? ()
#2 0x000000000049fed3 in ?? ()
#3 0x0000000000497f8d in ?? ()
#4 0x0000000000498303 in ?? ()
#5 0x00000000004986e0 in ?? ()
#6 0x000000000044b414 in ?? ()
#7 0x000000000044b462 in OVR::Thread_PthreadStartFn(void*) ()
#8 0x00007ffff79b3182 in start_thread (arg=0x7ffff7f6e700) at pthread_create.c:312
#9 0x00007ffff6445fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

    20 replies

    Participant
    November 2, 2014
    Sometimes oculusd had a better luck and made it to an error message:

    [TrackingManager] Camera (320x240) added: PrintedSerial=215ZZ4042W8G UUID=H1DE49R6N1E2KW008100
    [TrackedHMD] Entering vision tracking loop
    Error: [Linux DK2 Cam] Select timeout.


    What does that mean?
    Inspiring
    November 2, 2014
    Unfortunately, I don't know too much about Linux. I'll see if anyone else knows more.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    New Participant
    November 17, 2014
    I'm pretty sure I'm having the same problem, to confirm it (and also possibly help narrow it down a little). Also on Ubuntu 14.04 x64 - fully updated, and have the HID rules installed.

    It's almost definitely a bug in the camera thread specifically, as the DK2 runs stably without the camera plugged in - just no positional tracking. So until a fix comes out, we can still use it with just the gyroscopic tracking ;).

    But as soon as I plug in the camera while an application is open, oculusd segfaults. Or I can plug it in with just oculusd running just fine, but as soon as an application tries to access the camera, oculusd segfaults.

    Hardware-wise, I've used this specific DK2 on other systems without problems, so there should be no hardware issues. The light on the camera flashes blue very briefly on connection, then remains off afterwards, even with oculusd running. I'm pretty sure the USB port is 2.0, but I tried just about every port with the same results. For a sanity check, I could try the same machine on Windows, but I suspect that would only prove that it's a Linux version issue.
    New Participant
    November 19, 2014
    Is your issue perhaps related to this one? If it does turn out to be related to USB cable length, would you mind sharing your hardware specs?
    Up and Coming
    December 27, 2014
    When using linux 3.19-rc1 I am having the same problem.
    OVR::DeviceManager - initialized.
    OVR::Linux::HIDDevice - Opened '/dev/hidraw0'
    Manufacturer:'Oculus VR, Inc.' Product:'Rift DK2' Serial#:'MSCEM7R6K9DAKF00X100'
    [TrackingManager] Sensor added: PrintedSerial=204Q6H027W8G UUID=MSCEM7R6K9DAKF00X100
    [New Thread 0x7ffff7f7e700 (LWP 2365)]
    [New Thread 0x7ffff7f5c700 (LWP 2368)]
    [TrackingManager] Display added: UUID=MSCEM7R6K9DAK Driver=0
    [New Thread 0x7ffff7f3b700 (LWP 2376)]

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7ffff7f3b700 (LWP 2376)]
    0x000000000049dd81 in ?? ()
    (gdb) bt
    #0 0x000000000049dd81 in ?? ()
    #1 0x000000000049df32 in ?? ()
    #2 0x000000000049fa73 in ?? ()
    #3 0x0000000000497b97 in ?? ()
    #4 0x0000000000497eb8 in ?? ()
    #5 0x0000000000498290 in ?? ()
    #6 0x000000000044a3c4 in ?? ()
    #7 0x000000000044a412 in OVR::Thread_PthreadStartFn(void*) ()
    #8 0x00007ffff7bc6314 in start_thread () from /usr/lib/libpthread.so.0
    #9 0x00007ffff66f424d in clone () from /usr/lib/libc.so.6

    With drm-next-3.19 and older kernels it still works.

    So it's either a problem in the camera driver somewhere or it is a race condition that depends on what the kernel does.

    I'll upload a coredump, but unless you want to wade through a lot of ASM there isn't much to see I think.
    Is there a chance to release an oculusd build with more debug symbols so one can better see which thread actually crashes there?
    Up and Coming
    December 30, 2014
    Well, that was a bisect session I would not have needed to do had I read the commit log and tried reverting suspicious commits.

    This causes oculusd to segfault:

    e1b78a335996031fea81d3dcbea9724ed3dd4a80 is the first bad commit
    commit e1b78a335996031fea81d3dcbea9724ed3dd4a80
    Author: Philipp Zabel <philipp.zabel@gmail.com>
    Date: Wed Aug 6 17:50:49 2014 -0300

    [media] uvcvideo: Add quirk to force the Oculus DK2 IR tracker to grayscale

    This patch adds a quirk to force Y8 pixel format even if the camera reports
    half-width YUYV.

    Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


    until oculusd gets fixed, the uvcvideo module needs to be loaded with this quirk (or in this case: all quirks) disabled like so as root:
    rmmod uvcvideo
    modprobe uvcvideo quirks=0
    New Participant
    March 26, 2015
    I'm experiencing the same problem, but on an Ubuntu 14.10 ASUS laptop:

    a) The camera USB cable causes the following syslog message:
    uvcvideo: Found UVC 1.00 device Camera DK2 (2833:0201)
    uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.

    b) oculusd segfaults consistingly with identical stack trace as posted earlier

    c) Dual booting into Windows 8.1 without any changes works perfectly so no hardware/cables issues

    d) Tried removing and reloading the uvcvideo module as suggested - so far no effect:

    sudo rmmod uvcvideo
    sudo modprobe uvcvideo quirks=0

    Tried also creating /etc/modprobe.d/uvcvideo.conf with the line 'options uvcvideo quirks=0' but again no effect. oculusd keeps crashing.

    My system is ASUS G6751J laptop with Ubuntu 14.10, x86_64, kernel 3.16.0-33-generic, Nvidia GTX 970m, ovr 0.4.4:
    http://www.asus.com/Notebooks_Ultrabooks/ASUS_ROG_G751JT/specifications/

    I have to get this project working under Linux. Other code won't work in Windows.

    Appreciate any insights to stop oculusd from crashing. Thanks.
    Participant
    March 27, 2015
    "paul_boston" wrote:

    My system is ASUS G6751J laptop with Ubuntu 14.10, x86_64, kernel 3.16.0-33-generic, Nvidia GTX 970m, ovr 0.4.4:
    http://www.asus.com/Notebooks_Ultrabooks/ASUS_ROG_G751JT/specifications/

    I have to get this project working under Linux. Other code won't work in Windows.

    Appreciate any insights to stop oculusd from crashing. Thanks.


    Have you tried the latest beta release (v0.5.0.1)? I am curious what behavior you see from the "ovrd" in that version on your system.
    New Participant
    March 27, 2015
    Steaphan,

    Thanks for the fast reply. I downloaded v0.5.0.1 beta and it segfaulted as well. But a colleague looking at my system asked if I had the latest Nvidia driver for the laptop (346.47). I manually installed it under Ubuntu 14.10:
    https://help.ubuntu.com/community/NvidiaManual

    Voila, everything started to work (both for v0.4.4 and for v0.5.0.1 beta). A big clue was that there was a second screen for the Oculus under Ubuntu's Display control.

    Thanks for your help.
    Participant
    March 27, 2015
    "paul_boston" wrote:
    Voila, everything started to work (both for v0.4.4 and for v0.5.0.1 beta). A big clue was that there was a second screen for the Oculus under Ubuntu's Display control.


    Ahh, yeah, that could do it. Glad you worked it out.

    Please keep the detailed feedback coming, I am curious how well v0.5.0.1 works for everyone.