How can I enable nvidia-smi for all users. I can run it as a sudo user, but as a regular user, I get:
Failed to initialize NVML: Insufficient Permissions
The NVIDIA System Management Interface (nvidia-smi) is a command line utility, based on top of the NVIDIA Management Library (NVML), intended to aid in the management and monitoring of NVIDIA GPU devices.
NVIDIA-SMI has failed because it couldn't communicate with the Nvidia driver. Make sure that the latest NVIDIA driver is installed and running.
Accessing nvidia-smi to review GPU Usage Change the directory location to the folder where nvidia-smi is located. Type cd C:\Program Files\NVIDIA Corporation\NVSMI into the DOS window and press enter. Type nvidia-smi -l 10 in the DOS window and press enter. This will instruct nvidia-smi to refresh every 10 seconds.
DESCRIPTION nvidia-smi (also NVSMI) provides monitoring and management capabilities for each of NVIDIA's Tesla, Quadro, GRID and GeForce devices from Fermi and higher architecture families.
I had the problem and here was my solution. Maybe it is helpful to you.
By ll /dev/nvidia*
you can find that the devices belong to root
and vglusers
group.
If you are the same to me, now you should add your user account into the vglusers
group.
by usermod -a -G vglusers username
(require sudo)
or editing /etc/group
and add your username at the end of the line vglusers:x:****:user1,user2,...
Then logout the bash and re-enter.
Notes:
video
rather than vglusers
; you'll see which name is used when you ll /dev/nvidia*
.vncserver
, you have to kill the server and restart it because you did not have the permission when you started the vncserver
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With