NVIDIA-SMI and Nvidia Runtime Driver don't match


I set up a WSL2 environment to run neural network training and I tried to install Cuda 11.7 for this. But if I run “nvidia-smi” it all looks messed up and I don’t know how to continue. While loading my neural network I also get errors.

libEGL warning: failed to open /dev/dri/renderD128: Permission denied

libEGL warning: failed to open /dev/dri/renderD128: Permission denied

Unable to initialize EGL

Do I get the errors because of the messed up drivers? Am I supposed to set up a whole new WSL2 system? I am pretty new to all of this stuff so I am pretty sure I did a mistake at any point, but I don’t know where and how to fix it.

Here is the nvidia-smi and nvcc --version output:

kiropro@DESKTOP-JC8EGB7:~/PoseCNN-PyTorch$ nvidia-smi
Tue Feb 21 15:20:39 2023
| NVIDIA-SMI 525.89.02    Driver Version: 528.49       CUDA Version: 12.0     |
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|   0  NVIDIA GeForce ...  On   | 00000000:01:00.0  On |                  Off |
|  0%   34C    P8    15W / 450W |   1323MiB / 24564MiB |      2%      Default |
|                               |                      |                  N/A |

| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|    0   N/A  N/A        27      G   /Xwayland                       N/A      |
kiropro@DESKTOP-JC8EGB7:~/PoseCNN-PyTorch$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Jun__8_16:49:14_PDT_2022
Cuda compilation tools, release 11.7, V11.7.99
Build cuda_11.7.r11.7/compiler.31442593_0

When I try to install the graphic driver from Nvidia directly I get following messages which indicate that CUDA 11.7 should be installed:

kiropro@DESKTOP-JC8EGB7:~$ sudo apt-get -y install cuda
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
cuda is already the newest version (11.7.1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

EDIT: As I have read 11.7 should be installed, nvidia-smi only shows what my graphic card is capable of, so that should be alright. But still I am confused about the error in the first box and the different NIVIDIA-SMI (525.89.02) driver version and Driver Version (528.49) in the nvidia-smi command

You’re just confused by the way nvidia on wsl2 works. There’s no real nvidia gpu, it doesn’t get passed through. Instead, a kind of “cuda proxy” is used to pass the compute instructions from the linux environment on to the windows driver.
Outputs explained:

NVIDIA-SMI 525.89.02

the nvidia-smi version, installed alongside cuda

Driver Version: 528.49

the underlying Windows driver version

CUDA Version: 12.0

The maximum supported cuda version by the driver

Cuda compilation tools, release 11.7

the installed cuda-toolkit version.

Since there’s no real nvidia gpu in wsl2, you must not install a nvidia driver. The state of your current install depends on which repo you used to install the “cuda” metapackage
WSL-Ubuntu repo: doesn’t contain a driver, all fine
Plain Ubuntu repo: not good, “cuda” metapackage includes the driver, “cuda-toolkit” metapackage has to be used instead.


libEGL warning: failed to open /dev/dri/renderD128: Permission denied

Shouldn’t have anything to do with nvidia, please check its permission:
ls -l /dev/dri

1 Like

Okay thank you, now my confusion is gone!

I did install according to the WSL-Ubuntu repo instructions, so that should be fine I guess.

Yes I already checked the permissions, didn’t help :/ But I guess since it has nothing to do with the driver this topic is not suited for the NVIDIA forum.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.