Ubuntu 22.04 Server + GUI desktop
CUDA 12.1
Running ncu-ui I get this error when profiling:
Error: ERR_NVGPUCTRPERM - The user does not have permission to access NVIDIA GPU Performance Counters on the target device. For instructions on enabling permissions and to get more information see **https://developer.nvidia.com/ERR_NVGPUCTRPERM**,,,,,,
The two suggestions on the linked page were to run with elevated privileges or enable access permanently.
- Run with elevated privileges:
…Trying sudo
sscott@demo:~$ sudo ncu-ui
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Cannot mix incompatible Qt library (5.15.3) with this library (5.15.2)
scott@demo:~$ sudo -E ncu-ui
QStandardPaths: runtime directory '/run/user/1001' is not owned by UID 0, but a directory permissions 0700 owned by UID 1001 GID 1001
QStandardPaths: runtime directory '/run/user/1001' is not owned by UID 0, but a directory permissions 0700 owned by UID 1001 GID 1001
QStandardPaths: runtime directory '/run/user/1001' is not owned by UID 0, but a directory permissions 0700 owned by UID 1001 GID 1001
Cannot mix incompatible Qt library (5.15.3) with this library (5.15.2)
…Trying setcap on executable
sscott@demo:~/esat-rx$ sudo setcap 'cap_sys_admin=+ep' /opt/nvidia/nsight-compute/2023.1.0/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin
[sudo] password for sscott:
sscott@demo:~/esat-rx$ getcap /opt/nvidia/nsight-compute/2023.1.0/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin
/opt/nvidia/nsight-compute/2023.1.0/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin cap_sys_admin=ep
sscott@demo:~/esat-rx$ ncu-ui
/opt/nvidia/nsight-compute/2023.1.0/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin: error while loading shared libraries: libAppLib.so: cannot open shared object file: No such file or directory
- Enable access permanently
sscott@demo:~/esat-rx$ cat /etc/modprobe.d/nvidia-profiling.conf
options nvidia "NVreg_RestrictProfilingToAdminUsers=0"
and rebooted
same error: ERR_NVGPUCTRPERM
How do I get this to work?