NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver - after update from Ubuntu 20.04 to 22.04

I have recently updated from Ubuntu operating system 20.04 to 22.04. After updating the NVIDIA driver is no longer detected, and I get the message when i type the nvidia-smi command in terminal:
“NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.”

To try and fix this, I have uninstalled the driver using the commands, followed by a sudo reboot:
sudo apt-get remove --purge ‘^nvidia-.
sudo apt-get remove --purge '^libnvidia-.

sudo apt-get --purge -y remove ‘nvidia
sudo apt autoremove

And then I have reinstalled through the Software and updates, followed by a restart.
However, I still get the same message after reinstalling.

I have uploaded the following:

nvidia-bug-report.log (986.5 KB)
nvidia-installer.log (37.1 KB)

Can you help ?

1 Like

The headers for your kernel are missing, please install
sudo apt install linux-headers-$(uname -r)

Thank you for the response. I have tried this and I get the following response:

Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Package linux-headers-5.14.0-1048-oem is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘linux-headers-5.14.0-1048-oem’ has no installation candidate

I have previously tried to download and install the deb file and copy to /usr/src/ however that did not work. I have the following files in /usr/src/:

The OEM kernel you’re running seems to be too old so the headers are removed from repo. Please either switch to the 5.15 kernel in grub commandline or try upgrading the oem kernel (sudo apt update && sudo apt upgrade).

Thanks so much for the help. It is working now!!

The sudo apt update & sudo apt upgrade did not seem to help. Switching the kernel from 5.14 to 5.15 in GRUB mode was the key. Thanks!

Same issue here. :(

How did you changed it?