From a26bcec80657144880bdf4e3556fe78e88ccfc4d Mon Sep 17 00:00:00 2001 From: Ilya Zlobintsev Date: Sat, 16 Nov 2024 14:49:21 +0200 Subject: [PATCH] feat: show error when NVML is not loaded while the nvidia driver is present --- lact-gui/src/app.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lact-gui/src/app.rs b/lact-gui/src/app.rs index 7d667ff..fe65286 100644 --- a/lact-gui/src/app.rs +++ b/lact-gui/src/app.rs @@ -391,6 +391,11 @@ impl AppModel { .context("Could not fetch info")?; let info = Rc::new(info_buf.inner()?); + // Plain `nvidia` means that the nvidia driver is loaded, but it does not contain a version fetched from NVML + if info.driver == "nvidia" { + sender.input(AppMsg::Error(Rc::new(anyhow!("Nvidia driver detected, but the management library could not be loaded. Check lact service status for more information.")))); + } + self.info_page.emit(PageUpdate::Info(info.clone())); self.oc_page.set_info(&info);