From 78122fd3e25000da48fad8e60ac3ab9efe8076d9 Mon Sep 17 00:00:00 2001 From: jkre Date: Tue, 26 Dec 2023 23:59:28 +0100 Subject: [PATCH] Remove old implementation of loading libnvidia-ml.so. This update addresses the issue where a false negative return occurs if libnvidia-ml is not found before checking for alternative library names. --- src/linux/btop_collect.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index c39e964..3ba76a6 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -948,13 +948,6 @@ namespace Gpu { bool init() { if (initialized) return false; - //? Dynamic loading & linking - nvml_dl_handle = dlopen("libnvidia-ml.so", RTLD_LAZY); - if (!nvml_dl_handle) { - Logger::info(std::string("Failed to load libnvidia-ml.so, NVIDIA GPUs will not be detected: ") + dlerror()); - return false; - } - //? Try possible library names for libnvidia-ml.so const array libNvAlts = { "libnvidia-ml.so",