Method of installing NVIDIA official graphics card driver under Linux system

Time:2021-9-25

1、 To install NVIDIA drivers:

1. To NV official website: http://www.nvidia.cn/Download/index.aspx?lang=cn Download the linux driver version 295.59. Get an installation file ending in. Run and give it executable permissions. If the SELinux module is enabled, please disable it first!

Copy code

The code is as follows:

# chmod +x NVIDIA-Linux-x86_64-295.59.run

2. Edit the blacklist.conf file to prohibit the loading of Nouveau module:

Copy code

The code is as follows:

# vim /etc/modprobe.d/blacklist.conf

Add at the end of the file:

Copy code

The code is as follows:

blacklist nouveau

Save and exit.

 

3. Edit the grub.conf file to prohibit the loading of Nouveau kms.

Copy code

The code is as follows:

# vim /etc/grub.conf

It will be as follows:

Copy code

The code is as follows:

kernel /boot/vmlinuz-2.6.39-200.24.1.el6uek.x86_64 ro root=UUID=363dd151-b0dd-4bc5-b382-79bcb5edbb98</p>
<p>rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM quiet numa=off

Amend to read:

Copy code

The code is as follows:

kernel /boot/vmlinuz-2.6.39-200.24.1.el6uek.x86_64 ro root=UUID=363dd151-b0dd-4bc5-b382-79bcb5edbb98</p>
<p>rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM quiet numa=off</p>
<p>nouveau.modeset=0

Save and exit.
201576152416011.jpg (750×421)

4. Since the graphics card driver does not support running while the X-Windows service is running, you need to enter run level 3. Run init 3 to enter the pure character terminal mode.

5. Log in under the character terminal, enter the directory where the driver installation file is located, and run the installation file with the following command.

Copy code

The code is as follows:

# ./NVIDIA-Linux-x86_64-295.59.run

Follow the prompts step by step. It’s very simple. After the installation, reboot and restart the system. Before entering the desktop, you will see the large logo of NVIDIA, indicating that NVIDIA is running normally. Look

The video is very smooth, and the 3D special effects desktop can also be opened.

6. Install multiple kernels or compile kernel modules after kernel upgrade:

One of the disadvantages of using official drivers is that the kernel modules have to be recompiled every time the kernel is updated. I installed two kernels. The steps for installing the NV driver of the second kernel are a little different. Simply put, perform steps 4 and 5 of the first installation above, but there are some differences in step 5:

Copy code

The code is as follows:

# ./NVIDIA-Linux-x86_64-295.59.run -K

 

Adding the – k parameter at runtime means that only the kernel module is compiled without installing the driver file. Restart after execution. This completes the installation of NVIDIA’s official driver.

2、 Enable Plymouth graphical boot:

Plymouth is a graphical guidance system that appeared after Fedora 10, while RHEL / CentOS 6. X is based on Fedora 12. The official NVIDIA driver itself does not support kms, so you can only specify to use the mesa driver during boot to achieve the effect of graphical Plymouth.

1. After the brand logo appears, press ESC to enter the grub interface, select the kernel, press e to edit, and the parameter VGA = ask is not added in the kernel line.

For example, my kernel line is

Copy code

The code is as follows:

kernel /boot/vmlinuz-2.6.39-200.24.1.el6uek.x86_64 ro root=UUID=363dd151-b0dd-4bc5-b382-79bcb5edbb98</p>
<p>rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM quiet numa=off</p>
<p>nouveau.modeset=0

Modified into

Copy code

The code is as follows:

kernel /boot/vmlinuz-2.6.39-200.24.1.el6uek.x86_64 ro root=UUID=363dd151-b0dd-4bc5-b382-79bcb5edbb98</p>
<p>rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM quiet numa=off</p>
<p>nouveau.modeset=0 vga=ask

When finished, press enter to exit editing mode and press B to guide.

 

2. At this time, you will be prompted to press enter to view the optional display mode, and enter.

A table will be displayed, showing the corresponding values of code resolution and color depth, from which you can find the values suitable for your screen resolution and color depth, or your favorite resolution. than

If my resolution color depth is 1024x768x32, the corresponding value found in the table is 318. Note that the value just obtained is actually a hexadecimal number. You need to add 0x in front of it, such as me

318 of becomes 0 × 318。 Enter 0 × 318, and then press enter to see the graphical Plymouth guidance interface.

3. You can use this value as a parameter for each boot. Edit the / boot / grub / grub.conf file and add VGA = 0 × 318。

 

Copy code

The code is as follows:

# vim /etc/grub.conf

take

Copy code

The code is as follows:

kernel /boot/vmlinuz-2.6.39-200.24.1.el6uek.x86_64 ro root=UUID=363dd151-b0dd-4bc5-b382-79bcb5edbb98</p>
<p>rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM quiet numa=off</p>
<p>nouveau.modeset=0

Modified into

Copy code

The code is as follows:

kernel /boot/vmlinuz-2.6.39-200.24.1.el6uek.x86_64 ro root=UUID=363dd151-b0dd-4bc5-b382-79bcb5edbb98</p>
<p>rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM quiet numa=off</p>
<p>nouveau.modeset=0 vga=0x318

0 will be used every time after that × 318 corresponding resolution to enable Plymouth boot.

Plymouth hides the boot information. To view the boot information, press ESC during boot or view it in / var / log / boot.log after boot. You can also from the kernel

Delete rhgb from the command line (I always delete this), Plymouth will display all boot information, and there is a status icon in the login screen to view the boot warning.

Recommended Today

Supervisor

Supervisor [note] Supervisor – H view supervisor command help Supervisorctl – H view supervisorctl command help Supervisorctl help view the action command of supervisorctl Supervisorctl help any action to view the use of this action 1. Introduction Supervisor is a process control system. Generally speaking, it can monitor your process. If the process exits abnormally, […]