This didn’t solve the issue. However I solved the issue by installing an old driver, by following this: *Bug* 470.42.01-1 dGPU can not be initialized - #13 by Kanguru007
These are the commands I entered:
#remove the current NVIDIA driver
sudo apt remove nvidia*
sudo reboot now
#disable the noveau driver
sudo echo "blacklist nouveau" > /etc/modprobe.d/blacklist-nvidia-nouveau.conf
sudo echo "options nouveau modeset=0" >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf
sudo update-initramfs -u
sudo reboot now
#install NVIDIA 460.84 driver
#downloaded from https://www.nvidia.com/Download/Find.aspx?lang=en-us
chmod +x NVIDIA-Linux-x86_64-460.84.run
sudo ./NVIDIA-Linux-x86_64-460.84.run
sudo reboot now
In the end, my configuration was:
Ubuntu: 20.04.2 LTS
Kernel: 5.13.0-30-generic
Nvidia driver: 460.84