PROWAREtech

articles » current » information-technology » linux » setup-and-configure » install-nvidia-driver-on-linux-server

Install Nvidia Driver on Linux Server

Install a Nvidia video driver on a Ubuntu Linux Server for such purposes as HPC or AI training and usage.

Install Linux Server

Download Ubuntu server from here and install it.

Update Linux Server

Update the server with the command:

sudo apt update

And this command:

sudo apt upgrade

Install SSH Server

SSH will allow access to the CLI from another computer. This is not a requirement, but makes the whole process much easier. This can often be installed when installing the server.

sudo apt install openssh-server

Reboot the server.

List Available NVIDIA Drivers

Issue a apt search nvidia-driver command to show a list similar to this:

apt search nvidia-driver
user@hostname-or-ip:~$ apt search nvidia-driver
Sorting... Done
Full Text Search... Done
nvidia-384/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-390

nvidia-384-dev/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-390

nvidia-driver-390/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  NVIDIA driver metapackage

nvidia-driver-418/bionic-updates 430.50-0ubuntu0.18.04.2 amd64
  Transitional package for nvidia-driver-430

nvidia-driver-418-server/bionic-updates,bionic-security 418.211.00-0ubuntu0.18.04.1 amd64
  NVIDIA Server Driver metapackage

nvidia-driver-430/bionic-updates,bionic-security 440.100-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-440

nvidia-driver-435/bionic-updates 455.45.01-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-455

nvidia-driver-440/bionic-updates,bionic-security 450.119.03-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-450

nvidia-driver-440-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-450-server

nvidia-driver-450/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-460

nvidia-driver-450-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  NVIDIA Server Driver metapackage

nvidia-driver-455/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-460

nvidia-driver-460/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA driver metapackage

nvidia-driver-460-server/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA Server Driver metapackage

nvidia-driver-465/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-470

nvidia-driver-470/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  NVIDIA driver metapackage

nvidia-driver-470-server/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.3 amd64
  NVIDIA Server Driver metapackage

nvidia-headless-390/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-418-server/bionic-updates,bionic-security 418.211.00-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-450-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-460/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-460-server/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-470/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-470-server/bionic-updates,bionic-security,now 470.57.02-0ubuntu0.18.04.3 amd64
  NVIDIA headless metapackage

nvidia-headless-no-dkms-390/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-418-server/bionic-updates,bionic-security 418.211.00-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-450-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-460/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-460-server/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-470/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-470-server/bionic-updates,bionic-security,now 470.57.02-0ubuntu0.18.04.3 amd64
  NVIDIA headless metapackage - no DKMS

xserver-xorg-video-nvidia-390/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-418-server/bionic-updates,bionic-security 418.211.00-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-450-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-460/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-460-server/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-470/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-470-server/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.3 amd64
  NVIDIA binary Xorg driver

The "No DKMS" Nvidia video driver is related to the way the Nvidia drivers are compiled and installed on Linux systems.

DKMS (Dynamic Kernel Modules) is a module system for Linux that allows kernel modules to be built dynamically, rather than being statically linked into the kernel. This means that when installing an Nvidia driver, it can be unloaded from the kernel if needed, which is useful in certain situations like multiple graphics cards or virtual machines.

However, some Nvidia drivers have issues with DKMS, and may not work correctly or at all due to this dynamic compilation mechanism.

A "No DKMS" Nvidia video driver typically means that the driver has been compiled statically into a binary package, rather than being built dynamically. This can cause issues in certain situations:

  1. Inability to unload the driver: If an issue arises with the driver, one may not be able to remove it from the kernel using the "rmmod" command.
  2. Limited compatibility: The lack of dynamic linking can limit the driver's ability to work correctly with certain Linux distributions or other software.

However, this also means that:

  1. No need to rebuild the kernel: Since the driver is statically linked, one doesn't need to recompile the entire Linux kernel to update the Nvidia driver.
  2. Simplified installation and removal: Installing and removing the driver is often a simple matter of copying files from the package.

It's worth noting that not all Nvidia drivers are "No DKMS" by default, and some distributions (like Ubuntu) may have built-in DKMS support for certain drivers.

If encountering issues with the Nvidia driver, it's generally recommended to seek out the latest stable version or a more recent release of the driver that supports DKMS.

Install NVIDIA Driver

Make note of the driver that will be installed, in this case: nvidia-driver-470-server.

Make sure the compatible GPU is physically installed in the server.

Issue the command sudo apt install [driver_name] to install the Nvidia driver. For example:

sudo apt install nvidia-driver-470-server

Reboot the server.

Depending on the driver chosen, it may be necessary to install the nvidia utilities to have nvidia-smi which is for monitoring GPU temperature and power usage. Issue this command for this example:

sudo apt-get install nvidia-utils-470-server

Issue this command to monitor the Nvidia GPU's temps and power usage:

watch -t nvidia-smi

List Available NVIDIA Drivers to Show the Installed Driver

Issue a apt search nvidia-driver command to show a list similar to this:

apt search nvidia-driver
user@hostname-or-ip:~$ apt search nvidia-driver
Sorting... Done
Full Text Search... Done
nvidia-384/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-390

nvidia-384-dev/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-390

nvidia-driver-390/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  NVIDIA driver metapackage

nvidia-driver-418/bionic-updates 430.50-0ubuntu0.18.04.2 amd64
  Transitional package for nvidia-driver-430

nvidia-driver-418-server/bionic-updates,bionic-security 418.211.00-0ubuntu0.18.04.1 amd64
  NVIDIA Server Driver metapackage

nvidia-driver-430/bionic-updates,bionic-security 440.100-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-440

nvidia-driver-435/bionic-updates 455.45.01-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-455

nvidia-driver-440/bionic-updates,bionic-security 450.119.03-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-450

nvidia-driver-440-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-450-server

nvidia-driver-450/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-460

nvidia-driver-450-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  NVIDIA Server Driver metapackage

nvidia-driver-455/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-460

nvidia-driver-460/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA driver metapackage

nvidia-driver-460-server/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA Server Driver metapackage

nvidia-driver-465/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-470

nvidia-driver-470/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  NVIDIA driver metapackage

nvidia-driver-470-server/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.3 amd64
  NVIDIA Server Driver metapackage

nvidia-headless-390/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-418-server/bionic-updates,bionic-security 418.211.00-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-450-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-460/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-460-server/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-470/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-470-server/bionic-updates,bionic-security,now 470.57.02-0ubuntu0.18.04.3 amd64 [installed]
  NVIDIA headless metapackage

nvidia-headless-no-dkms-390/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-418-server/bionic-updates,bionic-security 418.211.00-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-450-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-460/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-460-server/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-470/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-470-server/bionic-updates,bionic-security,now 470.57.02-0ubuntu0.18.04.3 amd64 [installed,automatic]
  NVIDIA headless metapackage - no DKMS

xserver-xorg-video-nvidia-390/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-418-server/bionic-updates,bionic-security 418.211.00-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-450-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-460/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-460-server/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-470/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-470-server/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.3 amd64
  NVIDIA binary Xorg driver

Installing on VMWare ESXi 7.0 VM

Go to manage the host hardware and toggle the Nvidia video card PCI device "Passthrough" from Disabled to Active.

Then edit the virtual machine that is to use the Nvidia video card by choosing Add other device > PCI device. Under the VM's memory, select Reserve all guest memory (All locked) (make sure that host memory is not over-committed). Then under the newly added PCI device make sure the Nvidia video card is selected. Ignore the Nvidia Audio PCI device. Optionally, compress the RAM in the VM.

Follow the above steps to install the Nvidia video driver in the virtual machine.


PROWAREtech

Hello there! How can I help you today?
Ask any question

PROWAREtech

This site uses cookies. Cookies are simple text files stored on the user's computer. They are used for adding features and security to this site. Read the privacy policy.
ACCEPT REJECT