Nvidia-smi (no devices were found)

I have a brand new laptop Lenovo Thinkpad T15 Gen 2 (nVidia GeForce MX450 2GB) that came with Windows. After switching to Ubuntu, I first got a black screen which I bypassed by purging all nvidia stuff. But after reinstalling nvidia drivers, nvidia-smi says “no devices were found” and the GPU doesnt seem to be used.

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

This suggests the nvidia driver isn’t active on your system. Assuming you want to use render offloading, have you installed and configured nvidia-prime?

It’s also worth checking on IRC, Ubuntu Forums, or askubuntu.com.

I forgot to mention, but yeah I have installed and configured nvidia-prime

[ 3.748868] kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 510
[ 3.806626] kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module 470.86 Tue Oct 26 21:55:45 UTC 2021
[ 3.909822] kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 470.86 Tue Oct 26 21:46:51 UTC 2021
[ 3.913351] kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[ 4.254632] kernel: NVRM: GPU 0000:01:00.0: RmInitAdapter failed! (0x24:0xffff:1220)
[ 4.254662] kernel: NVRM: GPU 0000:01:00.0: rm_init_adapter failed, device minor number 0
[ 4.254715] kernel: [drm:nv_drm_load [nvidia_drm]] ERROR [nvidia-drm] [GPU ID 0x00000100] Failed to allocate NvKmsKapiDevice
[ 4.254778] kernel: [drm:nv_drm_probe_devices [nvidia_drm]] ERROR [nvidia-drm] [GPU ID 0x00000100] Failed to register device

The driver is installed fine, but it cannot initialize the device.
Please try disabling iommu in the BIOS (just for testing). And boot with kernel parameter pci=realloc.
If that does not help, the gpu might be broken.
You could verify that by installing windows (check device manager for errors).

Hmm yeah, the same error is in the bug report after following your suggestions. Guess I’ll try installing windows again