Hi, I have not found a nvml developer forum to post this question - so I put it in here. Maybe someone can point me to the correct forum for nvml issues?
I try to change core & memory clock of a 3060 gpu. That works very well under windows. Compiling the same code for linux (WSL! - Ubuntu 18.04) I run into some strange issues.
I use:
GeForce Driver-Ver: 532.03
NVML-Version: 12.530.51.01
This is the version information of Windows - maybe it is related to the different nvml version?
GeForce Driver-Ver: 532.03
NVML-Ver: 12.532.03
Here is the code I use to lock core & memory clock and my function to print some details from the returned error code.:
nvmlReturn_t l_nvmlResult = nvmlDeviceSetMemoryLockedClocks( l_pDeviceCuda->nvmlDevice, 810, 810 );
_CheckNvmlReturn( l_nvmlResult, "nvmlOcLockMemClock") );
l_nvmlResult = nvmlDeviceSetApplicationsClocks( l_pDeviceCuda->nvmlDevice, 1550, 810 );
_CheckNvmlReturn( l_nvmlResult, "nvmlDeviceSetApplicationsClocks") );
Error reporting:
nvmlReturn_t IDynLibNvml::_CheckNvmlReturn( nvmlReturn_t p_nvmlError, const char* p_strFunction )
{
if( NVML_SUCCESS != p_nvmlError )
{
CLightDynString l_strNvmlError;
_GetNvmlErrorString( p_nvmlError, l_strNvmlError );
l_strNvmlError.AppendFormat( " - function: %s", p_strFunction );
DebugString( (const char*)l_strNvmlError );
if( NVML_ERROR_NO_PERMISSION == p_nvmlError )
{
DebugInt( getuid() );
DebugInt( geteuid() );
}
}
return p_nvmlError;
}
Resulting output:
Insufficient Permissions (4) - function: nvmlOcLockMemClock
getuid() = 0
geteuid() = 0Not Supported (3) - function: nvmlDeviceSetApplicationsClocks
I run the application with sudo ./AppName since the functions need admin/root permission. Strang thing is that the call to the memory clock lock returns NVML_ERROR_NO_PERMISSION which seems to indicvate that the permission level is not correct. I then call getuid and geteuid to verify the permissions and both return 0. So I have no idea what goes wrong here or what I’m missing? Maybe anyone knows whats going on?
The seconds call uses nvmlDeviceSetApplicationsClocks which should be supported by the 3060. The docs says:
For Kepler or newer non-GeForce fully supported devices and Maxwell or newer GeForce devices. Requires root/admin permissions.
But the return code from the call (NVML_ERROR_NOT_SUPPORTED) indicates that this function is not supported? This is the same under Windows and Linux - it is never supported.
Locking the clocks under windows with admin rights works very well - no issues there - just on linux (Ubuntu 18.04)
Anyone with any idea what I’m doing wrong here?
Thanks a lot.