Score:2

Ubuntu 22.04.1 LTS doesn't find Nvidia driver at all

US flag

I was trying to run a program in Ubuntu on Windows 10 but for some reason it just cannot find my NVIDA driver. I have tried install via the '$sudo apt-get nvidia-xxx' (tried different versions too), but it didn't seem to help.

When I do '$nvidia-smi' it returns 'NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.'. When I do '$nvidia-settings' it returns 'ERROR: The control display is undefined; please run nvidia-settings --help for usage information.'

I have then followed some of the steps on the internet trying to do $lspci -k | grep -EA2 'VGA|3D', the results are

> lspci: Unable to load libkmod resources: error -2 5ba5:00:00.0 3D
> controller: Microsoft Corporation Basic Render Driver
>         Kernel driver in use: dxgkrnl e7a1:00:00.0 3D controller: Microsoft Corporation Basic Render Driver
>         Kernel driver in use: dxgkrnl

alternatively if I do a sudo lshw -C display results would be:

 *-display:0
       description: 3D controller
       product: Basic Render Driver
       vendor: Microsoft Corporation
       physical id: 2
       bus info: pci@5ba5:00:00.0
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: bus_master cap_list
       configuration: driver=dxgkrnl latency=0
       resources: irq:0
  *-display:1
       description: 3D controller
       product: Basic Render Driver
       vendor: Microsoft Corporation
       physical id: 3
       bus info: pci@e7a1:00:00.0
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: bus_master cap_list
       configuration: driver=dxgkrnl latency=0
       resources: irq:0

Anyone has any idea how to resolve this? Thanks in advance

PS for reference, if i do a nivida-smi on powershell it would have:

+---------------------------------------------+
| NVIDIA-SMI 452.39       Driver Version: 452.39       CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro P620        WDDM  | 00000000:01:00.0  On |                  N/A |
| 34%   40C    P5    N/A /  N/A |   1064MiB /  2048MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
Terrance avatar
id flag
You might want to follow through https://ubuntu.com/tutorials/enabling-gpu-acceleration-on-ubuntu-on-wsl2-with-the-nvidia-cuda-platform#1-overview
Pilot6 avatar
cn flag
What do you mean by " run a program in Ubuntu on Windows 10". Is Ubuntu installed to some virtual environment? Then installing Nvidia drivers is not an option.
Score:2
US flag

I have things worked out using https://ubuntu.com/tutorials/enabling-gpu-acceleration-on-ubuntu-on-wsl2-with-the-nvidia-cuda-platform#1-overview which Terrance shared with me the other day! Thanks Terrance!

Score:1
pe flag

You mentioned "trying to run a program in Ubuntu on Windows 10". If you run Ubuntu as a virtual machine or a guest OS, then the guest OS (Ubuntu) won't be able to see the GPU in the host OS (Windows 10) unless you have GPU pass-through enabled.

There is also a related question on GPU pass-through for WSL2:

Getting GPU passthrough to work on WSL2 for windows 10

, which says that the patch 21H2 is needed for GPU pass-through to work.

Cheng avatar
md
Thanks for sharing this. Sorry but I'm a bit confused on that article, do I just add the 21H2 windows patch and this would solve the issue? Sorry if this is too basic a question...
tinlyx avatar
pe flag
@Cheng From what I read, GPU pass-through is a tricky issue. If you are using VirtualBox, I read that only certain combinations of AMD CPU and NVidia cards work. Intel CPUs don't. I haven't used WSL2. So I can't speak about that. The easiest solution for me was to avoid any virtualization and install Ubuntu directly (as a dualboot).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.