VR: Difference between revisions

Scrumplex (talk | contribs)
m Update warning about Proton querying OpenXR/OpenVR runtimes
Scrumplex (talk | contribs)
m Update Home Manager OpenXR runtime config
Line 50: Line 50:


In order to run OpenVR games on anything other than SteamVR, you need to configure the OpenVR runtime path defined in <code>~/.config/openvr/openvrpaths.vrpath</code>. A reliable way to do this is to use [[Home Manager]] to create this file.
In order to run OpenVR games on anything other than SteamVR, you need to configure the OpenVR runtime path defined in <code>~/.config/openvr/openvrpaths.vrpath</code>. A reliable way to do this is to use [[Home Manager]] to create this file.
{{Warning|Older versions of Proton will always query the current OpenVR and OpenXR runtime. If you use OpenComposite, and it fails to initialize an OpenXR context, Proton will fail to launch. A workaround is to delete the ~/.config/openvr/openvrpaths.vrpath file and then retry launching the game.}}


If this file is not set to read-only, SteamVR will add its runtime path back, hence the use for Home Manager.
If this file is not set to read-only, SteamVR will add its runtime path back, hence the use for Home Manager.


{{Warning|Older versions of Proton will always query the current OpenVR and OpenXR runtime. If you use OpenComposite, and it fails to initialize an OpenXR context, Proton will fail to launch. A workaround is to delete the ~/.config/openvr/openvrpaths.vrpath file and then retry launching the game.}}
An example configuration for enabling OpenComposite may look like this:


An example configuration for enabling OpenComposite may look like this:
{{file|~/.config/home-manager/home.nix|nix|3=# For Monado:
xdg.configFile."openxr/1/active_runtime.json".source = "${pkgs.monado}/share/openxr/1/openxr_monado.json";


{{file|~/.config/home-manager/home.nix|nix|3=xdg.configFile."openxr/1/active_runtime.json".text = ''
# For WiVRn:
  {
xdg.configFile."openxr/1/active_runtime.json".source = "${pkgs.wivrn}/share/openxr/1/openxr_wivrn.json";
    "file_format_version": "1.0.0",
    "runtime": {
        "name": "Monado",
        "library_path": "${pkgs.monado}/lib/libopenxr_monado.so"
    }
  }
'';


xdg.configFile."openvr/openvrpaths.vrpath".text = ''
xdg.configFile."openvr/openvrpaths.vrpath".text = ''