linux vr setup
#author_luna #vr #linux #living_article
initally written
current version
world in picture: Umbra by Blue Cat
assuming:
- quest headset (quest 2 or quest 3), NOT lighthouse
- machine with nvidia gpu (proprietary driver), though amd works too
- X11, NOT wayland (don't talk to me about wayland. i do not care. it probably works tho)
- native setup with envision + OpenComposite
- monado with wivrn, NOT steamVR
- as foss as i can, because SVR is abandonware / valvetime-ware
if flatpak:
- note that envision may give you better performance due to
CAP_SYS_NICE=eip
being set by its build process. idk if the flatpak does that lol
flatpak install flathub io.github.wivrn.wivrn
flatpak run io.github.wivrn.wivrn
if envision:
- envision with gcc13.2.0 (currently shipped with void linux) causes a compiler bug. waiting for gcc14 to land
- HOWEVER using clang works wonderfully!
CC=clang CXX=clang++ ./Envision-x86_64.AppImage
- profile is set to https://github.com/notpeelz/WiVRn.git,
solarxr-patches
branch, more in the full body tracking section
get wlxoverlay-s while at it
get xrgears while at it so you can test your setup. there's no specific appimage or whatever so you'll need to build it. link is for void-packages (i use void linux, you may be able to find it on AUR if arch)
then pair the headset (get wivrn app from meta quest store) to the server, and connect to it. you aren't dropped to vr until there's a vr client, so open another terminal and ./wlxoverlay-s-whatever-version-u-got.appimage
i recommend looking over wlxoverlay-s' readme to see controller mappings. i also recommend configuring it such that show/hide follows your HMD center (xsoverlay-style behavior, i know)
audio #
- i use pipewire + pipewire-pulse
- need to configure default devices to use wivrn, got a small script that does it
- i believe those become availble as soon as HMD connects
- i configured wivrn to run this script on HMD connection, spins up overlays as well
#!/bin/sh set -eux pactl set-default-sink wivrn.sink pactl set-default-source wivrn.source
full body tracking #
- i use slimevr
currently https://lvra.gitlab.io/docs/slimevr/ gives 3 options for full body tracking:
- linux steamvr (nope, this is not a steamvr setup lol)
- linux solarxr (it's what i'm using right now)
- vrchat osc (can use)
vrchat osc with slimevr sucks if your trackers are using cheap IMUs like mine (my bad experience with ozivr), since osc does not give HMD position, slimevr has to assume HMD is always upright, which requires you to always stay upright on any reset (yaw, full, mounting), which i have to do every 10 minutes or so. makes for good exercise i guess, but for me it's unusable.
relevant prs:
- slimevr (merged!) https://github.com/SlimeVR/SlimeVR-Server/pull/1247
- monado (soon, hopefully!) https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2253
no need to build slimevr! appimage exists for the currently WIP version that contains solarxr support: https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.14.0-rc1. you may need tricks for nvidia though:
env WEBKIT_DISABLE_DMABUF_RENDERER=1 ./SlimeVR-amd64.appimage
video games #
IMPORTANT the LVRA DB is now a thing: https://respuit.github.io/VRDB/, prefer going to it to find out compatibility information for your preffered vr apps.
generally, copy the environment variables from wivrn into the steam game's launch options and it'll mostly likely work (test results as of
- vrchat (works, generally), save for:
- as long as you disable antialiasing on nvidia gpus (or else, bad performance on mirrors)
- some worlds' shaders don't work very well on linux (one example i got is a world where its lights were way brighter than windows version, it was still a good world but it can be jarring to ppl)
- bug at loading environment. something related to opencomposite not working with steamvr overlays, which vrchat's loading screen is
- it's possible xrizer works but it's really new
- lvra is a good resource in general: https://lvra.gitlab.io/docs/vrchat/
- beat saber (works, no issues. mods work too! i use bsmanager with flatpak. more info at the bsmg wiki)
- pistol whip (works, missing: downloading custom maps from within proton, recentering)
- synth riders (works, including custom songs here. missing: recentering)
- tetris effect (works), issues:
- black border around my HMD FIXED by wivrn v0.23
- likely due to "Forward visibility mask and framerate change (OpenXR features)"
- recentering FIXED by wivrn v0.23
- well, fixed enough. there's a 5deg offset but that's nothing compared to 180deg
- black border around my HMD FIXED by wivrn v0.23
random notes #
- never use h265, broken. h264 for the win
- somehow i can now take 8k vrc pictures without everything locking up (and in the worst cases, not coming back to life), at worst vrchat is a bit slow for 5 seconds, but not frozen for 10~20
- if you use barrier / input-leap it'll fuck up spetacularly with wlxoverlay, requires a reboot to get that functionality back
- i am able to get syncthing to synchronize linux vrchat's pictures to my main computer without much issue (save for faulty ram which triggered disk corruption but shhh we don't talk about that)
- vrcx has a stable native linux build! https://github.com/vrcx-team/VRCX/releases/tag/v2025.01.31, this should Just Work (as long as you have dotnet) but if it doesn't, please talk around in vrcx discord and we'll hook you up. native linux support is quite new
avahi on void linux #
need avahi on void
xbps-install avahi
sudo ln -s /etc/sv/avahi-daemon/ /var/service/
- set
enable-dbus=yes
on/etc/avahi/avahi-daemon.conf
need dbus fixed on void
- i have both a system bus and a session bus
- got
dbus-run-session /usr/bin/awesome
configured under/usr/share/xsessions/awesomewm.desktop
already - seems avahi cant connect to system bus tho
2025-01-25T01:04:55.77879 daemon.warn: Jan 24 22:04:55 avahi-daemon[21245]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
2025-01-25T01:04:55.77935 daemon.err: Jan 24 22:04:55 avahi-daemon[21245]: dbus_bus_request_name(): Connection ":1.12091" is not allowed to own the service "org.freedesktop.Avahi" due to security policies in the configuration file
2025-01-25T01:04:55.77939 daemon.warn: Jan 24 22:04:55 avahi-daemon[21245]: WARNING: Failed to contact D-Bus daemon.
need to restart dbus methinks. avahi package installs avahi.conf into dbus settings so it has perms
NOTE: need to restart entire system after restarting dbus system bus. everything explodes otherwise
https://stackoverflow.com/questions/4560877/dbus-bus-request-name-connections-are-not-allowed-to-own-the-service
wivrn can't start due to unknown error (999) in nvenc encoder #
following https://github.com/obsproject/obs-studio/issues/11381, i did this:
nvidia-smi
sudo modprobe -r nvidia-uvm
sudo modprobe nvidia-uvm
- restart wivrn
also https://github.com/tensorflow/tensorflow/issues/53341#issuecomment-1166532019
changelog #
- no flatpak wivrn here thanks to clang
- keep flatpak wivrn instructions because flatpak is still a faster setup experience
- linux solarxr works perfectly
- LVRA DB is now a thing
- barrier being broken remains