From fe3398f197ef37c34f3fcfdd64a1ec1fa0ecc2d2 Mon Sep 17 00:00:00 2001 From: jsteube Date: Tue, 22 Nov 2016 16:45:11 +0100 Subject: [PATCH] Check both fanpolicy and fanspeed rc and disable retain support of any of them failed --- src/hwmon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hwmon.c b/src/hwmon.c index f16340c58..41cc650e6 100644 --- a/src/hwmon.c +++ b/src/hwmon.c @@ -4180,6 +4180,8 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) if (hwmon_ctx->hm_sysfs) { hm_set_fanctrl_with_device_id_sysfs (hashcat_ctx, device_id, 1); + + hm_set_fanspeed_with_device_id_sysfs (hashcat_ctx, device_id, fanspeed); } } else if (device_param->device_vendor_id == VENDOR_ID_NV) @@ -4187,6 +4189,8 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) if (hwmon_ctx->hm_xnvctrl) { hm_set_fanctrl_with_device_id_xnvctrl (hashcat_ctx, device_id, NV_CTRL_GPU_COOLER_MANUAL_CONTROL_TRUE); + + hm_set_fanspeed_with_device_id_xnvctrl (hashcat_ctx, device_id, fanspeed); } if (hwmon_ctx->hm_nvapi) @@ -4195,7 +4199,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) } } - if (hwmon_ctx->hm_device[device_id].fanspeed_set_supported == true) one_success = true; + if ((hwmon_ctx->hm_device[device_id].fanpolicy_set_supported == true) && (hwmon_ctx->hm_device[device_id].fanspeed_set_supported == true)) one_success = true; } if (one_success == false) user_options->gpu_temp_retain = 0;