Recently I had some issues with my nvidia drivers so I uninstalled them and I tried reinstalling:
sudo apt-get purge nvidia-*
sudo apt-get update
sudo apt-get autoremove
After that I tried re-installing them with:
sudo ubuntu-drivers install nvidia:550
This seems to have worked fine, as in no errors were reported and I restarted the computer with sudo shutdown -r now
I'm working on it remotly, that's why I restart it using terminal commands. But after reboot there are still no drivers detected:
nvidia-smi NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
I'm running Ubuntu 24.04. Is there a common reason to this? Has anyone encountered anything similar? I know there have been similar questions but none of the other answers helped me.
EDIT: Providing some requested info from the comments.
>ls /lib/modules/$(uname -r)/updates/dkms
nvidia-drm.ko.zst nvidia.ko.zst nvidia-modeset.ko.zst nvidia-
peermem.ko.zst nvidia-uvm.ko.zst
>lsmod | egrep "nvidia|^video"
video 73728 1 amdgpu
>fgrep nvidia /etc/modprobe.d/*
/etc/modprobe.d/blacklist-framebuffer.conf:blacklist nvidiafb
/etc/modprobe.d/nvidia-graphics-drivers-kms.conf:# This file was
generated by nvidia-driver-550
/etc/modprobe.d/nvidia-graphics-drivers-kms.conf:options nvidia-
drm modeset=1
Ubuntu-drivers recommends version 570, but when I tried installing that I got:
>sudo apt install nvidia-driver-570
The following packages have unmet dependencies:
libnvidia-compute-570 : Depends: libssl1.1 (>= 1.1.0) but it is
not installable
E: Unable to correct problems, you have held broken packages.
UPDATE:
I tried installing the 560 version of drivers with:
sudo apt install nvidia-driver-560
Then rebuild initframs
sudo update-initramfs -k all -c
And reboot:
sudo shutdown -r now
The result of running lsmod | grep nvidia was blank, so I tried manually loading the modules with no avail:
sudo modprobe nvidia
modprobe: ERROR: could not insert 'nvidia': Key was rejected by service
sudo modprobe nvidia-drm
modprobe: ERROR: could not insert 'nvidia_drm': Key was rejected by service
sudo modprobe nvidia-uvm
modprobe: ERROR: could not insert 'nvidia_uvm': Key was rejected by service
sudo modprobe nvidia-modeset
modprobe: ERROR: could not insert 'nvidia_modeset': Key was rejected by service