Related Categories

Linux Graphics Driver Configuration

If you are using VIP on a Linux machine with an NVIDIA graphics card, it is important to ensure that you are using the proper graphics drivers for maximum performance.

Checking Your Current Graphics Driver

First, check which driver is currently being used for your graphics card by entering the following command in terminal:

$ sudo lshw -numeric -C display

If you see the following line in the output, your graphics card is using a standard driver that is not optimized and you should continue following these instructions:

configuration: driver=nouveau latency=0

If you see that an NVIDIA driver is already being used, you can skip the rest of these steps.

Before actually updating the graphics driver, it is always best practice to make sure that your packages are up to date by running the following two lines:

$ sudo apt update

$ sudo apt upgrade

 

Ubuntu (Debian-based) Instructions

You can check for NVIDIA drivers by running the following command:

$ sudo apt search nvidia-driver

This should return a list including an item that looks like this (for driver version 460.x): nvidia-driver-460

Next, install the driver using this command, using the version number you just found in the list above:

$ sudo apt install nvidia-driver-460

You will need to reboot your machine for this change to take effect:

$ sudo reboot

Once your machine reboots, you can run this command again to make sure that the correct NVIDIA driver is being used:

$ sudo lshw -numeric -C display

 

CentOS (Red Hat-based) Instructions

Make a note of your graphics card model that was output by the above lshw command, which should look like this:

product: GP106 [GeForce GTX 1060 6GB] [10DE:1C03]

Using this information, download the correct Linux NVIDIA driver for your graphics card from NVIDIA’s downloads website.

Install the following prerequisites to successfully compile and install the driver:

$ sudo yum groupinstall “Development Tools”

$ sudo yum install kernel-devel epel-release

$ sudo yum install dkms

Open the configuration file /etc/default/grub.cfg to disable the nouveau driver. To do this, add nouveau.modeset=0 to the line starting with GRUB_CMDLINE_LINUX. After you are done, that line should look like this (do not modify anything else that was already on that line):

GRUB_CMDLINE_LINUX=”crashkernel=auto rhgb quiet nouveau.modeset=0″

After saving that configuration file, run the following commands to apply the change:

$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg

$ sudo grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

Reboot your machine:

$ sudo reboot

After rebooting, ensure that the nouveau driver is no longer being used:

$ sudo lshw -numeric -C display

The NVIDIA driver must be installed while the X.Org server is stopped, so switch to text mode by running this command:

$ sudo systemctl isolate multi-user.target

Next, install the NVIDIA driver by running the following command:

$ sudo bash NVIDIA-Linux-x86_64-*

When prompted, answer YES to installation of NVIDIA’s 32-bit compatibility libraries and automatic update of your X configuration file.

Finally, reboot your system for the driver installation to take effect:

$ sudo reboot

Once your machine reboots, you can run this command again to make sure that the correct NVIDIA driver is being used:

$ sudo lshw -numeric -C display