diff --git a/src/affinity.c b/src/affinity.c index edd62e86b..d0163a95c 100644 --- a/src/affinity.c +++ b/src/affinity.c @@ -41,6 +41,7 @@ static int pthread_setaffinity_np (pthread_t thread, size_t cpu_size, cpu_set_t #endif #if defined (__FreeBSD__) +#include typedef cpuset_t cpu_set_t; #endif diff --git a/src/folder.c b/src/folder.c index 6b2b636d1..d7d504baa 100644 --- a/src/folder.c +++ b/src/folder.c @@ -50,6 +50,8 @@ static int get_exec_path (char *exec_path, const size_t exec_path_sz) #elif defined (__FreeBSD__) + #include + int mib[4]; mib[0] = CTL_KERN; diff --git a/src/hwmon.c b/src/hwmon.c index 41cc650e6..a4eb9bd31 100644 --- a/src/hwmon.c +++ b/src/hwmon.c @@ -1358,7 +1358,14 @@ static int hm_XNVCTRL_get_fan_control (hashcat_ctx_t *hashcat_ctx, const int gpu if (rc == false) { - event_log_error (hashcat_ctx, "XNVCTRLQueryTargetAttribute(NV_CTRL_GPU_COOLER_MANUAL_CONTROL) failed"); + event_log_error (hashcat_ctx, "XNVCTRLQueryTargetAttribute() failed"); + + // help the user to fix the problem + + event_log_warning (hashcat_ctx, "This error typically occurs when you did not setup NVidia Coolbits."); + event_log_warning (hashcat_ctx, "Run the following command to fix: sudo nvidia-xconfig --cool-bits=12"); + event_log_warning (hashcat_ctx, "Do not forget to restart X afterwards."); + event_log_warning (hashcat_ctx, ""); return -1; } @@ -2837,6 +2844,7 @@ int hm_get_fanpolicy_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 devic if (hm_ADL_Overdrive5_FanSpeed_Get (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, 0, &lpFanSpeedValue) == -1) { hwmon_ctx->hm_device[device_id].fanpolicy_get_supported = false; + hwmon_ctx->hm_device[device_id].fanspeed_get_supported = false; return -1; } @@ -2861,6 +2869,7 @@ int hm_get_fanpolicy_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 devic } hwmon_ctx->hm_device[device_id].fanpolicy_get_supported = false; + hwmon_ctx->hm_device[device_id].fanspeed_get_supported = false; return -1; } @@ -3415,7 +3424,7 @@ int hm_set_fanspeed_with_device_id_xnvctrl (hashcat_ctx_t *hashcat_ctx, const u3 if (hwmon_ctx->enabled == false) return -1; - if (hwmon_ctx->hm_device[device_id].fanspeed_set_supported == false) return -1; + if (hwmon_ctx->hm_device[device_id].fanspeed_set_supported == false) return -1; if (hwmon_ctx->hm_xnvctrl) { @@ -3472,6 +3481,7 @@ static int hm_set_fanctrl_with_device_id_xnvctrl (hashcat_ctx_t *hashcat_ctx, co if (hm_XNVCTRL_set_fan_control (hashcat_ctx, hwmon_ctx->hm_device[device_id].xnvctrl, val) == -1) { hwmon_ctx->hm_device[device_id].fanpolicy_set_supported = false; + hwmon_ctx->hm_device[device_id].fanspeed_set_supported = false; return -1; } @@ -3480,6 +3490,7 @@ static int hm_set_fanctrl_with_device_id_xnvctrl (hashcat_ctx_t *hashcat_ctx, co } hwmon_ctx->hm_device[device_id].fanpolicy_set_supported = false; + hwmon_ctx->hm_device[device_id].fanspeed_set_supported = false; return -1; } @@ -3497,6 +3508,7 @@ static int hm_set_fanctrl_with_device_id_sysfs (hashcat_ctx_t *hashcat_ctx, cons if (hm_SYSFS_set_fan_control (hashcat_ctx, device_id, val) == -1) { hwmon_ctx->hm_device[device_id].fanpolicy_set_supported = false; + hwmon_ctx->hm_device[device_id].fanspeed_set_supported = false; return -1; } @@ -3505,6 +3517,7 @@ static int hm_set_fanctrl_with_device_id_sysfs (hashcat_ctx_t *hashcat_ctx, cons } hwmon_ctx->hm_device[device_id].fanpolicy_set_supported = false; + hwmon_ctx->hm_device[device_id].fanspeed_set_supported = false; return -1; } diff --git a/src/monitor.c b/src/monitor.c index 5405b03e5..4520b5b74 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -61,7 +61,7 @@ static int monitor (hashcat_ctx_t *hashcat_ctx) const int sleep_time = 1; const int temp_threshold = 1; // degrees celcius - const int fan_speed_min = 20; // in percentage + const int fan_speed_min = 33; // in percentage const int fan_speed_max = 100; const float exec_low = 50.0f; // in ms const float util_low = 90.0f; // in percent