mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-15 20:39:17 +00:00
Better distinguish between ADL and SYSFS when setting fanspeed
This commit is contained in:
parent
34e1ef6370
commit
165a1492b7
@ -181,7 +181,7 @@ static int monitor (hashcat_ctx_t *hashcat_ctx)
|
|||||||
|
|
||||||
if (gpu_temp_retain)
|
if (gpu_temp_retain)
|
||||||
{
|
{
|
||||||
if (hwmon_ctx->hm_device[device_id].fan_set_supported == 1)
|
if (hwmon_ctx->hm_device[device_id].fan_set_supported == true)
|
||||||
{
|
{
|
||||||
int temp_cur = temperature;
|
int temp_cur = temperature;
|
||||||
|
|
||||||
@ -222,10 +222,17 @@ static int monitor (hashcat_ctx_t *hashcat_ctx)
|
|||||||
if ((freely_change_fan_speed == 1) || (fan_speed_must_change == 1))
|
if ((freely_change_fan_speed == 1) || (fan_speed_must_change == 1))
|
||||||
{
|
{
|
||||||
if (device_param->device_vendor_id == VENDOR_ID_AMD)
|
if (device_param->device_vendor_id == VENDOR_ID_AMD)
|
||||||
|
{
|
||||||
|
if (hwmon_ctx->hm_adl)
|
||||||
{
|
{
|
||||||
hm_set_fanspeed_with_device_id_adl (hashcat_ctx, device_id, fan_speed_new, 1);
|
hm_set_fanspeed_with_device_id_adl (hashcat_ctx, device_id, fan_speed_new, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hwmon_ctx->hm_sysfs)
|
||||||
|
{
|
||||||
hm_set_fanspeed_with_device_id_sysfs (hashcat_ctx, device_id, fan_speed_new);
|
hm_set_fanspeed_with_device_id_sysfs (hashcat_ctx, device_id, fan_speed_new);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (device_param->device_vendor_id == VENDOR_ID_NV)
|
else if (device_param->device_vendor_id == VENDOR_ID_NV)
|
||||||
{
|
{
|
||||||
#if defined (_WIN)
|
#if defined (_WIN)
|
||||||
|
Loading…
Reference in New Issue
Block a user