Linux server graphics card driver installation tutorial

888u

Last update at :2024-01-29,Edit by888u

Many people like to install graphics cards on servers to run GPU applications, but online tutorials are very difficult. Today, this site will share with you an easy-to-understand tutorial that everyone can install.

1. Download the graphics card driver

  • Go to official website to download. Choose the driver corresponding to your graphics card

2. Installation

  • Uninstall the original N card driver first, if there is one
#for case1: original driver installed by apt-get: sudo apt-get remove --purge nvidia* #for case2: original driver installed by runfile: sudo chmod +x *.run sudo ./NVIDIA-Linux-x86_64-384.59.run --uninstall
  • Disable nouveau driver
sudo gedit /etc/modprobe.d/blacklist.conf # Add at the end of the text: (disable nouveau third-party driver, no need to change it back later) blacklist nouveau options nouveau modeset=0 #implement sudo update-initramfs -u

After restarting, execute: lsmod | grep nouveau. If there is no screen output, nouveau is successfully disabled.

  • Disable X-Window service
sudo service lightdm stop #This will close the graphical interface

Press Ctrl-Alt+F1 to enter the command line interface, enter your username and password to log in. Tip: Enter: sudo service lightdm start on the command line, and then press Ctrl-Alt+F7 to return to the graphical interface.

Lightdm is not installed on my computer, and the graphical interface is GTK3. So, I installed sudo apt-get install lightdm first. Then perform the steps above. Although lightdm is chosen as the default graphical interface system, it is still GTK3. Therefore, my operations are all performed under the graphical interface

  • Install driver from command line
#Give execution permissions to the driver run file: sudo chmod +x NVIDIA-Linux-x86_64-384.59.run The parameters following # are very important and cannot be omitted: sudo ./NVIDIA-Linux-x86_64-384.59.run –no-opengl-files

Note that there must be no-opengl-files

3. Test

lsy@lsy-MS-7B79:~$ nvidia-smi Sat May 18 14:14:20 2019 +------------------------------------------------- ----------------------------+ | NVIDIA-SMI 418.56 Driver Version: 418.56 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 RTX 2060 Off | 00000000:1D:00.0 On | N/A | | 0% 46C P8 13W / 160W | 85MiB / 5901MiB | 1% Default | +----------------------------------+------------------ -----+----------------------+ +------------------------------------------------- ----------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |================================================== ============================| | 0 1091 G /usr/lib/xorg/Xorg 83MiB | +------------------------------------------------- ----------------------------+

Recommended site searches: registered domain names, hosting services, Hong Kong high-defense servers, ICP website registration, Hong Kong server hosting, German servers, Hong Kong server hosting, Google permanently free servers, cheap domain name registration, check your own IP,

p>

Linux server graphics card driver installation tutorial

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码