ValveSoftware / SteamVR-for-Linux

Issue tracker for the Linux port of SteamVR
930 stars 45 forks source link

[BUG] Flatpak SteamVR initialization/setup issues #584

Closed jarrard closed 1 year ago

jarrard commented 1 year ago

Describe the bug SteamVR won't launch due to vrcompositor-launcher trying to use pkexec under flatpak

To Reproduce Steps to reproduce the behavior:

  1. Launch SteamVR and monitor terminal outputs for obvious error.

Expected behavior be able to launch vrcompositor-launcher without pkexec or elevation issues under flatpak

System Information (please complete the following information):

Additional context Some output from Steam. Also it does fail to initialize SteamVR on startup, but that may be normal.

+ pkexec setcap CAP_SYS_NICE=eip /home/theriddick/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher
/home/theriddick/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh: line 39: pkexec: command not found
++ getcap /home/theriddick/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher
+ [[ '' == *\c\a\p\_\s\y\s\_\n\i\c\e* ]]
+ pErr 'Error: setcap of vrcompositor-launcher failed.'
++ date
+ echo 'Fri May 19 12:48:39 ACST 2023 - Error: setcap of vrcompositor-launcher failed.'
+ return 1
+ '[' 1 '!=' 0 ']'
+ /usr/bin/zenity --no-wrap --info '--text=SteamVR setup is incomplete, some features might be missing. See /tmp/SteamVRLauncherSetup.log for details.'
jarrard commented 1 year ago

It's possible to run $HOME/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh directly but I don't know if that will solve the problem correctly when linking with ALVR or other apps etc...

Vixea commented 1 year ago

Run

sudo setcap CAP_SYS_NICE+ep ~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher
Vixea commented 1 year ago

And no it has nothing to do with ALVR just how flatpak is with apps not explicitly built for it and I'm not sure you could it's complicated to say the least

Vixea commented 1 year ago

Also make sure you are building alvr with the flatpak version of ALVR any other version isn't going to work(you need to build it yourself)

jarrard commented 1 year ago

fair enough, for now I've moved back to system runtime steam for better performance anyway.

Thanks for help. I'll close this now.