Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Nvidia graphics card driver under Linux

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to install Nvidia graphics card driver under Linux, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's learn about it!

Environment ManjaroRTX 2060

Download the driver installation package

Just search and download on the official website:

You can choose your own video card model. The author chooses the following reference:

Search for the download, which is followed by a .run file, plus execution permissions:

Sudo chmod uplix NVIDIA-Linux-x86_64-455.28.run is ready to install linux-header

Install linux-header before installation, and first obtain the kernel version number:

Uname-an inserts the picture description here

The author here is version 5.8, search linux-header and select version 5.8 to install:

The command is as follows:

Pacman-Ss linux-headersudo pacman-S linux58-headers disables Nouveau

Generally speaking, installing Manjaro automatically installs the open source video card driver Nouveau, which needs to be manually disabled to install the Nvidia driver. Create the following files:

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

Enter the following:

Blacklist nouveau

After adding blacklist, you can not enter the graphical interface, for the sake of safety, you can not delete the Nouveau driver to prevent misoperation can not enter the graphical interface.

Restart

Normally, you cannot enter the graphical interface after restart (the author cannot enter the environment of a single video card. Please test the uncertainty of the dual video card by yourself). After switching to the terminal through Ctrl+Alt+F2, enter:

Lsmod | grep nouveau

If there is no output, Nouveau is disabled.

Note that this step is important and must be disabled, otherwise the Nvidia driver cannot be installed.

Formal installation

After the following formal installation, restart and switch to the terminal through Ctrl+Alt+F2, and log in as root, enter the folder corresponding to the installation package, and install it:

. / NVIDIA-Linux-x86_64-455.28.run

If the following occurs at the terminal:

Indicates that the graphical interface is not closed, because Nouveau is disabled above, and you cannot enter the graphical interface. This situation generally occurs on computers with dual graphics cards. You can manually close the graphical interface:

Systemctl status lightdmsystemctl stop lightdm12

Installation has several simple options according to individual needs to choose yes or no, the installation process is very fast, you will be prompted to complete the installation of xxx complete, restart to enter the graphical interface.

Wrap-up work

After restarting and entering the graphical interface, you can enter

Nvidia-smi

To view the health status of the video card, enter

Nvidia-settings

You can view the configuration of the graphical interface:

In this way, even if the installation is complete, the author found that the dual-screen display needs to be manually set during the test, as shown in the following figure:

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

In addition, the setting of nvidia-settings is temporary, and you need root write permission to save to a file:

Sudo nvidia-settings

About the tearing of the picture

After installing the driver, the author used flameshot to take a screenshot, and the mouse basically couldn't move. I thought it was a screenshot tool, and it was the same with deepin-screenshot. Then I checked that this should be a phenomenon called "screen tearing". The author solved it through a simple setting:

Remember to save to a file.

The above is all the contents of the article "how to install Nvidia graphics card driver under Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report