Oculus Rift - Almost There


Vanum

Recommended Posts

Greetings all!

 

I am one step closer to my final journey.

 

VR in a VM!

 

The last issue I am running into is I can't seem to get my Oculus Rift Sensor to recognize that it is plugged into a USB 3.0 slot. Oculus Home says the sensor is running at 2.0, but Device Manager says it is a 3.0 device?

 

My Precious:

  • CPU: Intel i7-4690K
  • Motherboard: GIGABYTE GA-Z97X-UD5H
  • SSD: Samsung SSD 850 EVO 250GB (2x)
  • Disk Array: Seagate Barracuda 1TB, Western Digital Blue 1TB
  • UnRaid: 16GB PNY Flash Drive
  • RAM: G.SKILL Ripjaws Series 24GB (2 x 4GB, 2 x 8GB)
  • GPU1: EVGA GeForce GTX 970 04G-P4-2974-RX 4GB SC GAMING (Slot 2)
  • Case: COOLER MASTER MASTERBOX 5
  • PCI-E USB Controller: Rosewill RC-508
  • -USB Chipset: Renesas uPD720201

 

PCI-E USB Controller:

Oculus Rift Sensor(3.0)

Oculus Rift(3.0)

Xbox One Wireless Adapter(2.0)

 

PCI Stubbed: GeForce 970, GeForce 970 Audio, Processor Audio, Motherboard Audio and USB Controller

 

VM1:

  • 4 Logical CPUs
  • 8 GB of RAM
  • SSD: 100 GB
  • DA: 250 GB
  • Machine: i440fx-2.5
  • BIOS: SeaBIOS
  • Hyper-V: Yes
  • Graphics Card: 970
  • USB Devices: Keyboard (2.0), Mouse(2.0), Oculus Rift Sensor(3.0), Oculus Rift(3.0), Xbox One Wireless Adapter(2.0)
  • USB Mode: 3.0

 

PCI Devices

00:00.0 Host bridge [0600]: Intel Corporation 4th Gen Core Processor DRAM Controller [8086:0c00] (rev 06)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x8 Controller [8086:0c05] (rev 06)
00:01.2 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x4 Controller [8086:0c09] (rev 06)
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
00:14.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB xHCI Controller [8086:8cb1]
00:16.0 Communication controller [0780]: Intel Corporation 9 Series Chipset Family ME Interface #1 [8086:8cba]
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection I217-V [8086:153b]
00:1b.0 Audio device [0403]: Intel Corporation 9 Series Chipset Family HD Audio Controller [8086:8ca0]
00:1c.0 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 [8086:8c90] (rev d0)
00:1c.2 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 3 [8086:8c94] (rev d0)
00:1c.3 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 4 [8086:8c96] (rev d0)
00:1c.4 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 5 [8086:8c98] (rev d0)
00:1c.6 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 7 [8086:8c9c] (rev d0)
00:1f.0 ISA bridge [0601]: Intel Corporation 9 Series Chipset Family Z97 LPC Controller [8086:8cc4]
00:1f.2 SATA controller [0106]: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode] [8086:8c82]
00:1f.3 SMBus [0c05]: Intel Corporation 9 Series Chipset Family SMBus Controller [8086:8ca2]
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)
02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF116 [GeForce GTX 550 Ti] [10de:1244] (rev a1)
02:00.1 Audio device [0403]: NVIDIA Corporation GF116 High Definition Audio Controller [10de:0bee] (rev a1)
03:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108 [GeForce GT 430] [10de:0de1] (rev a1)
03:00.1 Audio device [0403]: NVIDIA Corporation GF108 High Definition Audio Controller [10de:0bea] (rev a1)
05:00.0 Ethernet controller [0200]: Qualcomm Atheros Killer E220x Gigabit Ethernet Controller [1969:e091] (rev 10)
06:00.0 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev 41)
08:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller [1912:0014] (rev 03)
09:00.0 SATA controller [0106]: Marvell Technology Group Ltd. 88SE9172 SATA 6Gb/s Controller [1b4b:9172] (rev 12)

 

IOMMU Groups

/sys/kernel/iommu_groups/0/devices/0000:00:00.0
/sys/kernel/iommu_groups/1/devices/0000:00:01.0
/sys/kernel/iommu_groups/2/devices/0000:00:01.1
/sys/kernel/iommu_groups/3/devices/0000:00:01.2
/sys/kernel/iommu_groups/4/devices/0000:00:02.0
/sys/kernel/iommu_groups/5/devices/0000:00:03.0
/sys/kernel/iommu_groups/6/devices/0000:00:14.0
/sys/kernel/iommu_groups/7/devices/0000:00:16.0
/sys/kernel/iommu_groups/8/devices/0000:00:19.0
/sys/kernel/iommu_groups/9/devices/0000:00:1b.0
/sys/kernel/iommu_groups/10/devices/0000:00:1c.0
/sys/kernel/iommu_groups/11/devices/0000:00:1c.2
/sys/kernel/iommu_groups/12/devices/0000:00:1c.3
/sys/kernel/iommu_groups/13/devices/0000:00:1c.4
/sys/kernel/iommu_groups/14/devices/0000:00:1c.6
/sys/kernel/iommu_groups/15/devices/0000:00:1f.0
/sys/kernel/iommu_groups/15/devices/0000:00:1f.2
/sys/kernel/iommu_groups/15/devices/0000:00:1f.3
/sys/kernel/iommu_groups/16/devices/0000:01:00.0
/sys/kernel/iommu_groups/16/devices/0000:01:00.1
/sys/kernel/iommu_groups/17/devices/0000:02:00.0
/sys/kernel/iommu_groups/17/devices/0000:02:00.1
/sys/kernel/iommu_groups/18/devices/0000:03:00.0
/sys/kernel/iommu_groups/18/devices/0000:03:00.1
/sys/kernel/iommu_groups/19/devices/0000:05:00.0
/sys/kernel/iommu_groups/20/devices/0000:06:00.0
/sys/kernel/iommu_groups/21/devices/0000:08:00.0
/sys/kernel/iommu_groups/22/devices/0000:09:00.0

 

Bus 002 Device 002: ID 045b:0210 Hitachi, Ltd 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 0b38:0010 Gear Head 107-Key Keyboard
Bus 001 Device 005: ID 046d:c064 Logitech, Inc. M110 corded optical mouse (M-B0001)
Bus 001 Device 003: ID 413c:2107 Dell Computer Corp. 
Bus 001 Device 004: ID 154b:007a PNY Classic Attache Flash Drive
Bus 001 Device 002: ID 045b:0209 Hitachi, Ltd 
Bus 001 Device 007: ID 1532:002e Razer USA, Ltd RZ01-0058 Gaming Mouse [Naga]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

VM XML

<domain type='kvm' id='8'>
  <name>Windows 10</name>
  <uuid>358dc26b-25c9-45ed-306e-469ceccde831</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='1'/>
    <vcpupin vcpu='1' cpuset='2'/>
    <vcpupin vcpu='2' cpuset='5'/>
    <vcpupin vcpu='3' cpuset='6'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/358dc26b-25c9-45ed-306e-469ceccde831_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor id='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='2' threads='2'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/cache/domains/Windows 10/vdisk1.img'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='nec-xhci'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:22:2d:df'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/4'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/4'>
      <source path='/dev/pts/4'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-Windows 10/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
      </source>
      <alias name='hostdev2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
      </source>
      <alias name='hostdev3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x0b38'/>
        <product id='0x0010'/>
        <address bus='1' device='6'/>
      </source>
      <alias name='hostdev5'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x1532'/>
        <product id='0x002e'/>
        <address bus='1' device='7'/>
      </source>
      <alias name='hostdev6'/>
    </hostdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

Linux Sysconfig

default /syslinux/menu.c32
menu title Lime Technology, Inc.
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append pcie_acs_override=downstream intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pci-stub.ids=8086:0c0c,8086:8ca0,10de:13c2,10de:0fbb,10de:1244,10de:0bee,10de:0de1,10de:0bea,1912:0014 initrd=/bzroot
  pcie_acs_override=downstream
label unRAID OS GUI Mode
  kernel /bzimage
  append pcie_acs_override=downstream intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pci-stub.ids=8086:0c0c,8086:8ca0,10de:13c2,10de:0fbb,10de:1244,10de:0bee,10de:0de1,10de:0bea,1912:0014 initrd=/bzroot,/bzroot-gui
  pcie_acs_override=downstream
label unRAID OS Safe Mode (no plugins, no GUI)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest

 

Edited: Added XML for Win10 and Linux Sysconfig!

Edited: Added that my USB Controller is a PCI-E card

tower-diagnostics-20161018-1114.zip

Link to comment

Passing through individual USB devices tends to be quite troublesome and doesn't always work as expected...

 

The quick fix is to install a USB 3 add on card, stub that and have all the devices plugged into that which you want passed though to the VM. I'm not familiar with how oculus plays when it's plugged into a hub off a single port, so have a read up before buying one on case you need more ports..

 

It does look like you've stubbed your usb3 controller and passed that through... Is that detected properly in the VM? If yes, I'd try a USB 3 hub with all your USB devices you need, plugged into one of the ports on that controller.

You don't need to stub ever USB device in that case too, only the USB controller.

 

 

 

 

Link to comment

Sorry, was reading though your post on my phone, so missed the usb controller you passed through!

 

Im not familiar with the Oculus (although i hope to be after xmas!), so ive done a quick google on the device detecting usb2 on a usb3 port and it seems to be a common problem when using a built in controller on the motherboard. Depending on how its deciding if its a USB2 or USB3 port (some sort of built in speed test?). Saying that, a lot of the posts are saying the Oculus functions fine, regardless of it being shown as USB2 in a USB3 port? Is that not the case? Either way, the add on card route seems to be solving this issue.

 

My next step if I was you would be to get a USB3 add on card, pass that through and take it from there (assuming you have a spare PCIe slot?)

 

Link to comment

Hey billington.mark,

 

Sorry! Looks like I left out a keyword for my USB Controller...it is a PCI Card.

 

But, I have discovered the problem. I will link it here so the next "me" can find it and figure it out before they purchase the WRONG PCI card.

 

The Oculus Rift doesn't support the earlier USB 3.0 cards for some reason and there are tons of articles with people saying they cannot get their PCI card to play nice with their Oculus. See below:

 

https://www.reddit.com/r/oculus/comments/3zrtgs/psa_your_usb_30_ports_may_not_be_compatible_with/

https://support.oculus.com/help/oculus/1175747242441772/

 

Here is a list of brands people have had trouble with with Oculus Rifts:

  • Etron USB 3.0 Extensible Host Controller
  • VIA USB 3.0 eXtensible Host Controller - 1.0 (Microsoft)
  • ASMedia USB 3.0 eXtensible Host Controller
  • ASMedia XHCI Controller
  • Renesas USB 3.0 eXtensible-Hostcontroller

 

I am going to be ordering the one recommended by Oculus and give that a shot. See below:

 

https://www.amazon.com/Inateck-Superspeed-Ports-PCI-Expansion/dp/B00B6ZCNGM

 

--

 

When I first bought my USB 3.0 card, I was more worried unRaid was going to reject it...go figure!

 

Thank you for helping get me to this conclusion, billington.mark!

 

P.S. You will love the Oculus! It is the bomb and will be even better with the Touch Controllers!

Link to comment

Does it give a reason why it doesnt like those cards?

 

Another option to test if thats the case is to not stub the controller remove the pass through, and try pass through each device (probably add the new IDs of the oculus to your stub list in syslinux too)? not sure it'll work, but if its something funky with the windows driver for that usb controller, that issue is removed if you pass through the device with this method instead. Its worth a shot.

Also, worth giving Q35 a try over i440x with this method too, (you'll most likely need to reinstall windows if you try doing this)

 

all things you can try for free before spending money on the new expansion card.

 

Also, when you're playing VR pool.. remember not to lean on the virtual table!

https://www.youtube.com/watch?v=gZCAi0MLxAE

Link to comment

Oculus Home: Yes, Oculus home says the sensor is experiencing high latency and the USB type indicator shows USB 2.0 as the type.

 

USB Assignment: Also, I have tried directing passing each of the devices through to the VM, but the Oculus is a tricky piece of equipment. When you try to pass the Oculus Rift (headset) through with it is dormant or not in use, some of the USB devices within the unRaid GUI don't show up and the Oculus Rift Sensor is not even picked up by Oculus Home. I have

 

Drivers: I have tried the Windows 10 drivers that are assigned when the card was first registered and also the stock drivers from the manufacturer's website. Windows 10 drivers has poor tracking and the Manufacturer's drivers has no tracking.

 

I'll try Q35 on a test VM and see if it works. I might also try to use the USB Card on a vanilla Win10 with bare metal just to go a step farther. If it fails there, I can say it has to the card 

 

HA! I'll keep that in mind. If I don't return to the forum for a while, you will know what happened!

 

Thanks,

 

Vanum

Link to comment

Some tidbits that I had with USB:

 

-Make sure that Windows has the correct driver installed.  It defaults to using a MS driver.  This greatly affected my ASMedia 3.1 USB controller

-Passing through a xhci virtual controller affects polling rates and other items in the VM.  RedHat says there can be performance gains by doing this (I tried it once but took it out again)

 

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/sect-KVM_guest_virtual_machine_compatibility-USB3.0-Support.html

 

-Make sure any hubs connected to the controller ports are USB 3.0

-Make sure the USB controller is reset-able under the host.  I have some that are and some that aren't on the same (Z97) motherboard.

-The passthrough USB controllers can become unstable anyway when the VM is restarted over and over again (at least mine was.  Using the correct Windows drivers helped this).

Link to comment

Q35 did not work either.

 

Before I brought out my spare hard drive and attempted to install Windows 10 bare metal, I decided to pass through one of my motherboard's built USB controllers and leave the USB 3.0 card for unRaid. I booted successfully into unRaid and brought up my Windows 10 and reran the Oculus Setup.

 

Everything installed without fail! Oculus Rift Sensor is running at USB 3.0.

 

Now, the only issue I seem to be having is a very, very, very slight judder when I turn my head too fast, which is abnormal compared to the bare metal build. I have a couple errors in my Event Viewer I am going to sort through that may help identify the culprit.

 

I will link them to this ticket for the next me.

Link to comment
  • 4 weeks later...

Thanks, it looks like I will be ok.

 

Congratulations! You're ready for Oculus Rift

Your computer appears to meet or exceed the recommended system specification for Rift, and will provide an optimal VR experience.

Order Rift

+ Processor

You have an Intel® Core i7-5930K CPU @ 3.50GHz, which meets or exceeds our recommended system specification.

+ Graphics Card

You have an NVIDIA GeForce GTX 1070, which meets or exceeds our recommended system specification.

+ Memory

You have 8 GB of RAM, which meets or exceeds our recommended system specification.

+ Operating System

You're running Windows 10 64-bit, which meets or exceeds our recommended system specification.

+ USB

You have USB 3.0 ports, which meets or exceeds our recommended system specification.

 

Link to comment

Awesome!

 

It looks like you got farther than I got the first time. My Mobo has a Renesas USB controller and wouldn't play nice with the Oculus Rift Sensor. I ended up getting one of the recommended cards to get it to work.

 

If I was you, I would try passing through all of the Oculus Rift USB devices to your VM first and then give it a go. If you aren't getting your Oculus rift Sensor to play nice with your VM, then purchase the Inateck card that is recommended by Oculus.

 

USB PCIe Card: https://www.amazon.com/gp/product/B00FPIMJEW

 

Thanks!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.