Sat. Nov 27th, 2021
NVIDIA Development Tools Solutions - ERR_NVGPUCTRPERM: Permission issue with Performance Counters

Short URL: https://developer.nvidia.com/ERR_NVGPUCTRPERM

This web page gives a proof and options for the next error message from varied NVIDIA improvement instruments:
   ERR_NVGPUCTRPERM The consumer working doesn’t have permission to entry NVIDIA GPU Performance Counters on the goal system.

If you’re receiving this error then

  1. You are utilizing a device that accesses the GPU Performance Counters. These metrics are a developer-particular function that present low stage entry to GPU {hardware}.
  2. Your Administrator or a current NVIDIA driver set up has disabled entry to GPU Performance because of Security Notice: NVIDIA Response to “Rendered Insecure: GPU Side Channel Attacks are Practical” – November 2018.

Your device’s profiling is affected by the executive restriction on entry to the NVIDIA GPU efficiency counters when utilizing a home windows 419.17 or Linux 418.43 or later driver.
To achieve entry to those counters when profiling,

  1. Run the device or utility being profiled with administrative privileges. See device particular info, however normally,
    • On Windows targets: Launch the device “As Administrator”
    • On Linux targets: Launch the device with ‘sudo’ or as a consumer with the CAP_SYS_ADMIN functionality set
  2. Have a system administrator allow entry to the NVIDIA efficiency counters utilizing the Administration directions

Administration

To management entry to the NVIDIA efficiency counters, a system administrator use NVIDIA Control Panel or Command Line Control, as follows:

NVIDIA Control Panel Control (Windows[1] and Mac solely)

The NVIDIA Control Panel is put in with your show driver. GPU Performance Counter management requires show driver 419.17 or later. You should launch the management panel as a system administrator to handle the GPU Performance Counters.
(proper-click on in your desktop desktop for fast entry to the NVIDIA Control Panel)

Windows Step 1: Open the NVIDIA Control Panel, choose ‘Desktop’, and guarantee ‘Enable Developer Settings’ is checked.

Windows Step 2: Under ‘Developer’ > ‘Manage GPU Performance Counters’, choose ‘Allow entry to the GPU efficiency counter to all customers’ to allow unrestricted profiling[1]

[1] Note: The 425.25 home windows driver management panel for Tesla household GPUs could not respect the efficiency counter entry setting. If you encounter this issue, please see the Tesla on Windows Control Panel Issue web page.

MacOS: Under ‘Developer’ > ‘GPU Performance Counters’, choose ‘Allow entry for all customers’ to allow unrestricted profiling

Command Line Control – Linux Only

GPU Performance Counter management requires Linux show driver 418.43 or later.

  1. Unload the previous modules.
  2. Before you’ll be able to insert the module with the important thing set/unset, you first must cease the window supervisor, and unload all nvidia-based mostly modules. So as root, or with sudo:

  • systemctl isolate multi-consumer[1]# Stop the window supervisor.
  • modprobe -r nvidia_uvm nvidia_drm nvidia_modeset nvidia-vgpu-vfio nvidia[2] # Unload dependent modules

[1] Assumes a systemd-based mostly distribution. For non-systemd-based mostly distributions, a unique process is required.
[2] Assumes no processes are utilizing these modules, for sucessful unloading.

  • Specify the entry you need: Insert the modules with the registry key set/unset.:
    To require administrative privileges (CAP_SYS_ADMIN functionality set) to profile utilizing NVIDIA GPU efficiency counters
    • modprobe nvidia NVreg_RestrictProfilingToAdminUsers=1 [1][4][7]
    Or, to permit any consumer to profile utilizing NVIDIA GPU efficiency counters
    • modprobe nvidia NVreg_RestrictProfilingToAdminUsers=0 [2][4][7]

    [1] Alternatively, A file with the .conf extension containing ‘choices nvidia “NVreg_RestrictProfilingToAdminUsers=1″‘ could also be saved to /and so forth/modprobe.d [3][5]
    [2] Alternatively, A file with the .conf extension containing ‘choices nvidia “NVreg_RestrictProfilingToAdminUsers=0″‘ could also be saved to /and so forth/modprobe.d [3][5]
    [3] A reboot could also be required to ensure that this to take impact, however these settings will probably be continued
    [4] These settings is not going to be continued after a reboot.
    [5] On some methods (or when utilizing a deb to put in), it might be essential to rebuild the initrd after writing a configuration file to /and so forth/modprobe.d[6]
    [6] When rebuilding the initrd, working “update-initramfs -u” can also be required.
    [7] On Ubuntu methods, when putting in through the distro-native packages, the kernel module will get
           renamed from nvidia to nvidia-xxx, after which nvidia is aliased to nvidia-xxx
           (the place xxx is the key variety of the driving force. So a 418.67 driver would use nvidia-418)

  • Restart the window supervisor (if desired).
    • systemctl isolate graphical[1]# Restart the window supervisor.

    [1] Assumes a systemd-based mostly distribution. For non-systemd-based mostly distributions, a unique process is required.

  • If the steps above fail to work, a system reboot can also be required.
  • Also see the “Restricting access to GPU performance counters” part of the README.txt within the Linux driver

    Tool Specific Solutions

    The following instruments could encounter this issue and will have device-particular info on the related pages: REF:DTSHARED-118

    By admin