Abstract
This article aims at introducing how to install Nvidia Graphics driver on Ubuntu 16.04.6. In this article, we will use the NVIDIA Graphics Card GeForce 2060 Super as example.
Note: Though this is for Ubuntu 16.04.6, it may still adapt to the similar version like Ubuntu 18.04.
Requirement
- Ubuntu 16.04.6 x64
- Nvidia drivers for the Graphics Card.
Step 1. Disable default driver Nouveau
For Nvidia Graphics Card, ubuntu uses Nouveau driver as default. To use Nvidia offical driver instead, we need to disable Nouveau driver first.
Attention: This step is very important, please make sure the Nouveau banned successfully, or it may fail to log in the graphics interface after installing Nvidia driver!!!
Edit profile
Create a new blacklist file for Nouveau driver:
sudo vim /etc/modprobe.d/blacklist-nouveau.conf
Add following contents:
blacklist nouveau
options nouveau modeset=0
Update kernal initramfs
Save the file, then regenerate the kernal initramfs:
sudo update-initramfs -u
Reboot device
Check the disable
Run the command in terminal, if it return nothing, the Nouveau driver has been disabled successfully:
sudo lsmod | grep nouveau
Step 2. Download Nvidia offical driver
Download driver for the Nvidia card, in this example, we download from https://www.nvidia.com/Download/index.aspx with following settings:
The driver is a runfile package, and we assume it has been put in the path ~/downloads/
Step 3. Start install the driver
Disable lightdm service:
sudo service lightdm stop
Note: If the graphics service is not lightdm but other instead(Ubuntu 18.04 use gdm is default), then use the match graphics instead of lightdm in the command.
Press Ctrl+Alt+F1 to tty mode, and login to your account.
Grant executable permissions for the install driver:
sudo chmod +x ~/downloads/NVIDIA-Linux-x86_64-440.31.run
Run the install pakage:
cd ~/downloads/
sudo ./NVIDIA-Linux-x86_64-440.31.run
If installed on x64 system, it will notice that 32-bit library cannot be installed. Just ignore it and press ok to continue.
When it ask whether to run nvidia-xconfig utility, choose yes and continue.
When the installation finished, reboot device.
If the nvidia-settings can run and model of nvidia card been displayed, the driver installed successfully.
You can also run command below to check whether installed successfully or not:
nvidia-smi
If success, it will return the usage and model information of the Nvidia card.