From 6ff51e1070274c3e82b8a1908f37d78f1fc7a190 Mon Sep 17 00:00:00 2001 From: epixoip Date: Sat, 24 Apr 2021 22:17:05 -0500 Subject: [PATCH] Workaround for NVML and WSL2 shim --- src/hwmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hwmon.c b/src/hwmon.c index 824aa767b..3289a6793 100644 --- a/src/hwmon.c +++ b/src/hwmon.c @@ -566,7 +566,7 @@ static int hm_NVML_nvmlInit (hashcat_ctx_t *hashcat_ctx) const nvmlReturn_t nvml_rc = (nvmlReturn_t) nvml->nvmlInit (); - if (nvml_rc != NVML_SUCCESS) + if (nvml_rc != NVML_SUCCESS && nvml_rc != NVML_ERROR_DRIVER_NOT_LOADED) { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); @@ -586,7 +586,7 @@ static int hm_NVML_nvmlShutdown (hashcat_ctx_t *hashcat_ctx) const nvmlReturn_t nvml_rc = (nvmlReturn_t) nvml->nvmlShutdown (); - if (nvml_rc != NVML_SUCCESS) + if (nvml_rc != NVML_SUCCESS && nvml_rc != NVML_ERROR_DRIVER_NOT_LOADED) { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); @@ -606,7 +606,7 @@ static int hm_NVML_nvmlDeviceGetCount (hashcat_ctx_t *hashcat_ctx, unsigned int const nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetCount (deviceCount); - if (nvml_rc != NVML_SUCCESS) + if (nvml_rc != NVML_SUCCESS && nvml_rc != NVML_ERROR_DRIVER_NOT_LOADED) { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc);