Hi,
I'm attempting to use ADL_Overdrive5_Temperature_Get to read the GPU temperature but it gives me incorrect temperature values, eg 180308.737 degrees! I appreciate any help you could offer.
Is this card/environment supported for this API?
AMD Radeon HD 6700M Series
Windows 7 64 bit (running under Boot Camp on Apple iMac)
My code:
void tryAti() {
int count = 0;
LPAdapterInfo lpAdapterInfo = NULL;
ADL_MAIN_CONTROL_CREATE ADL_Main_Control_Create = NULL;
ADL_MAIN_CONTROL_DESTROY ADL_Main_Control_Destroy = NULL;
ADL_ADAPTER_NUMBEROFADAPTERS_GET ADL_Adapter_NumberOfAdapters_Get = NULL;
ADL_ADAPTER_ADAPTERINFO_GET ADL_Adapter_AdapterInfo_Get = NULL;
ADL_OVERDRIVE5_TEMPERATURE_GET ADL_Overdrive5_Temperature_Get = NULL;
HMODULE hLib = LoadLibrary(L"atiadlxx.dll");
if (!hLib) {
hLib = LoadLibrary(L"atiadlxy.dll");
}
if (hLib) {
ADL_Main_Control_Create = (ADL_MAIN_CONTROL_CREATE) GetProcAddress(hLib,"ADL_Main_Control_Create");
ADL_Main_Control_Destroy = (ADL_MAIN_CONTROL_DESTROY) GetProcAddress(hLib,"ADL_Main_Control_Destroy");
ADL_Adapter_NumberOfAdapters_Get = (ADL_ADAPTER_NUMBEROFADAPTERS_GET) GetProcAddress(hLib,"ADL_Adapter_NumberOfAdapters_Get");
ADL_Adapter_AdapterInfo_Get = (ADL_ADAPTER_ADAPTERINFO_GET) GetProcAddress(hLib,"ADL_Adapter_AdapterInfo_Get");
ADL_Overdrive5_Temperature_Get = (ADL_OVERDRIVE5_TEMPERATURE_GET) GetProcAddress(hLib, "ADL_Overdrive5_Temperature_Get");
if (!(ADL_Main_Control_Create && ADL_Main_Control_Destroy && ADL_Adapter_NumberOfAdapters_Get &&
ADL_Adapter_AdapterInfo_Get && ADL_Overdrive5_Temperature_Get)) {
goto cleanup;
}
if (ADL_OK != ADL_Main_Control_Create(ADL_Main_Memory_Alloc, 1)) goto cleanup;
if (ADL_OK != ADL_Adapter_NumberOfAdapters_Get(&count) && count > 0) goto cleanup;
lpAdapterInfo = (LPAdapterInfo) malloc(sizeof (AdapterInfo) * count);
if (!lpAdapterInfo) goto cleanup;
if (ADL_OK != ADL_Adapter_AdapterInfo_Get (lpAdapterInfo, sizeof (AdapterInfo) * count)) goto cleanup;
for (int i = 0; i < count; i++) {
AdapterInfo info = lpAdapterInfo;
debug(LOG_LEVEL_EXTREME, TEXT("tryAti() found adapter, index = %i, %S, %S, %S"),
info.iAdapterIndex, info.strAdapterName, info.strDisplayName, info.strUDID);
int iAdapterIndex = info.iAdapterIndex;
ADLTemperature temp = {0};
temp.iSize = sizeof(ADLTemperature);
temp.iTemperature = -273;
if (ADL_OK == ADL_Overdrive5_Temperature_Get(iAdapterIndex, 0, &temp)) {
debug(LOG_LEVEL_EXTREME, TEXT("tryAti() temp = %f"), temp.iTemperature / 1000.0);
}
}
}
cleanup:
if (lpAdapterInfo) free(lpAdapterInfo);
if (ADL_Main_Control_Destroy) ADL_Main_Control_Destroy();
if (hLib) FreeLibrary(hLib);
}
The debug method simply writes a formatted string to log file, results in:
tryAti() found adapter, index = 0, AMD Radeon HD 6700M Series, \\.\DISPLAY1, PCI_VEN_1002&DEV_6740&SUBSYS_6740106B&REV_00_4&4DCA75F&0&0008A
tryAti() temp = 184647.937000
tryAti() found adapter, index = 1, AMD Radeon HD 6700M Series, \\.\DISPLAY2, PCI_VEN_1002&DEV_6740&SUBSYS_6740106B&REV_00_4&4DCA75F&0&0008&02A
tryAti() temp = 180308.737000
tryAti() found adapter, index = 2, AMD Radeon HD 6700M Series, \\.\DISPLAY3, PCI_VEN_1002&DEV_6740&SUBSYS_6740106B&REV_00_4&4DCA75F&0&0008&03A
tryAti() temp = 180308.737000
tryAti() found adapter, index = 3, AMD Radeon HD 6700M Series, \\.\DISPLAY4, PCI_VEN_1002&DEV_6740&SUBSYS_6740106B&REV_00_4&4DCA75F&0&0008&04A
tryAti() temp = 180308.737000
tryAti() found adapter, index = 4, AMD Radeon HD 6700M Series, \\.\DISPLAY5, PCI_VEN_1002&DEV_6740&SUBSYS_6740106B&REV_00_4&4DCA75F&0&0008&05A
tryAti() temp = 180308.737000
Open Hardware Monitor (http://openhardwaremonitor.org/) shows the same results for GPU temperature.
GPU-Z (http://www.techpowerup.com/gpuz/) however seems to work, it shows 60 degrees C.
What's GPU-Z accessing to get the correct value?
Hello,
I asked a developer at AMD to review your post above. His reply --
"I can’t think of anything wrong with the code, maybe something wrong with the system setup? If they want, they can send us their program and we can debug from driver side?"
Cheers!
Kristen
Another request --
"Let me know what the user’s board’s internal SKU# is, if possible."
Mac OS X tells me the following about my graphics card:
AMD Radeon HD 6770M:
Chipset Model: AMD Radeon HD 6770M
Type: GPU
Bus: PCIe
PCIe Lane Width: x16
VRAM (Total): 512 MB
Vendor: ATI (0x1002)
Device ID: 0x6740
Revision ID: 0x0000
ROM Revision: 113-C0170C-170
EFI Driver Version: 01.00.544
Thanks again, Kristen.
Hello! Sorry for the tardy response, but here's the reply --
"There is nothing wrong with his tool code. The system he used is an Apple system, which have a special thermal controller that does not support internal temperature reading. We use our tool to change the thermal controller to internal and the temperature can be read correctly.
I would suggest the user not use the tool to read on this system."
Does that make sense?
It does make sense unfortunately
"We use our tool to change the thermal controller to internal" - is this something I can do?
I asked one of our engineers, and this is what I got: "This is not something we allow user to do."
Sorry!
Kristen