linux设置gpu权限,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)

标签:error,NVreg,may,linux,RestrictProfilingToAdminUsers,nvidia,GPU,modprobe

来源: https://www.cnblogs.com/jonesnow333/p/14176613.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值