Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to install Nvidia 470.57.02 Drivers for Ubuntu 20.04 using a run file
## Install necessary libraries
sudo apt update &&
sudo apt install build-essential libglvnd-dev pkg-config
## Download the drivers
wget https://us.download.nvidia.com/XFree86/Linux-x86_64/470.57.02/NVIDIA-Linux-x86_64-470.57.02.run
## Remove the existing Nvidia drivers, utils, libs etc.
sudo apt purge nvidia*
sudo apt purge nvidia-driver*
sudo apt autoremove
## Blacklist nouveau 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"
## Check that the blacklist file is correct
cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf
## Reboot
sudo reboot
## Boot in recovery mode (select `Advanced options for Ubuntu in GRUB menu`)
## When recovery menu appears select `root` and drop to root shell
## Allow downloaded .run file to be executed
chmod +x /path/to/Nvidia_driver_run_file.run
## Execute the run file
./path/to/Nvidia_driver_run_file
## When prompted Select No for building 32-bit compatibility libraries
## When prompted Select No for changing X11 configuration
## Reboot when installation is completed and allow computer to boot normally
reboot
@AJJLagerweij

This comment has been minimized.

Copy link

@AJJLagerweij AJJLagerweij commented Aug 5, 2021

Hi, I'm trying to follow your manual and for some reason the sudo apt purge nvidia* command does not remove the nvidia driver that I had installed through the 'additional drivers' tab. Nevertheless, it did remove the packages when running `sudo apt purge nvidia-driver*'. I'm not sure why, I copied your command, which looks right to me.

@hkaraoguz

This comment has been minimized.

Copy link
Owner Author

@hkaraoguz hkaraoguz commented Aug 5, 2021

Thank you for the feedback, I will update the gist. Have you been able to install the driver successfully following the guide?

@AJJLagerweij

This comment has been minimized.

Copy link

@AJJLagerweij AJJLagerweij commented Aug 5, 2021

Your guide was nice and clear, but sadly it didn't help in my specific case. In the past, I had the nvidia proprietary drivers through the PPA. But I ran into some hibernation issues that I hoped to resolve. Sadly, it didn't do the trick and I reverted to the 450 driver.
Nevertheless, lots of thanks, your explanation for the installation of the .run files of nvidia drivers is nice and by far the easiest that I found, the hibernation issue that I have is not because of any flaw in the installation procedure.

I had one question remaining, you recommend saying no to the 32-bit compatibility libraries. I was wondering what they can be used for. For example, do games (steam) depend on it. Not really an issue for me, as this is my workstation, but just out of curiosity.

@hkaraoguz

This comment has been minimized.

Copy link
Owner Author

@hkaraoguz hkaraoguz commented Aug 5, 2021

I understand. Thank you for the comments. To be honest I don't think saying yes and no to 32-bit libraries would make a difference for the hibernation/startup issues. However, I was so overwhelmed with these problems so I wanted to install the driver as basic as possible. I don't really know what they are used for either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment