"nvprof" needs to be run as root user for profiling on Jetson


I am trying to profile an application on the Jetson board using nvprof. In the initial attempt nvprof gave that for profiling it should be run as root user. After running it as root user, I am able to get the profile timings.

I wanted to get rid of running nvprof as root user, so I started searching the nvidia forums and blogs. I found that adding a configuration in the “modprobe.d” will solve this problem. So I try to ad it but getting the below errors.

ubuntu@tegratx2:~$ modprobe nvidia NVreg_RestrictProfilingToAdminUsers=0
modprobe: FATAL: Module nvidia not found in directory /lib/modules/4.9.140-tegra

Am I doing anything wrong here? Please help me to correctly set the modprobe conf to remove the root user dependency.


Try below command
modprobe nvgpu NVreg_RestrictProfilingToAdminUsers=0

Hi shaneCCC,

Thanks for the kind reply. Even still with the above command I am not able to profile the application without root privileges.

Can you point me to any documentation that deals with profiling on the NVIDIA boards?

The issue:

==10922== NVPROF is profiling process 10922, command: /home/ubuntu/myApplication.elf
==10922== Warning: Insufficient privileges to start the profiling session. Use root privileges
==10922== Profiling application: /home/ubuntu/myApplication.elf
==10922== Profiling result:
No kernels were profiled.
==10922== Generated result file: /home/ubuntu/mw_nvvpData.nvvp

What I have tried:

ubuntu@gpucoder-hyd-tegratx2-2: modprobe nvgpu NVreg_RestrictProfilingToAdminUsers=0
ubuntu@gpucoder-hyd-tegratx2-2:nvprof --print-api-trace --print-gpu-trace -f -o "mw_nvvpData.nvvp" --csv --log-file mw_nvprofData.csv  "/home/ubuntu/myApplication.elf"

Please let me know if there any other things need to be done.


The “modprobe nvidia NVreg_RestrictProfilingToAdminUsers=0” that you searched are for the x86 system for GPU card use cuda.
For Jetson system looks like didn’t have solution yet.

Hi ShaneCCC,

When can we expect a proper solution for this issue?

Also, is there a difference in profiling for internal GPU (on jetson boards) and discrete GPUs (on desktop machines)?


Hi ram
Sorry to tell his is a limitation from CUDA.
All profiling tool requires root authority now.

AFAIK, this is not an issue to fix but a limitation for security.

Hi Shane,

Thanks for the reply, but we can remove this restriction by adding a conf file under the modprobe.d for desktop. For Jetson boards, when do you plan to have this king of solution?