Solving Nsight Compute Permission Error
The Permission Error
If you are running into this error message when using Nsight-Compute
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
The Solution
- (sudo required) Create
.conffile (e.g.profile.conf) in folder/etc/modprobe.d - (sudo required) Open file
/etc/modprobe.d/profile.confin any editor - (sudo required) Add below line in profile.conf
options nvidia NVreg_RestrictProfilingToAdminUsers=0, and close file/etc/modprobe.d/profile.conf - (Optional) On some systems (or when using a package manager to install), it may be necessary to rebuild the initrd after writing a configuration file to
/etc/modprobe.d. For RedHat-based distributions, rebuild the initrd withdracut -–regenerate-all -f - (sudo required) Restart your machine
- (Optional) Check that the value is correctly set to 0:
cat /proc/driver/nvidia/params | grep RmProfilingAdminOnly, You should see:RmProfilingAdminOnly: 0