From da76ac97f883362a09115884b823a1f9678eb2ef Mon Sep 17 00:00:00 2001 From: jsteube Date: Mon, 21 Nov 2016 16:49:59 +0100 Subject: [PATCH] Improve --gpu-temp-retain support detection --- src/hwmon.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hwmon.c b/src/hwmon.c index 0e7d5d99b..cd9150ff8 100644 --- a/src/hwmon.c +++ b/src/hwmon.c @@ -3988,6 +3988,8 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) if (user_options->gpu_temp_retain > 0) { + bool one_success = false; + for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) { hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; @@ -4027,7 +4029,11 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) hm_set_fanspeed_with_device_id_nvapi (hashcat_ctx, device_id, fanspeed, 1); } } + + if (hwmon_ctx->hm_device[device_id].fanspeed_set_supported == true) one_success = true; } + + if (one_success == false) user_options->gpu_temp_retain = 0; } return 0;