Oculus Rift "drifts" on recent kernels

Bug #1337641 reported by Alistair Buxton
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

When running Oculus Rift compatible software, the HMD rotation seen by software drifts by a few degrees per second, even when the HMD is not moving at all (ie, it's sitting perfectly still on the desk).

This is a regression in 3.13.0-27 and newer. Downgrading to 3.13.0-24 prevents the bug from happening.

The bug happens after using the OR in hidraw mode (which is what the OVR SDK uses), and will even persist if you reboot into Windows without power cycling the device.

OpenHMD is an alternative SDK for the Oculus Rift. When using OpenHMD in libusb mode the problem does not happen, unless you have previously used some software which opens the OR in hidraw mode. OpenHMD can also be compiled to use hidraw, and if you do that it just shows a black screen with the example. If you then run it in libusb mode, the drift happens.

This bug has been reported on the Oculus forums: https://developer.oculusvr.com/forums/viewtopic.php?f=34&t=9689

To me this looks like a HID bug. Something is messing up the state of the hardware so badly that it will continue to report bad data even when using software that works correctly after a power cycle. Looking at the commits between -24 and -27 kernels I see a bunch of commits to HID which look like they might be responsible for this.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-3.13.0-30-generic 3.13.0-30.54
ProcVersionSignature: Ubuntu 3.13.0-30.54-generic 3.13.11.2
Uname: Linux 3.13.0-30-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: al 1999 F.... pulseaudio
 /dev/snd/controlC1: al 1999 F.... pulseaudio
 /dev/snd/controlC0: al 1999 F.... pulseaudio
CurrentDesktop: XFCE
Date: Fri Jul 4 01:07:13 2014
HibernationDevice: RESUME=UUID=cd4b4f29-2984-430a-8556-26b5fd58d903
InstallationDate: Installed on 2014-06-29 (4 days ago)
InstallationMedia: Xubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.2)
IwConfig:
 eth0 no wireless extensions.

 lo no wireless extensions.
MachineType: System manufacturer System Product Name
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-30-generic root=UUID=06500b4e-b446-411c-9a19-cfff649a7be4 ro quiet splash
RelatedPackageVersions:
 linux-restricted-modules-3.13.0-30-generic N/A
 linux-backports-modules-3.13.0-30-generic N/A
 linux-firmware 1.127.4
RfKill:
 0: hci0: Bluetooth
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/25/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0704
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: M4A79XTD EVO
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev X.0X
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0704:bd11/25/2009:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnM4A79XTDEVO:rvrRevX.0X:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

I forgot to mention this, but the way OpenHMD switches modes is by using the hidapi library, which has two versions for libusb and hidraw. You just link against the one you want. So the code is doing the exact same thing in each case, and the HID version of it doesn't work. That's why I think it is a HID bug.

Revision history for this message
penalvch (penalvch) wrote :

Alistair Buxton, thank you for reporting this and helping make Ubuntu better. As per http://www.asus.com/Motherboards/M4A79XTD_EVO/HelpDesk_Download/ an update to your BIOS is available (2102). If you update to this following https://help.ubuntu.com/community/BiosUpdate does it change anything? If it doesn't, could you please both specify what happened, and provide the output of the following terminal command:
sudo dmidecode -s bios-version && sudo dmidecode -s bios-release-date

Please note your current BIOS is already in the Bug Description, so posting this on the old BIOS would not be helpful. As well, you don't have to create a new bug report. As well, you don't have to create a new bug report.

For more on BIOS updates and linux, please see https://help.ubuntu.com/community/ReportingBugs#Bug_reporting_etiquette .

Thank you for your understanding.

tags: added: bios-outdated-2102 regression-update
Changed in linux (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

This isn't a BIOS issue, it's been reproduced across multiple different hardwares including by the oculus developers themselves, and is a regression in the stable release. It's either a bug in the oculus driver code, or it's a bug in the kernel.

Changed in linux (Ubuntu):
status: Incomplete → New
Revision history for this message
Brad Figg (brad-figg) wrote :

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
penalvch (penalvch)
tags: added: needs-bisect needs-upstream-testing
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.