1 overview

Because some needs require installing a graphics driver on Linux, here’s how to do it.

2 the environment

  • Manjaro
  • RTX 2060

3 Download the driver installation package

Go to the official website to search and download, you can stamp here:

Choose your own graphics card model, I choose the following reference:

After downloading, a.run file will be added with execution permission:

Sudo chmod u + x NVIDIA - Linux - x86_64-455.28. The runCopy the code

4 Preparations

4.1 installationlinux-header

Install linux-header before installing the kernel.

uname -a
Copy the code

Search for linux-header and select version 5.8 to install:

The command is as follows:

pacman -Ss linux-header
sudo pacman -S linux58-headers
Copy the code

4.2 disableNouveau

In general, Manjaro will automatically install the open source graphics driver Nouveau. You need to manually disable it to install the Nvidia driver. Create the following files:

sudo vim /etc/modprobe.d/blacklist.conf
Copy the code

Enter the following information:

blacklist nouveau
Copy the code

After a blacklist is added, the GUI cannot be accessed. For insurance purposes, do not delete the Nouveau driver in case the GUI fails to be accessed due to misoperations.

4.3 restart

After the restart, it is normal to enter the graphical interface (I can not enter the single graphics card environment, dual graphics card is not sure please test yourself), switch to the terminal by Ctrl+Alt+F2 and enter:

lsmod | grep nouveau
Copy the code

If there is no output Nouveau is disabled.

Note that this step is important and must be disabled otherwise you will not be able to install Nvidia drivers.

5 Formal Installation

Restart the terminal, press Ctrl+Alt+F2 to switch to the terminal, log in to the terminal as root, and enter the corresponding folder of the installation package.

. / NVIDIA - Linux - x86_64-455.28. The runCopy the code

If the following situation occurs on the terminal:

Nouveau is disabled, so you can’t access the GUI. This situation usually occurs on computers with dual graphics cards. You can manually close the GUI:

systemctl status lightdm
systemctl stop lightdm
Copy the code

Installation has a few simple options according to personal needs to choose yes or no, the installation process is very fast, after completion of the installation will be prompted XXX complete, restart to enter the graphical interface.

6 Finishing up

Restart You can enter a value on the GUI

nvidia-smi
Copy the code

To view the graphics card health, enter

nvidia-settings
Copy the code

You can view the configuration of the GUI:

In this way, the installation is complete. In addition, the author found that the dual-screen display needs to be set manually during the test, as shown in the picture below:

You need to manually set the position of the two screens, otherwise they will overlap.

Nvidia-settings Settings are temporary, and you need root write permission to save to a file:

sudo nvidia-settings
Copy the code

7 about the picture tearing

After installing the driver, I use Flameshot screenshot are sad, the mouse basically can not move, thought it was a screenshot tool problem, change the deepin-screenshot is also like this, then go to check this should be a phenomenon called “screen tear”, I solved through a simple Settings:

Save it to a file.