Install and run SteamVR on ArchLinux (for using an HTC-Vive) and do OpenGL/OpenVR developement

ybalrid

Arthur Brainville

Posted on March 25, 2018

Install and run SteamVR on ArchLinux (for using an HTC-Vive) and do OpenGL/OpenVR developement

So, I recently had the chance to try out an HTC-Vive on a Linux machine. Naturally, I installed Arch on it !šŸ˜‰

The installation is pretty straight forward, but there are some little catches if you want to do OpenGL development on Linux With OpenVR (OpenVR is the API you use to talk to the SteamVR runtime.)

SteamVR has a Linux beta since February 2017. They also announced that the SteamVR runtime itself is implemented with Vulkan only.

First thing first, I am unaware if itā€™s currently possible to update the firmware of the base station on Linux, The setup Iā€™m using is also running on Windows and the firmwares where already updated on that platform. Thatā€™s one thing I canā€™t tell you about.

So, to get started, you will need to have Steam running on your machine. ArchLinux is now a 64bit only distribution, Steam is a 32 bit only program. So, if itā€™s not already the case, you need to activate the [multilib] repository for pacman. (just uncoment the lines for it in /etc/pacman.conf)

First thing first, to do VR, you do need a good GPU. Here Iā€™m running an Nvidia GTX 1070 with the proprietary drivers. You can use an AMD one with the latest version of the mesa drivers apparently. I donā€™t have access to any modern AMD graphics card so I canā€™t tell.

Then, you will need to install the following packages:

  • steam
  • lsb-release
  • your graphicā€™s driver packages in 32 bit (lib32-nvidia-utils, lib32-libvdpau)

Once you have installed Steam, launch it, connect or create an account, and install the SteamVR package, then you want to turn on the beta:

Once you have steam VR on your machine, and before you plug the Vive on the computer, you will need to install some udev rules to permit the app to access the device directly.

Create a file /lib/udev/rules.d/60-HTC-Vive-perms.rules and write the following content in it:

# HTC Vive HID Sensor naming and permissioning KERNEL=="hidraw\*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="2c87", TAG+="uaccess" KERNEL=="hidraw\*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2101", TAG+="uaccess" KERNEL=="hidraw\*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2000", TAG+="uaccess" KERNEL=="hidraw\*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1043", TAG+="uaccess" KERNEL=="hidraw\*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2050", TAG+="uaccess" KERNEL=="hidraw\*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2011", TAG+="uaccess" KERNEL=="hidraw\*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2012", TAG+="uaccess" SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="2c87", TAG+="uaccess" # HTC Camera USB Node SUBSYSTEM=="usb", ATTRS{idVendor}=="114d", ATTRS{idProduct}=="8328", TAG+="uaccess" # HTC Mass Storage Node SUBSYSTEM=="usb", ATTRS{idVendor}=="114d", ATTRS{idProduct}=="8200", TAG+="uaccess" SUBSYSTEM=="usb", ATTRS{idVendor}=="114d", ATTRS{idProduct}=="8a12", TAG+="uaccess"
Enter fullscreen mode Exit fullscreen mode

You can now open SteamVR, and you should be prompted to run the room setup program to configure your ā€œplay spaceā€

Then, if you want to use OpenVR to render to the Vive with OpenGL, you will need a Vulkan runtime and development package. For this, you need to install the

vulkan-devel
Enter fullscreen mode Exit fullscreen mode

package.

You may also need to launch your programs under under the steam runtime, this is done using this script :

~/.steam/steam/ubuntu12\_32/steam-runtime/run.sh ./my\_steamvr\_app
Enter fullscreen mode Exit fullscreen mode

And that should be about it. Programs that link against the OpenVR API will ā€œjust workā€ now.

The info in this article comes from my own experience, and this document from Valve : https://github.com/ValveSoftware/SteamVR-for-Linux

Annwvyn, my game engine is now ā€œofficiallyā€ compatible with Linux with OpenVR. !šŸ˜‰

I would be really happy if it was possible to use the Oculus Rift on Linux, yet, there arenā€™t any good solution right now. Oculus froze Linux development effort years ago, so we arenā€™t going to see an official SDK any time soon. The OpenHMD project has made ā€œsomeā€ progressā€ but nothing really usable for now.

šŸ’– šŸ’Ŗ šŸ™… šŸš©
ybalrid
Arthur Brainville

Posted on March 25, 2018

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related