Root user ncu error no permission to access GPU performance counters

Hi, I run ncu command as a root user, but why I still got this error:

==ERROR== ERR_NVGPUCTRPERM - The user does not have permission to access NVIDIA GPU Performance Counters on the target device 0. For instructions on enabling permissions and to get more information see https://developer.nvidia.com/ERR_NVGPUCTRPERM

Any help would be so appreciated!

Hi, @hyaloids

Please check if anything not setting correctly in your ENV: NVIDIA Development Tools Solutions - ERR_NVGPUCTRPERM: Permission issue with Performance Counters | NVIDIA Developer

Also are you running in docker or VM ?

Yes, I am running in docker.

Have you launched the docker with --privileged ?

You need to enable access to performance counters outside of docker, or ensure docker is run as root and retains root’s privileges for the user inside the container. Being “root” in the container alone is meaningless for the sake of allowing access to the performance counters, as these accesses are validates by the kernel module.

Thanks a lot! That’s the matter. I asked the administrator to launch docker with --privileaged which solved the problem.

Thank you so much! It’s really helpful, and I solved the problem with --privileged.