mirror of
https://github.com/aristocratos/btop.git
synced 2024-06-26 18:10:32 +12:00
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.
This commit is contained in:
parent
ad14554f32
commit
78122fd3e2
|
@ -948,13 +948,6 @@ namespace Gpu {
|
||||||
bool init() {
|
bool init() {
|
||||||
if (initialized) return false;
|
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
|
//? Try possible library names for libnvidia-ml.so
|
||||||
const array libNvAlts = {
|
const array libNvAlts = {
|
||||||
"libnvidia-ml.so",
|
"libnvidia-ml.so",
|
||||||
|
|
Loading…
Reference in a new issue