reboot. If the problem still exist:
sudo rmmod nvidia_drm
sudo rmmod nvidia_modeset
sudo rmmod nvidia
nvidia-smi
for cent/rhel
cd /boot
mv initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
dracut -vf initramfs-$(uname -r).img $(uname -r)
then
reboot
for debian/ubuntu
update-initramfs -u
if problem exist persist
apt install -y dkms && dkms install -m nvidia -v 440.82
Change 440.82 to your actual version.
tip: get the Nvidia driver version:
ls /usr/src
you will find the Nvidia driver dir such as nvidia-440.82
also you can remove all Nvidia pkg and reinstall driver again
apt purge nvidia*
apt purge *cuda*
#check
apt list -i |grep nvidia
apt list -i |grep cuda