Nvidia-smi on Ubuntu 22.04 LTS "No devices were found"

Nvidia driver seems to be installed but nvidia-smi provides as output “No devices were found” on Ubuntu 22.04 LTS.

I need to use GPU on Matlab, that cannot find the GPU.

Here the bug report
nvidia-bug-report.log.gz (229.7 KB)

It looks like you’re using the open-source kernel driver on a GPU that it doesn’t support out of the box yet:

May 15 09:58:07 simbad kernel: [    7.439984] NVRM: Open nvidia.ko is only ready for use on Data Center GPUs.
May 15 09:58:07 simbad kernel: [    7.439990] NVRM: To force use of Open nvidia.ko on other GPUs, see the
May 15 09:58:07 simbad kernel: [    7.439992] NVRM: 'OpenRmEnableUnsupportedGpus' kernel module parameter described
May 15 09:58:07 simbad kernel: [    7.439994] NVRM: in the README.
May 15 09:58:07 simbad kernel: [    7.824276] NVRM: GPU 0000:65:00.0: RmInitAdapter failed! (0x62:0x0:1849)
May 15 09:58:07 simbad kernel: [    7.824843] NVRM: GPU 0000:65:00.0: rm_init_adapter failed, device minor number 0

You could try setting that module parameter, but if you’re not intending to use the open drivers then I’d recommend installing the closed-source driver for now.

How can I install the closed-source driver?

How did you install the driver you have now? If you used the “Additional Drivers” dialog in the Ubuntu updater, I think you want to pick one of the ones that doesn’t say “(open kernel)”.

I picked the first of the list, the one with (proprietary, tested).

So I should have the right drivers?!

I think so. I’d recommend making sure you don’t have a driver installed from a .run package by running sudo nvidia-uninstall. That’s expected to fail if there was no .run driver installed. Then remove and reinstall the Ubuntu driver packages to make sure all files are installed properly.