GPU not getting detected on running lspci | grep NVIDIA command

Hi there, I have a Geforce RTX 2080 ti on an Ubuntu 18.04 machine.
The driver version is 510.54 and CUDA version is 11.6.

However when I run the command lspci | grep NVIDIA I get the following output.

86:00.0 VGA compatible controller: NVIDIA Corporation Device 1e04 (rev a1)
86:00.1 Audio device: NVIDIA Corporation Device 10f7 (rev a1)
86:00.2 USB controller: NVIDIA Corporation Device 1ad6 (rev a1)
86:00.3 Serial bus controller [0c80]: NVIDIA Corporation Device 1ad7 (rev a1)

The GPU is not getting detected with the above command.

But when I run nvidia-smi GPU is getting detected and I get the following output.

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.54       Driver Version: 510.54       CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+
| 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 ...  Off  | 00000000:86:00.0 Off |                  N/A |
| 36%   34C    P0    37W / 250W |      0MiB / 11264MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+```

Can anyone please help me with that?

Please run
sudo nvidia-bug-report.sh
and attach the resulting nvidia-bug-report.log.gz file to your post.

nvidia-bug-report.log.gz (539.2 KB)

To get a proper output in lspci, you just need to update the pci db:
sudo update-pciids

When I run the sudo update-pciids command, it gets stuck with no output.

You need to have internet connection.

I have an internet connection. This is a remote VM. But still I am not getting any output.

I can’t help you with that, update-pciids is a simple script that just downloads the pci id database. This does not have any technical impact, it just makes lspci output “look nicer”. Just ignore.

I took a look at the script.
It downloads this:
http://pci-ids.ucw.cz/v2.2/pci.ids

and (on ubuntu 18.04) puts it here:
/usr/share/misc/pci.ids

Easily done manually…