From 2c4555deaca98767f860292d96ff748d05b950f2 Mon Sep 17 00:00:00 2001 From: Meister1593 Date: Sun, 19 Jan 2025 02:29:05 +0400 Subject: [PATCH 1/7] linux: Add amdvlk/amdgpu-pro check, add vrmonitor path to cmdline, more logs for igpu. Update wiki for integrated graphics and for vrmonitor paths in all commands. --- .../src/steamvr_launcher/linux_steamvr.rs | 141 +++++++++++++----- wiki/Linux-Troubleshooting.md | 11 +- 2 files changed, 110 insertions(+), 42 deletions(-) diff --git a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs index 10ef641c2e..a5c1675982 100644 --- a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs +++ b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs @@ -1,4 +1,5 @@ use std::fs; +use std::path::PathBuf; use std::{env, process::Command}; use alvr_common::anyhow::bail; @@ -77,55 +78,118 @@ pub fn linux_hardware_checks() { || adapter.get_info().device_type == wgpu::DeviceType::IntegratedGpu }) .map(|adapter| match adapter.get_info().vendor { - 0x10de => DeviceInfo::Nvidia, - 0x1002 => DeviceInfo::Amd { - device_type: adapter.get_info().device_type, - }, - 0x8086 => DeviceInfo::Intel { - device_type: adapter.get_info().device_type, - }, - _ => DeviceInfo::Unknown, + 0x10de => (adapter, DeviceInfo::Nvidia), + 0x1002 => ( + adapter, + DeviceInfo::Amd { + device_type: adapter.get_info().device_type, + }, + ), + 0x8086 => ( + adapter, + DeviceInfo::Intel { + device_type: adapter.get_info().device_type, + }, + ), + _ => (adapter, DeviceInfo::Unknown), }) .collect::>(); - linux_hybrid_gpu_checks(&device_infos); + linux_gpu_checks(&device_infos); linux_encoder_checks(&device_infos); } -fn linux_hybrid_gpu_checks(device_infos: &[DeviceInfo]) { +fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { let have_igpu = device_infos.iter().any(|gpu| { - gpu == &DeviceInfo::Amd { - device_type: wgpu::DeviceType::IntegratedGpu, - } || gpu - == &DeviceInfo::Intel { + gpu.1 + == DeviceInfo::Amd { device_type: wgpu::DeviceType::IntegratedGpu, } + || gpu.1 + == DeviceInfo::Intel { + device_type: wgpu::DeviceType::IntegratedGpu, + } }); debug!("have_igpu: {}", have_igpu); - let have_nvidia_dgpu = device_infos.iter().any(|gpu| gpu == &DeviceInfo::Nvidia); + + let have_nvidia_dgpu = device_infos.iter().any(|gpu| gpu.1 == DeviceInfo::Nvidia); debug!("have_nvidia_dgpu: {}", have_nvidia_dgpu); + + let have_amd_igpu = device_infos.iter().any(|gpu| { + gpu.1 + == DeviceInfo::Amd { + device_type: wgpu::DeviceType::IntegratedGpu, + } + }); + debug!("have_amd_igpu: {}", have_amd_igpu); + let have_amd_dgpu = device_infos.iter().any(|gpu| { - gpu == &DeviceInfo::Amd { - device_type: wgpu::DeviceType::DiscreteGpu, - } + gpu.1 + == DeviceInfo::Amd { + device_type: wgpu::DeviceType::DiscreteGpu, + } }); debug!("have_amd_dgpu: {}", have_amd_dgpu); - let have_intel_dgpu = device_infos.iter().any(|gpu| { - gpu == &DeviceInfo::Intel { - device_type: wgpu::DeviceType::DiscreteGpu, + + if have_amd_igpu || have_amd_dgpu { + let is_any_amd_driver_invalid = device_infos.iter().any(|gpu| { + info!("Driver name: {}", gpu.0.get_info().driver); + match gpu.0.get_info().driver.as_str() { + "AMD proprietary driver" | "AMD open-source driver" => true, // AMDGPU-Pro | AMDVLK + _ => false, + } + }); + if is_any_amd_driver_invalid { + error!("Amdvlk or amdgpu-pro vulkan drivers detected, SteamVR may not function properly. \ + Please remove them or make them unavailable for SteamVR and games you're trying to launch. \ + For more detailed info visit wiki: https://github.com/alvr-org/ALVR/wiki/Linux-Troubleshooting#artifacting-no-steamvr-overlay-or-graphical-glitches-in-streaming-view") } + } + + let have_intel_dgpu = device_infos.iter().any(|gpu| { + gpu.1 + == DeviceInfo::Intel { + device_type: wgpu::DeviceType::DiscreteGpu, + } }); debug!("have_intel_dgpu: {}", have_intel_dgpu); + + let vrmonitor_path = alvr_server_io::steamvr_root_dir()? + .join("bin") + .join("vrmonitor.sh"); + debug!("vrmonitor_path: {}", vrmonitor_path); + + let mut vrmonitor_path_written = false; if have_igpu { if have_nvidia_dgpu { - warn!("For functioning VR you need insert following into SteamVR and ALL (!) games commandline options:"); + warn!( + "For functioning VR you need to put following line into SteamVR commandline options and restart it:" + ); warn!("__GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only \ - VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json %command%") + VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json {} %command%", vrmonitor_path); + warn!("And similar commandline to ALL games commandline option you're trying to launch from steam: \ + __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json %command%"); + vrmonitor_path_written = true; } else if have_intel_dgpu || have_amd_dgpu { - warn!("For functioning VR you need insert following into SteamVR and ALL (!) games commandline options:"); - warn!("DRI_PRIME=1 %command%") + warn!( + "For functioning VR you need to put following line into SteamVR commandline options and restart it:" + ); + warn!("DRI_PRIME=1 {} %command%", vrmonitor_path); + warn!("And similar commandline to ALL games commandline options you're trying to launch from stean:"); + warn!("DRI_PRIME=1 %command%"); + vrmonitor_path_written = true; + } else { + warn!("Beware, using just integrated graphics might lead to very poor performance in SteamVR and VR games."); + warn!("For more information, please refer to the wiki: https://github.com/alvr-org/ALVR/wiki/Linux-Troubleshooting") } } + if !vrmonitor_path_written { + warn!( + "Make sure you have set following line in your SteamVR commandline options and restart it: {} %command%", + vrmonitor_path + ) + } } + fn linux_encoder_checks(device_infos: &[DeviceInfo]) { for device_info in device_infos { match device_info { @@ -191,7 +255,9 @@ fn linux_encoder_checks(device_infos: &[DeviceInfo]) { "Couldn't find VA-API runtime on system, \ you unlikely to have hardware encoding. \ Please install VA-API runtime for your distribution \ - and make sure it works (Manjaro, Fedora).", + and make sure it works (Manjaro, Fedora affected). \ + For detailed advice, check wiki: \ + https://github.com/alvr-org/ALVR/wiki/Linux-Troubleshooting#failed-to-create-vaapi-encoder", ); } } @@ -231,31 +297,28 @@ fn probe_libva_encoder_profile( let profile_probe = libva_display.query_config_entrypoints(profile_type); let mut message = String::new(); if profile_probe.is_err() { - message = format!( - "Couldn't find {} profile. You unlikely to have hardware encoding for it.", - profile_name - ); + message = format!("Couldn't find {} encoder.", profile_name); } else if let Ok(profile) = profile_probe { if profile.is_empty() { - message = format!( - "{} profile entrypoint is empty. \ - You unlikely to have hardware encoding for it.", - profile_name - ); + message = format!("{} profile entrypoint is empty.", profile_name); } if !profile.contains(&libva::VAEntrypoint::VAEntrypointEncSlice) { message = format!( - "{} profile does not contain encoding entrypoint. \ - You unlikely to have hardware encoding for it.", + "{} profile does not contain encoding entrypoint.", profile_name ); } } if !message.is_empty() { if is_critical { - error!("{}", message); + error!("{} Your gpu may not suport encoding with this.", message); } else { - info!("{}", message); + info!( + "{} + Your gpu may not suport encoding with this. \ + If you're not using this encoder, ignore this message.", + message + ); } } } diff --git a/wiki/Linux-Troubleshooting.md b/wiki/Linux-Troubleshooting.md index 952481b1e3..a013211a26 100644 --- a/wiki/Linux-Troubleshooting.md +++ b/wiki/Linux-Troubleshooting.md @@ -67,6 +67,11 @@ Install at least the required versions of the driver and ensure you have CUDA in If an error saying CUDA was not detected persists, try using the latest alvr nightly release. +## Using ALVR with only integrated graphics + +Beware that using **only** integrated graphics for running ALVR is highly inadvisable as in most cases it will lead to very poor performance (even on more powerful devices like Steam Deck, it's still very slow). +Don't expect things to work perfectly in this case too, as some older integrated graphics simply might not have the best vulkan support and might fail to work at all. + ## Hybrid graphics advices ### General advise @@ -76,18 +81,18 @@ If you're on laptop and it doesn't allow disabling integrated graphics (in most ### Amd/Intel integrated gpu + Amd/Intel discrete gpu -Put `DRI_PRIME=1 %command%` into SteamVR's commandline options and in those of all VR games you intend to play with ALVR. +Put `DRI_PRIME=1 ~/.local/share/Steam/steamapps/common/SteamVR/bin/vrmonitor.sh %command%` (adjust vrmonitor path to your distro) into SteamVR's commandline options and in those of all VR games you intend to play with ALVR. ### Amd/Intel integrated gpu + Nvidia discrete gpu -Put `__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia %command%` into SteamVR's commandline options and in those of all VR games you intend to play with ALVR. +Put `__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia ~/.local/share/Steam/steamapps/common/SteamVR/bin/vrmonitor.sh %command%` (adjust vrmonitor path to your distro) into SteamVR's commandline options and in those of all VR games you intend to play with ALVR. ### SteamVR Dashboard not rendering in VR on Nvidia discrete GPU If you encounter issues with the SteamVR dashboard not rendering in VR you may need to run the entire steam client itself via PRIME render offload. First close the steam client completey if you have it open already, you can do so by clicking the Steam dropdown in the top left and choosing exit. Then from a terminal run: `__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia steam-runtime` ## Wayland -When using old Gnome (< 47 version) under Wayland you might need to put `WAYLAND_DISPLAY='' %command%` into the SteamVR commandline options to force XWayland on SteamVR. This fixes issue with drm leasing not being available. +When using old Gnome (< 47 version) under Wayland you might need to put `WAYLAND_DISPLAY='' ~/.local/share/Steam/steamapps/common/SteamVR/bin/vrmonitor.sh %command%` (adjust vrmonitor path to your distro) into the SteamVR commandline options to force XWayland on SteamVR. This fixes issue with drm leasing not being available. ## The view shakes From 271476c29610ab5ba6491ccb31b7098e9aa54779 Mon Sep 17 00:00:00 2001 From: Meister1593 Date: Sun, 19 Jan 2025 03:01:45 +0400 Subject: [PATCH 2/7] light refactor in passing adapter/vendor tuple --- .../src/steamvr_launcher/linux_steamvr.rs | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs index a5c1675982..0535640e4f 100644 --- a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs +++ b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs @@ -77,21 +77,19 @@ pub fn linux_hardware_checks() { adapter.get_info().device_type == wgpu::DeviceType::DiscreteGpu || adapter.get_info().device_type == wgpu::DeviceType::IntegratedGpu }) - .map(|adapter| match adapter.get_info().vendor { - 0x10de => (adapter, DeviceInfo::Nvidia), - 0x1002 => ( - adapter, - DeviceInfo::Amd { + .map(|adapter| { + let vendor = match adapter.get_info().vendor { + 0x10de => DeviceInfo::Nvidia, + 0x1002 => DeviceInfo::Amd { device_type: adapter.get_info().device_type, }, - ), - 0x8086 => ( - adapter, - DeviceInfo::Intel { + + 0x8086 => DeviceInfo::Intel { device_type: adapter.get_info().device_type, }, - ), - _ => (adapter, DeviceInfo::Unknown), + _ => DeviceInfo::Unknown, + }; + (adapter, vendor) }) .collect::>(); linux_gpu_checks(&device_infos); From b70874db9c4e8145c33eb59c5a1f08d0acb0966d Mon Sep 17 00:00:00 2001 From: Meister1593 Date: Sun, 19 Jan 2025 03:47:48 +0400 Subject: [PATCH 3/7] compile fixes --- .../src/steamvr_launcher/linux_steamvr.rs | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs index 0535640e4f..131efce627 100644 --- a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs +++ b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs @@ -1,5 +1,4 @@ use std::fs; -use std::path::PathBuf; use std::{env, process::Command}; use alvr_common::anyhow::bail; @@ -151,10 +150,14 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { }); debug!("have_intel_dgpu: {}", have_intel_dgpu); - let vrmonitor_path = alvr_server_io::steamvr_root_dir()? + let vrmonitor_path_string = alvr_server_io::steamvr_root_dir() + .unwrap() .join("bin") - .join("vrmonitor.sh"); - debug!("vrmonitor_path: {}", vrmonitor_path); + .join("vrmonitor.sh") + .into_os_string() + .into_string() + .unwrap(); + debug!("vrmonitor_path: {}", vrmonitor_path_string); let mut vrmonitor_path_written = false; if have_igpu { @@ -163,7 +166,7 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { "For functioning VR you need to put following line into SteamVR commandline options and restart it:" ); warn!("__GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only \ - VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json {} %command%", vrmonitor_path); + VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json {} %command%", vrmonitor_path_string); warn!("And similar commandline to ALL games commandline option you're trying to launch from steam: \ __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json %command%"); vrmonitor_path_written = true; @@ -171,7 +174,7 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { warn!( "For functioning VR you need to put following line into SteamVR commandline options and restart it:" ); - warn!("DRI_PRIME=1 {} %command%", vrmonitor_path); + warn!("DRI_PRIME=1 {} %command%", vrmonitor_path_string); warn!("And similar commandline to ALL games commandline options you're trying to launch from stean:"); warn!("DRI_PRIME=1 %command%"); vrmonitor_path_written = true; @@ -183,14 +186,14 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { if !vrmonitor_path_written { warn!( "Make sure you have set following line in your SteamVR commandline options and restart it: {} %command%", - vrmonitor_path + vrmonitor_path_string ) } } -fn linux_encoder_checks(device_infos: &[DeviceInfo]) { +fn linux_encoder_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { for device_info in device_infos { - match device_info { + match device_info.1 { DeviceInfo::Nvidia => { match nvml_wrapper::Nvml::init() { Ok(nvml) => { From ae53267a9d7321c3c2e37999fd23ea2b1a066d1f Mon Sep 17 00:00:00 2001 From: Meister1593 Date: Sun, 19 Jan 2025 03:48:54 +0400 Subject: [PATCH 4/7] Fix format --- alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs index 131efce627..b254c4d60c 100644 --- a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs +++ b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs @@ -82,12 +82,12 @@ pub fn linux_hardware_checks() { 0x1002 => DeviceInfo::Amd { device_type: adapter.get_info().device_type, }, - 0x8086 => DeviceInfo::Intel { device_type: adapter.get_info().device_type, }, _ => DeviceInfo::Unknown, }; + (adapter, vendor) }) .collect::>(); From 722780b18aee74a38a24ea9c61c56563dfb2e4ca Mon Sep 17 00:00:00 2001 From: Meister1593 Date: Sun, 19 Jan 2025 04:03:51 +0400 Subject: [PATCH 5/7] Fix format --- alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs index b254c4d60c..1e39e30dac 100644 --- a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs +++ b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs @@ -87,7 +87,7 @@ pub fn linux_hardware_checks() { }, _ => DeviceInfo::Unknown, }; - + (adapter, vendor) }) .collect::>(); From 38a561214c9206e8846793b09621a468eea5bce6 Mon Sep 17 00:00:00 2001 From: Leonhard Saam Date: Sun, 19 Jan 2025 03:21:10 +0100 Subject: [PATCH 6/7] implement pr suggestions --- .../src/steamvr_launcher/linux_steamvr.rs | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs index 1e39e30dac..5bfa534566 100644 --- a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs +++ b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs @@ -96,21 +96,13 @@ pub fn linux_hardware_checks() { } fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { - let have_igpu = device_infos.iter().any(|gpu| { + let have_intel_igpu = device_infos.iter().any(|gpu| { gpu.1 - == DeviceInfo::Amd { + == DeviceInfo::Intel { device_type: wgpu::DeviceType::IntegratedGpu, } - || gpu.1 - == DeviceInfo::Intel { - device_type: wgpu::DeviceType::IntegratedGpu, - } }); - debug!("have_igpu: {}", have_igpu); - - let have_nvidia_dgpu = device_infos.iter().any(|gpu| gpu.1 == DeviceInfo::Nvidia); - debug!("have_nvidia_dgpu: {}", have_nvidia_dgpu); - + debug!("have_intel_igpu: {}", have_intel_igpu); let have_amd_igpu = device_infos.iter().any(|gpu| { gpu.1 == DeviceInfo::Amd { @@ -119,6 +111,12 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { }); debug!("have_amd_igpu: {}", have_amd_igpu); + let have_igpu = have_intel_igpu || have_amd_igpu; + debug!("have_igpu: {}", have_igpu); + + let have_nvidia_dgpu = device_infos.iter().any(|gpu| gpu.1 == DeviceInfo::Nvidia); + debug!("have_nvidia_dgpu: {}", have_nvidia_dgpu); + let have_amd_dgpu = device_infos.iter().any(|gpu| { gpu.1 == DeviceInfo::Amd { @@ -138,7 +136,8 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { if is_any_amd_driver_invalid { error!("Amdvlk or amdgpu-pro vulkan drivers detected, SteamVR may not function properly. \ Please remove them or make them unavailable for SteamVR and games you're trying to launch. \ - For more detailed info visit wiki: https://github.com/alvr-org/ALVR/wiki/Linux-Troubleshooting#artifacting-no-steamvr-overlay-or-graphical-glitches-in-streaming-view") + For more detailed info visit wiki: \ + https://github.com/alvr-org/ALVR/wiki/Linux-Troubleshooting#artifacting-no-steamvr-overlay-or-graphical-glitches-in-streaming-view") } } @@ -162,19 +161,22 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { let mut vrmonitor_path_written = false; if have_igpu { if have_nvidia_dgpu { + let nv_options = "__GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only \ + VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json"; + warn!( - "For functioning VR you need to put following line into SteamVR commandline options and restart it:" + "For functioning VR you need to put the following line into SteamVR commandline options and restart it:" ); - warn!("__GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only \ - VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json {} %command%", vrmonitor_path_string); + warn!("{nv_options} {vrmonitor_path_string} %command%"); warn!("And similar commandline to ALL games commandline option you're trying to launch from steam: \ - __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json %command%"); + {nv_options} %command%"); + vrmonitor_path_written = true; } else if have_intel_dgpu || have_amd_dgpu { warn!( - "For functioning VR you need to put following line into SteamVR commandline options and restart it:" + "For functioning VR you need to put the following line into SteamVR commandline options and restart it:" ); - warn!("DRI_PRIME=1 {} %command%", vrmonitor_path_string); + warn!("DRI_PRIME=1 {vrmonitor_path_string} %command%"); warn!("And similar commandline to ALL games commandline options you're trying to launch from stean:"); warn!("DRI_PRIME=1 %command%"); vrmonitor_path_written = true; @@ -185,8 +187,7 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { } if !vrmonitor_path_written { warn!( - "Make sure you have set following line in your SteamVR commandline options and restart it: {} %command%", - vrmonitor_path_string + "Make sure you have put the following line in your SteamVR commandline options and restart it: {vrmonitor_path_string} %command%" ) } } From 7048a82e2ad18a0fd24b6a5be4f0fe37e9d00fdc Mon Sep 17 00:00:00 2001 From: Leonhard Saam Date: Sun, 19 Jan 2025 03:37:07 +0100 Subject: [PATCH 7/7] further improve printed messages --- .../src/steamvr_launcher/linux_steamvr.rs | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs index 5bfa534566..0cef3bfbf0 100644 --- a/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs +++ b/alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs @@ -135,8 +135,8 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { }); if is_any_amd_driver_invalid { error!("Amdvlk or amdgpu-pro vulkan drivers detected, SteamVR may not function properly. \ - Please remove them or make them unavailable for SteamVR and games you're trying to launch. \ - For more detailed info visit wiki: \ + Please remove them or make them unavailable for SteamVR and games you're trying to launch.\n\ + For more detailed info visit the wiki: \ https://github.com/alvr-org/ALVR/wiki/Linux-Troubleshooting#artifacting-no-steamvr-overlay-or-graphical-glitches-in-streaming-view") } } @@ -158,27 +158,22 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { .unwrap(); debug!("vrmonitor_path: {}", vrmonitor_path_string); + let steamvr_opts = "For functioning VR you need to put the following line into SteamVR's launch options and restart it:"; + let game_opts = "And this similar line to the launch options of ALL games that you're trying to launch from steam:"; + let mut vrmonitor_path_written = false; if have_igpu { if have_nvidia_dgpu { let nv_options = "__GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only \ VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json"; - warn!( - "For functioning VR you need to put the following line into SteamVR commandline options and restart it:" - ); - warn!("{nv_options} {vrmonitor_path_string} %command%"); - warn!("And similar commandline to ALL games commandline option you're trying to launch from steam: \ - {nv_options} %command%"); + warn!("{steamvr_opts}\n{nv_options} {vrmonitor_path_string} %command%"); + warn!("{game_opts}\n{nv_options} %command%"); vrmonitor_path_written = true; } else if have_intel_dgpu || have_amd_dgpu { - warn!( - "For functioning VR you need to put the following line into SteamVR commandline options and restart it:" - ); - warn!("DRI_PRIME=1 {vrmonitor_path_string} %command%"); - warn!("And similar commandline to ALL games commandline options you're trying to launch from stean:"); - warn!("DRI_PRIME=1 %command%"); + warn!("{steamvr_opts}\nDRI_PRIME=1 {vrmonitor_path_string} %command%"); + warn!("{game_opts}\nDRI_PRIME=1 %command%"); vrmonitor_path_written = true; } else { warn!("Beware, using just integrated graphics might lead to very poor performance in SteamVR and VR games."); @@ -187,7 +182,8 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) { } if !vrmonitor_path_written { warn!( - "Make sure you have put the following line in your SteamVR commandline options and restart it: {vrmonitor_path_string} %command%" + "Make sure you have put the following line in your SteamVR launch options and restart it:\n\ + {vrmonitor_path_string} %command%" ) } }