Install NVIDIA Graphic Driver on Linux

If your Server/Computer has NVIDIA Graphic cards, Install NVIDIA Graphic Driver to improve Graphics related performance like gaming and mining.

  1. Disable “nouveau” driver that is loaded by default as generic graphic driver.
[root@unixonline ~]# lsmod | grep nouveau
nouveau              2187264  1
video                  45056  1 nouveau
mxm_wmi                16384  1 nouveau
wmi                    32768  2 mxm_wmi,nouveau
i2c_algo_bit           16384  1 nouveau
drm_kms_helper        200704  1 nouveau
ttm                   131072  1 nouveau
drm                   520192  4 drm_kms_helper,ttm,nouveau
[root@unixonline ~]# vi /etc/modprobe.d/blacklist-nouveau.conf
# add following lines to the end of the file(or create new if it does not exist).

blacklist nouveau
options nouveau modeset=0


[root@unixonline ~]# dracut --force

[root@unixonline ~]# init6

2. Disable “nouveau” driver that is loaded by default as generic graphic driver.

[root@unixonline ~]# yum install -y kernel-devel kernel-headers elfutils-libelf-devel zlib-devel gcc make

# Confirm the installed cards on your system

[root@unixonline ~]# lspci | grep VGA
05:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1070] (rev a1)

3. Download Graphic Driver for your system from NVIDIA website and run the installer.

⇒ https://www.nvidia.com/Download/index.aspx?lang=en

# In this case downloaded file is “NVIDIA-Linux-x86_64-525.78.01.run”

# Run the downloaded installer file

[root@unixonline ~]# bash NVIDIA-Linux-x86_64-525.78.01.run

Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 525.78.01

  WARNING: nvidia-installer was forced to guess the X library path
           '/usr/lib64' and X module path '/usr/lib64/xorg/modules'; these
           paths were not queryable from the system.  If X fails to find the
           NVIDIA X driver module, please install the `pkg-config` utility and
           the X.Org SDK/development package for your distribution and
           reinstall the driver.

.....
.....

  Install NVIDIA's 32-bit compatibility libraries?
  # select [Yes] on here
     Yes                                    No


  Would you like to run the nvidia-xconfig utility to automatically update
  your X configuration file so that the NVIDIA X driver will be used when you
  restart X?  Any pre-existing X configuration file will be backed up.
  # select [No] on here
     Yes                                    No


 Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86_64
  (version: 525.78.01) is now complete.  Please update your xorg.conf file as
  appropriate; see the file /usr/share/doc/NVIDIA_GLX-1.0/README.txt for
  details.

                                       OK

# Verify the installation to show Graphic cards status

[root@unixonline ~]# nvidia-smi
Wed Jan  11 00:33:07 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.78.01 Driver Version: 525.78.01  CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name       Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp Perf Pwr:Usage/Cap|Memory-Usage | GPU-Util  Compute M. |
|===============================+==============|
|   0  GeForce GTX 1070    Off    | 00000000:05:00.0 Off |                    N/A  |
| 43%   39C    P5    14W / 180W |      0MiB /  8119MiB |      5%      Default |
+-------------------------------+----------------------+---------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                         GPU Memory                   |
|  GPU       PID       Type      Process name                                  Usage       |
|==============================================|
|  No running processes found                                                                   |
+-----------------------------------------------------------------------------+

Leave a Comment