Ubuntu doesn't come with NVIDIA drivers installed by default as they are proprietary and closed-source. This means that you'll have issues like poor performance, displays not working, artifacts etc... while using the FOSS nouveau drivers.
Graphical Install
The easiest and best way to install NVIDIA drivers if from the Software Center / Additional Drivers app. Just click on the desired driver version, install it and reboot.
If that doesn't work or if you have no video output after boot, you may follow the Command Line Install guide:
Command Line Install
No Display Fix
If you have no display output owing to broken drivers, you can hit Alt+Ctrl+F1 (or F2) to switch to the terminal. Now login using your username and password and proceed.
The NVIDIA driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. For example, if your system is running kernel version 4.4.0, the 4.4.0 kernel headers and development packages must also be installed. The kernel headers and development packages for the currently running kernel can be installed with:
$ sudo apt-get install linux-headers-$(uname -r)
Install the CUDA GPG key
Now you have to Install the CUDA repository public GPG key. This can be done via the cuda-keyring package or a manual installation of the key. The usage of apt-key is deprecated.
Install Drivers
Update the APT repository cache and install the driver using the cuda-drivers meta-package. Use the --no-install-recommends option for a lean driver install without any dependencies on X packages. This is particularly useful for headless installations on cloud instances.
$ sudo apt update
$ sudo apt -y install cuda-drivers
After this you must also install the cuda-toolkit package for working with CUDA and GPU accelerated applications
$ sudo apt install -y nvidia-cuda-toolkit
Reboot your machine.
$sudo reboot
Your nvidia drivers should be installed now and the displays will be working correctly
In case you want to run utilities like ‘nvidia-smi’ you can additionally run the following command. Before this you should obtain the current driver version, open X Server settings and take note of the first few digits of the driver version (before the decimal point)
$ sudo apt install nvidia-utils-$(3digitdriverversion)
For my installation, it was sudo apt install nvidia-utils-510
Recent Articles
KB-630208 | How to use Find and Locate to search for files in Linux
Purpose To provide Linux administrators and Field Engineers with guidance on using the find and locate utilities to efficiently search for files and directories within a Linux filesystem based on criteria such as name, type, size, timestamps, ...
KB-630164 | How to use rsync to Synchronize Files
Purpose To provide a clear and practical procedure for using the rsync utility to synchronize files and directories between local systems and remote hosts, including push and pull operations, while preserving file attributes and optimizing data ...
KB-630107 | How to create a Linux swap file
Purpose To provide Field Engineers and Linux administrators with a standardized procedure for creating, configuring, and validating a Linux swap file. This procedure helps ensure sufficient virtual memory is available when physical RAM is exhausted ...
MSI All-in-One (AIO) PC – Physical Damage Policy for Warranty Claims
MSI All-in-One (AIO) PC – Physical Damage Policy for Warranty Claims MSI's standard warranty does not cover physical or accidental damage to an All-in-One (AIO) PC. If the damage is determined to be caused by external factors rather than a ...
KB 134833 - Troubleshooting NVSM Alert NV-CPU-XX – Unrecoverable CPU Internal Error
Purpose This document provides a general troubleshooting procedure for the NVIDIA System Management (NVSM) alert NV-CPU-XX, which indicates that a CPU has reported an internal error. The article outlines how to verify whether the alert represents an ...