display-library icon indicating copy to clipboard operation
display-library copied to clipboard

Radeon VII: temperature and fan state not supported

Open kinred opened this issue 6 years ago • 3 comments

With a Radeon VII GPU both :

ADL2_OverdriveN_Temperature_Get(...)

and

ADL2_OverdriveN_FanControl_Get(...)

return errorcode -8

Tested with Windows Adrenalin driver version 19.2.2.

All other Vega and Polaris based GPUs work fine.

kinred avatar Feb 15 '19 17:02 kinred

@kinred Did you find solution?

sergioberg avatar Jun 11 '19 18:06 sergioberg

Any update or workaround for this? Does anyone know how to get temperature or a list of temperatures of Radeon VII programmatically?

Grumpy-Dwarf avatar May 08 '20 12:05 Grumpy-Dwarf

	if (ADL_OK != ADL2_Main_Control_Create(ADL_Main_Memory_Alloc, 1, &context))
	{
		return -1002;
	}

	// Obtain the number of adapters for the system
	if (ADL_OK != ADL2_Adapter_NumberOfAdapters_Get(context, &iNumberAdapters))
	{
		return -1003;
	}

	if (0 < iNumberAdapters)
	{
		lpAdapterInfo = (LPAdapterInfo)malloc(sizeof(AdapterInfo) * iNumberAdapters);
		memset(lpAdapterInfo, '\0', sizeof(AdapterInfo) * iNumberAdapters);

		// Get the AdapterInfo structure for all adapters in the system
		ADL2_Adapter_AdapterInfo_Get(context, lpAdapterInfo, sizeof(AdapterInfo) * iNumberAdapters);
	}

	for (int i = 0; i < iNumberAdapters; i++)
	{
		int adapterActive = 0;
		AdapterInfo adapterInfo = lpAdapterInfo[i];
		ADL2_Adapter_Active_Get(context, adapterInfo.iAdapterIndex, &adapterActive);
		if (adapterActive && adapterInfo.iVendorID == AMDVENDORID)
		{
			adapterId = adapterInfo.iAdapterIndex;
			break;
		}
	}

	if (-1 == adapterId)
	{
		return -1004; //Cannot find active AMD adapter
	}

.......

	if (ADL_OK != ADL2_Overdrive_Caps(context, adapterId, &iOverdriveSupported, &iOverdriveEnabled, &iOverdriveVersion))
	{
		return -1005; //Can’t get Overdrive capabilities
	}

....... if (iOverdriveVersion == 8) { ADLPMLogDataOutput odlpDataOutput; memset(&odlpDataOutput, 0, sizeof(ADLPMLogDataOutput)); int error3 = ADL2_New_QueryPMLogData_Get(context, adapterId, &odlpDataOutput); if (ADL_OK != error3) { return error3; } if (odlpDataOutput.sensors[PMLOG_TEMPERATURE_EDGE].supported == 1) { return odlpDataOutput.sensors[PMLOG_TEMPERATURE_EDGE].value; } else { return -800; } } .........

sergioberg avatar May 08 '20 12:05 sergioberg