From 26a427b7c70a07ba7d0075f2556a57de6bd2f257 Mon Sep 17 00:00:00 2001 From: nokyan Date: Sat, 4 Jan 2025 15:12:42 +0100 Subject: [PATCH] Add warning for NVIDIA driver mismatches when using Flatpak --- src/utils/gpu/nvidia.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/gpu/nvidia.rs b/src/utils/gpu/nvidia.rs index b40aa26..65cbe82 100644 --- a/src/utils/gpu/nvidia.rs +++ b/src/utils/gpu/nvidia.rs @@ -14,6 +14,11 @@ static NVML: LazyLock> = LazyLock::new(|| { if let Err(error) = nvml.as_ref() { warn!("Connection to NVML failed, reason: {error}"); + if *IS_FLATPAK { + warn!("This can occur when the version of the NVIDIA Flatpak runtime (org.freedesktop.Platform.GL.nvidia) \ + and the version of the natively installed NVIDIA driver do not match. Consider updating both your system \ + and Flatpak packages before opening an issue.") + } } else { debug!("Successfully connected to NVML"); } @@ -21,7 +26,7 @@ static NVML: LazyLock> = LazyLock::new(|| { nvml }); -use crate::utils::pci::Device; +use crate::utils::{pci::Device, IS_FLATPAK}; use super::GpuImpl;