SteamVR on Linux
Tom Goddard
October 26, 2018
Here are instruction on how to setup SteamVR to work on Linux to use ChimeraX. I tried two Linux distibutions
Both worked and gave rendering as smooth as on Windows 10 for four test systems using an HTC Vive headset although there are several small problems.
These tests were done to help two labs at UC San Francisco (Matt Jacobson and Adam Frost)
use ChimeraX VR to visualize
molecular structures and electron microscopy density maps on their CentOS 7 desktop systems.
Advice
Almost all VR is on Windows 10. Using any Linux system for VR is likely to run into problems
and is not advised unless it is essential to use the linux.
Installation is easier on Ubuntu than CentOS because the C++ library on CentOS 7 is too old to
run the currently distributed SteamVR runtime. Also SteamVR room setup crashed on CentOS and required
copying bounds files from a Windows machine.
Software and Hardware Tested
- Ubuntu 18.04.1
- CentOS 7.5.1804 core
- Steam installed from negativo17.org
- SteamVR beta, version 1540280036 (October 23, 2018)
- ChimeraX daily build (October 27, 2018)
- Nvidia GTX 1080, proprietary driver version 410.66 (Oct 16, 2018).
- CPU i7-4790K 4.0Ghz, 4 cores
- 16 Gbytes memory
Setting up Virtual Reality on Ubuntu 18.04
- Install Ubuntu 18.04.1.
- Install Nvidia graphics drivers using Ubuntu Software Update graphical interface, the Additional Drivers tab.
- Install Steam using
sudo add-apt-repository multiverse
sudo apt install steam
sudo apt install steam-devices
sudo apt install libvulkan1
- Run steam from a shell, log into Steam account.
- Install SteamVR, switch to SteamVR beta by right clicking SteamVR within Steam, choosing Properties, then Betas tab.
- Plug HTC Vive headset into computer display port and usb, turn on hand controllers.
- Start SteamVR from within Steam. First try it said headset not detected.
Quit SteamVR and started again and it came up correctly, headset and hand-controllers tracking.
- Run SteamVR room setup. I setup for room-scale.
- Install ChimeraX , run it, opened molecule and start VR with ChimeraX commands
open 2gbp
vr on
Setting up Virtual Reality on CentOS 7
- Setting up a test CentOS 7 system:
- Opened case of computer, disconnected Windows 10 system disk, connected new SSD drive for testing. Aim was not to dual boot, just set up a temporary test CentOS 7 system.
- Downloaded the Minimal ISO for CentOS 7.
- Made a bootable CentOS USB drive on a Mac using these instructions.
- Installed graphical desktop: sudo yum groupinstall "GNOME Desktop"
- Installed development tools: sudo yum groupinstall "Development Tools"
- Install Nvidia graphics drivers.
I actually tried SteamVR with Mesa drivers but did not get it to work.
- Obtain current Nvidia driver for 64-bit Linux (version 410.66) directly from Nvidia.
- I followed these instructions
to install the Nvidia driver.
- The installer asks whether to install 32-bit drivers, say yes. Info online suggests SteamVR is 32-bit -- not sure this is true.
- Installed Vulkan graphics loader "sudo yum install vulkan". SteamVR uses Vulkan. Not sure if this step is needed.
- Install Steam and SteamVR
- Install Steam using instructions from negativo17.org.
- Start Steam, make an account if you don't have one, go to the Store tab, search for SteamVR and install.
- Right click on SteamVR within Steam, select Properties, go to Betas tab and subscribe to StreamVR beta.
- Use newer libstdc++.so.6
- SteamVR beta will fail to start. Error logs say system /lib64/libstdc++.so.6 provides GLIBCXX_3.4.19 and SteamVR beta requires GLIBCXX_3.4.20.
- I located a copy of 64-bit libstdc++.so.6 from gcc 4.9 on the web, and put it in ~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/libstdc++.so.6.
- Start SteamVR
- Can start "steam" from a terminal, or from GNOME desktop menu Applications / Games / Steam.
- Within Steam go to Library tab and start SteamVR.
Problems using SteamVR on Linux
- Room setup crashes (CentOS 7 only)
- Running SteamVR room setup always crashes at some point when trying to setup Room Scale.
Usually I can get through calibrate floor, and sometimes start tracing room bounds, then it spontaneously
crashes.
- Room setup for Seated (not room scale) worked without crashing.
- To use room scale I copied the chaperone_info.vrchap file from Windows 10 after SteamVR room setup using the same base stations. On Windows this file is in C:/Program Files (x86)/Steam/config/chaperone_info.vrchap and on Linux it is ~/.local/share/Steam/config/chaperone_info.vrchap. The Windows 10 chaperone file needs to have the "universeID" in the file changed to Linux file value otherwise SteamVR will not use the file and will ask the user to run room setup.
- SteamVR failed to initialize warning (CentOS 7 only)
- When SteamVR starts it sometimes shows an error "SteamVR failed to initialized for unknown reasons. (Error: vrclient Shared Lib not found (102))."
- Despite this error the SteamVR small window also comes up and it works correctly.
- I did not figure out how to fix this vrclient.so problem.
- This problem did not interfere with ChimeraX VR and I found not way to prevent the warning.
- Warning about Extended Mode. (CentOS and Ubuntu)
SteamVR is in Extended Mode. Extended Mode is not recommended.
For best results please switch to Direct Mode.
[Dismiss] [Enable Direct Mode]
Pressing Enable Direct Mode did not work. SteamVR did not restart. When I restarted it
it gave the same Extended Mode warning. Pressed Dismiss. The steam vrcompositor log showed
it is in fact in Direct Mode, and in later uses of SteamVR I did not see the Extended Mode warning on Ubuntu.
- SteamVR does not start automatically (Ubuntu and CentOS)
- When a VR app is started SteamVR must already be started by hand.
- On Windows SteamVR starts automatically when a VR app starts.
- In ChimeraX when the "vr on" command is issued without first
starting SteamVR it gives an error "VRInitError_IPC_ConnectFailed (error number 301)". Same error if Steam is running but SteamVR is not.
- Long delay restarting VR. (Ubuntu, did not check on CentOS)
After quitting ChimeraX while in VR it sometimes took 30 seconds for StreamVR Home to start in the headset.
During that time, starting ChimeraX VR again often caused ChimeraX to freeze for 30 seconds before
starting, or in one case produced an error about another app launching in VR.
Performance of ChimeraX VR on Test Data
Performance of ChimeraX VR was perfectly smooth on the following
four systems, identical to performance on Windows 10 using the
exact same hardware.
- Opioids demo: Performance was smooth and as good as Windows showing 24 small protein structures with a button user interface to switch between them.
- Ribosome demo: Large molecular system. Worked smoothly as good as on Windows.
- Translation initiation factor and cryoEM map.
Atomic model PDB 6caj and EMDB density map 7442. Zones, map contour level changes, bond rotation. All worked smoothly, same as Windows 10.
- 3D light microscopy crawling neutrophil.
About 4 Gbytes of 3D lightsheet microscopy, time series of about 200 time points, shown as surfaces. Worked smoothly as in Windows.
Troubleshooting
Details
I wrote more setup and debugging details, but many problems that I eventually solved.
Ubuntu details. CentOS details.