系统相关
首页 > 系统相关> > linux GPU error 权限不够

linux GPU error 权限不够

作者:互联网

Command Line Control - Linux Only
GPU Performance Counter control requires Linux display driver 418.43 or later.

Unload the old modules.
Before you can insert the module with the key set/unset, you first need to stop the window manager, and unload all nvidia-based modules. So as root, or with sudo:
    # The following assumes a systemd-based distribution. For non-systemd-based distributions, a different procedure is required.
    systemctl isolate multi-user # Stop the window manager.
    modprobe -r nvidia_uvm nvidia_drm nvidia_modeset nvidia-vgpu-vfio nvidia # Unload dependent modules
Specify the access you desire: Insert the modules with the registry key set/unset.:
To require administrative privileges (CAP_SYS_ADMIN capability set) to profile using NVIDIA GPU performance counters
    modprobe nvidia NVreg_RestrictProfilingToAdminUsers=1 [1][4][7]
Or, to allow any user to profile using NVIDIA GPU performance counters
    modprobe nvidia NVreg_RestrictProfilingToAdminUsers=0 [2][4][7]

[1] Alternatively, A file containing 'options nvidia "NVreg_RestrictProfilingToAdminUsers=1"' may be saved to /etc/modprobe.d [3][5]
[2] Alternatively, A file containing 'options nvidia "NVreg_RestrictProfilingToAdminUsers=0"' may be saved to /etc/modprobe.d [3][5]
[3] A reboot may be required in order for this to take effect, but these settings will be persisted
[4] These settings will not be persisted after a reboot.
[5] On some systems (or when using a deb to install), it may be necessary to rebuild the initrd after writing a configuration file to /etc/modprobe.d[6]
[6] When rebuilding the initrd, running “update-initramfs -u” is also required.
[7] On Ubuntu systems, when installing via the distro-native packages, the kernel module gets
       renamed from nvidia to nvidia-xxx, and then nvidia is aliased to nvidia-xxx
       (where xxx is the major number of the driver. So a 418.67 driver would use nvidia-418)

https://developer.nvidia.com/nvidia-development-tools-solutions-ERR_NVGPUCTRPERM-permission-issue-performance-counters#SolnTag

标签:error,NVreg,may,linux,RestrictProfilingToAdminUsers,nvidia,GPU,modprobe
来源: https://www.cnblogs.com/jonesnow333/p/14176613.html