Detailed explanation of deepin20 installation of NVIDIA closed source drive

  • 2021-08-31 09:50:49
  • OfStack

Step 1: Install the depth of the "graphics card driver"

In deepin v20 There is no graphics card driver manager by default, which requires command line installation. The command is as follows (at the beginning, there was a straight error. When I opened the application store for the first time, I could install it, which is amazing):


sudo apt install deepin-graphics-driver-manager

Install the deep "graphics driver", switch to the Intel default driver, and then restart twice. After confirming the success of the switch, proceed to the next step.

Step 2, uninstall NVIDIA open source driver

If the system has just been installed and nothing has been done, this step can be omitted.


sudo apt autoremove nvidia-*

Step 3, disable nouveau driver

This step is also the most critical, that is, prohibit nouveau driver, not much to say, on the code (remember to switch to root authority when opening the terminal).


 sudo dedit /etc/modprobe.d/blacklist.conf

In the open blacklist.conf Copy the following contents from the file and save it for closure:


blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off

After saving and closing the text, continue to enter the code in the terminal:


sudo update-initramfs -u

Ok, up to now, the preparatory work for installing NVIDIA graphics card with dual graphics cards has been completed!

Step 4: Install NVIDIA closed source drive

Step 1: Open the terminal, and under the authority of "root", use the command:


sudo apt install nvidia-driver

Then start to install the latest NVIDIA graphics card driver in the terminal. If you need to confirm the installation, just enter "y" and then enter the car.

After the installation of Step 1 is completed and before proceeding to Step 2, use the command:


lspci | egrep "VGA|3D"

Look at the first number displayed, the front of my NVIDIA graphics card shows "01:00:00", so the back "X: X: X" is replaced by "1: 0: 0" (according to what number is output by your computer, just compare and change it)

Step 2: Use the command:


sudo dedit /etc/X11/xorg.conf

Copy the contents under 1 in the open text (here you want to convert under 1: 01:00:00-- > 1: 0: 0, that is, PCI: 1: 0: 0):


 Section "Module"
  Load "modesetting"
 EndSection
 Section "Device"
  Identifier "nvidia"
  Driver "nvidia"
  BusID "PCI:X:X:X"  
  Option "AllowEmptyInitialConfiguration"
 EndSection

Step 3: Use the command:


sudo dedit ~/.xinitrc

Similarly, copy the following in the open text, and then save the closed text.


sudo apt autoremove nvidia-*
0

Step 4: Use the command:


sudo apt autoremove nvidia-*
1

Similarly, copy the following in the open text, and then save the closed text.


sudo apt autoremove nvidia-*
2

Step 5: Use the command to give the text run permission of "Step 4":


sudo chmod +x /etc/lightdm/display_setup.sh

Step 6: Use the command:


sudo apt autoremove nvidia-*
4

In the open text, find [Seat:*] This 1 line, and then in the [Seat:*] Add the following code under line:


sudo apt autoremove nvidia-*
5

Step 5, nvidia-smi Verification

By this point, all the installation work is over. Then restart the system. Enter at the terminal nvidia-smi After that, if the graphics card driver information is printed, the installation is successful.

If input at the terminal nvidia-smi If there is no response, you need to execute the following command:


sudo apt autoremove nvidia-*
6

An error may be reported that the dependency was not found, so just install the required dependency according to the prompt.


sudo apt autoremove nvidia-*
7

Performing an installation nvidia-smi Command, you can install it successfully.

Reference

All the above contents are based on https://bbs.deepin.org/forum.php? mod = viewthread & tid=192957 for backup for future installations.


Related articles: