Troubleshooting steamVR

About a year ago I had my Valve Index virtual reality headset working with NixOS, now it doesn’t anymore.

I tried some of the advices flying around, like:

  • different usb ports
  • restarting everything
  • steamvr versions: 1.20, 1.21.6 beta, 1.14 linux
  • setting the xserver.extraConfig to
  Section "Monitor"
    Identifier "DisplayPort-2"
    Option "PreferredMode" "2880x1600"
    Modeline "2880x1600_120.00"  827.00  2880 3128 3448 4016  1600 1603 1613 1717 -hsync +vsync
    Modeline "2880x1600_100.00"  678.50  2880 3128 3440 4000  1600 1603 1613 1697 -hsync +vsync
    Modeline "2880x1600_90.00"  607.00  2880 3128 3440 4000  1600 1603 1613 1687 -hsync +vsync

I am on NixOS 21.11, with a Nvidia Gtx 1080 ti, on a desktop system.

I always get the 307 error when starting SteamVR, not being able to then continue with the room setup (“headset off”).

My headset does not appear in the output of xrandr nor do I have a hint in xrandr --verbose | grep desktop. Supposedly, there should be a line like “non-desktop: 1”.

Anyone here got steamVR to work? What did you do? What is a sensible way to go about troubleshooting this?

looks like using


in my configuration.nix did the trick.

I also got rid of other, prior steam-related lines in my configuration:

- steam-hardware.enable = true;                                                                                                       
- opengl.driSupport32Bit = true;

Can you share a full(er) config? I’m sure the author of this blog post is still looking for answers: My VR Hell on NixOS - Xe

1 Like

Does it detect the right resolutions automatically without the extraConfig for you?

1 Like

that’s fair!

After switching to the new configuration that has programs.steam.enable = true, steam installs itself upon starting it and I do

sudo setcap CAP_SYS_NICE+ep ~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher

to avoid an error message upon startup of SteamVR, but this aesthetics, as far as I understand.

There is no further config for me, at the moment.

In the process of troubleshooting I switched to the latest stable NixOS channel, 21.11, ran

nix-channel --update


nixos-rebuild boot --upgrade,

then rebooted.

I got rid of these three lines:

kernelPackages = pkgs.linuxPackages_5_4;
blacklistedKernelModules = [ "rtl8xxxu" ];
extraModulePackages = with config.boot.kernelPackages; [ rtl8192eu ];

that I needed for an external wifi antena from TP link. Removing those, I allowed an upgrade to a more recent linux kernel, at the cost of not having wifi (which I luckily do not rely on, anymore). I haven’t tried if now SteamVR would still work switching back to that old, modified kernel.

SteamVR now works in its current verion 1.20, however, the settings dialogue of SteamVR only shows up reliably in the version “1.21.6 beta”.

I then continued my original plan of installing simulavr, which I am quite enthusiastic about. The simula installations instruction (including NixOS) are quite short and in the file my-path-to-the-simula-git-repo/config/config.dhall I had to change “OpenXR” to “OpenVR” and to my amazement, it simulavr just worked.

So my actual configuration is now very short, no tweaks, no custom hacks.

  • SteamVR and simula start up reliably since then on the first try, no issues so far.
  • the SteamVR overlay works, I can start VR apps from within VR
  • my virtual hands and the models of the controllers are rendered correctly and reliably, no problem

A major source of annoyance is the very opaque error that everyone seems to encounter at some point (307) and which does not give any clue about what’s malconfigured, and thus I still don’t know what exactly caused the problem.

On top of this, my vr headset still does not show in the output of xrandr, neither in the output of xrandr --verbose | grep desktop. For this reason, I can’t tell what resolution/framerate I actually have. From what I see within the 3D world and simulavr, my resolution is correct and my framerate is at 120 Hz according to the console output of simula … at some point in future I will want to know for sure and set it to 144 Hz, but for now I am fine.

1 Like

I will confirm exactly later, but by the looks of it: frame rate is set to 120 Hz (144 Hz would be better, but I don’t really mind) and the resolution seems correct, otherwise simulavr wouldn’t look so crisp.