Skip to content

Instantly share code, notes, and snippets.

@Nullctipus
Created April 15, 2024 05:05
Show Gist options
  • Save Nullctipus/c9a5cfcc7180aa3fea180f95eeb136a1 to your computer and use it in GitHub Desktop.
Save Nullctipus/c9a5cfcc7180aa3fea180f95eeb136a1 to your computer and use it in GitHub Desktop.

Getting SteamVR to work with hyprland and NVIDIA

System Information

  • Linux 6.8.6-273-tkg-bore
  • wayland 1.22.0-1
  • hyprland 0.38.1-1

Main issue

in ~/.config/hypr/hyprland.con I have the lines

env = QT_QPA_PLATFORM,"wayland;wayland-egl;xcb"
env = SDL_VIDEODRIVER,"wayland"

this causes steamvr and steam to not be able to talk correctly.

Steps I used

# set CAP_SYS_NICE because kdesu didn't launch
sudo setcap CAP_SYS_NICE+ep ~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher

edit /usr/share/applications/steam.desktop

set Exec=/usr/bin/steam-runtime %u to Exec=env SDL_VIDEODRIVER=X11 QT_QTA_PLATFORM=xcb /usr/bin/steam-runtime %u

OpenVR Advanced Settings

OpenVR Advanced Settings doesn't like SDL_VIDEODRIVER=X11 QT_QTA_PLATFORM=xcb and will segfault on launch

to fix this I built from source and reset the variables to QT_QPA_PLATFORM="wayland" SDL_VIDEODRIVER,"wayland"

git clone https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings
cd OpenVR-AdvancedSettin
qmake
make -j$(nproc)

you can then run it from bin/linux/AdvancedSettings/AdvancedSettings

to replace the steam version

copy the files in bin/linux/AdvancedSettings/ to ~/.local/share/Steam/steamapps/common/OVR_AdvancedSettings/

cp -r bin/linux/AdvancedSettings/* ~/.local/share/Steam/steamapps/common/OVR_AdvancedSettings/

edit run.sh in ~/.local/share/Steam/steamapps/common/OVR_AdvancedSettings/

replace the appimage call to AdvancedSettings

either export the enviornment variables or add it to command line arguments as QT_QPA_PLATFORM="wayland" SDL_VIDEODRIVER,"wayland" %command%

@Nullctipus
Copy link
Author

this is just what worked on my system and it fixed 109 and 497

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment