Last active
May 17, 2022 08:46
-
-
Save mjkvaak/5769ebdfbf6598b3fd0ece66b3c12a3c to your computer and use it in GitHub Desktop.
Painless installation of NVIDIA drivers on Ubuntu 18.04/20.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# blacklist noveau drivers | |
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf" | |
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf" | |
# confirm that the changes were correctly applied | |
cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf | |
# prints: | |
# blacklist nouveau | |
# options nouveau modeset=0 | |
# reboot | |
sudo reboot | |
# update apt | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install -y libdvd-pkg | |
sudo dpkg-reconfigure libdvd-pkg | |
# select the nvidia-driver version | |
sudo apt-cache search nvidia-driver | grep "driver metapackage" | |
# prints: | |
# nvidia-driver-390 - NVIDIA driver metapackage | |
# nvidia-driver-460 - NVIDIA driver metapackage | |
# nvidia-driver-470 - NVIDIA driver metapackage | |
# nvidia-driver-510 - NVIDIA driver metapackage | |
# install | |
VERSION=510 | |
sudo apt install nvidia-driver-$VERSION | |
# reboot | |
sudo reboot | |
# confirm that installation was successful | |
nvidia-smi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment