diff --git a/gui/electron/main/index.ts b/gui/electron/main/index.ts index 46df1c34b..38e249869 100644 --- a/gui/electron/main/index.ts +++ b/gui/electron/main/index.ts @@ -46,10 +46,12 @@ if (process.platform === 'linux') { app.commandLine.appendSwitch('force-color-profile', 'srgb'); } +console.log(options); // SteamVR will not see the application if this is not enabled if (options.steam) { - app.commandLine.appendSwitch('enable-features', 'WebXR,WebXROpenXR'); + app.commandLine.appendSwitch('enable-features', 'Vulkan,WebXR,WebXROpenXR'); app.commandLine.appendSwitch('enable-xr-sandbox'); + app.commandLine.appendSwitch('use-vulkan'); } app.setPath('userData', getGuiDataFolder()); diff --git a/server/desktop/src/main/java/dev/slimevr/desktop/install/drivers/Linux.kt b/server/desktop/src/main/java/dev/slimevr/desktop/install/drivers/Linux.kt index 3ca4e1b46..5a21ba8cd 100644 --- a/server/desktop/src/main/java/dev/slimevr/desktop/install/drivers/Linux.kt +++ b/server/desktop/src/main/java/dev/slimevr/desktop/install/drivers/Linux.kt @@ -5,18 +5,30 @@ import io.eiren.util.logging.LogManager class Linux { val path: String = System.getProperty("user.dir") + val isFrame = System.getenv("SLIME_SERVER_IS_FRAME")?.toInt() fun updateLinux() { updateLinuxSteamVRDriver() } fun updateLinuxSteamVRDriver() { - val steamVRLocation = SteamUtils.findAppLibraryLocation(250820)?.resolve("steamapps/common/SteamVR") ?: run { - LogManager.warning("SteamVR driver installation failed: couldn't find SteamVR") - return - } - val pathRegPath = "$steamVRLocation/bin/vrpathreg.sh" + val pathRegPath = + if (isFrame == 1) { + "/opt/steamvr/bin/linuxarm64/vrpathreg" + } else { + val steamVRLocation = SteamUtils.findAppLibraryLocation(250820)?.resolve("steamapps/common/SteamVR") + if (steamVRLocation != null) { + LogManager.warning("SteamVR driver installation failed: couldn't find SteamVR") + null + } else { + "${steamVRLocation}/bin/vrpathreg.sh" + } + } + + if (pathRegPath == null) return + + val (findExitCode, _) = executeShellCommand(pathRegPath, "finddriver", "slimevr") ?: run { LogManager.warning("SteamVR driver installation failed: couldn't run vrpathreg finddriver") return @@ -40,6 +52,6 @@ class Linux { } companion object { - private const val LINUX_STEAM_DRIVER_DIRECTORY = "slimevr-openvr-driver-x64-linux" + private const val LINUX_STEAM_DRIVER_DIRECTORY = "slimevr-openvr-driver" } }