[GH-ISSUE #784] ADL temperature not always working #408

Closed
opened 2026-10-14 03:05:43 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @magnumripper on GitHub (Oct 3, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/784

This beats me. 😎

We manage to show temperature and fan speed of most AMD devices. But not on Bull, Well or Super.

It's NOT a problem with their drivers or something like that because on the very same hosts, od6fan works just fine. And it's almost exactly the exact same code, down to the misspelled variable names (legacy from ADL samples)!!

diff --git a/src/common-gpu.c b/src/common-gpu.c
index e259ac2..268f926 100644
--- a/src/common-gpu.c
+++ b/src/common-gpu.c
@@ -298,6 +298,7 @@ static void get_temp_od5(int adl_id, int *temp, int *fanspeed, int *util)
        for (iThermalControllerIndex = 0; iThermalControllerIndex < 10; iThermalControllerIndex++) {
                ADL_Err = ADL_Overdrive5_ThermalDevices_Enum(adl_id, iThermalControllerIndex, &terma

+               printf("adl_id %d idx %d ADL_Err %d\n", adl_id, iThermalControllerIndex, ADL_Err);
                if (ADL_Err == ADL_WARNING_NO_DATA)
                        break;

With the above debug print, od6fan prints this:

adl_id 0 idx 0 ADL_Err 0
Thermal controller id: 0
Current temperature: 42°C
Current fan speed: 20%
Fan speed range: 0 - 100%
adl_id 0 idx 1 ADL_Err -100

...while JtR prints this:

adl_id 0 idx 0 ADL_Err -5
adl_id 0 idx 1 ADL_Err -5
adl_id 0 idx 2 ADL_Err -5
adl_id 0 idx 3 ADL_Err -5
adl_id 0 idx 4 ADL_Err -5
adl_id 0 idx 5 ADL_Err -5
adl_id 0 idx 6 ADL_Err -5
adl_id 0 idx 7 ADL_Err -5
adl_id 0 idx 8 ADL_Err -5
adl_id 0 idx 9 ADL_Err -5

-5 is "ADL_ERR_INVALID_ADL_IDX". The only thing I can think of is we miss some required function call before this code. But I can't find what that would be. And why does it work on most other systems as-is?

Originally created by @magnumripper on GitHub (Oct 3, 2014). Original GitHub issue: https://github.com/openwall/john/issues/784 ~~This beats me.~~ :sunglasses: We manage to show temperature and fan speed of most AMD devices. But not on Bull, Well or Super. It's NOT a problem with their drivers or something like that because on the very same hosts, [od6fan](https://github.com/magnumripper/od6fan) works just fine. And _it's almost exactly the exact same code_, down to the misspelled variable names (legacy from ADL samples)!! ``` diff --git a/src/common-gpu.c b/src/common-gpu.c index e259ac2..268f926 100644 --- a/src/common-gpu.c +++ b/src/common-gpu.c @@ -298,6 +298,7 @@ static void get_temp_od5(int adl_id, int *temp, int *fanspeed, int *util) for (iThermalControllerIndex = 0; iThermalControllerIndex < 10; iThermalControllerIndex++) { ADL_Err = ADL_Overdrive5_ThermalDevices_Enum(adl_id, iThermalControllerIndex, &terma + printf("adl_id %d idx %d ADL_Err %d\n", adl_id, iThermalControllerIndex, ADL_Err); if (ADL_Err == ADL_WARNING_NO_DATA) break; ``` With the above debug print, od6fan prints this: ``` adl_id 0 idx 0 ADL_Err 0 Thermal controller id: 0 Current temperature: 42°C Current fan speed: 20% Fan speed range: 0 - 100% adl_id 0 idx 1 ADL_Err -100 ``` ...while JtR prints this: ``` adl_id 0 idx 0 ADL_Err -5 adl_id 0 idx 1 ADL_Err -5 adl_id 0 idx 2 ADL_Err -5 adl_id 0 idx 3 ADL_Err -5 adl_id 0 idx 4 ADL_Err -5 adl_id 0 idx 5 ADL_Err -5 adl_id 0 idx 6 ADL_Err -5 adl_id 0 idx 7 ADL_Err -5 adl_id 0 idx 8 ADL_Err -5 adl_id 0 idx 9 ADL_Err -5 ``` -5 is "ADL_ERR_INVALID_ADL_IDX". The only thing I can think of is we miss some required function call before this code. But I can't find what that would be. And why does it work on most other systems as-is?
bsakaguchi 2026-10-14 03:05:43 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@magnumripper commented on GitHub (Oct 3, 2014):

Stupid fix. I believe this was actually an ADL bug and we worked around it.

<!-- gh-comment-id:57863868 --> @magnumripper commented on GitHub (Oct 3, 2014): Stupid fix. I believe this was actually an ADL bug and we worked around it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#408
No description provided.