Under Ubuntu16.04 Nvidia graphics driver installation process and experiences

EDITORIAL

Before installing the system on Ubuntu16.04 Nvidia graphics driver encountered many problems of his own, find a lot, but all aspects are not comprehensive enough, there are many pits and problems, hereby make a note for future reference later.

Process Nvidia card installed substantially at Ubuntu16.04

I think that before installing the driver should take to sort out the logical drive installed, I think it will have a better understanding of the processing driver problem.

How to understand the driving

  • Drive is the hardware abstraction layer of software come out first, only adding to the hardware drivers, operating systems in a unified way to access the hardware, so the driver of its strong dependence on hardware
    , software and hardware that is driving a hint do not match, the final show does not work, so when you install the graphics driver, driver version is very important! It is also associated with a problem I encountered, it will be mentioned below.

Integrated graphics and discrete graphics

  • Integrated graphics are generally integrated into the motherboard, no memory, but the memory will be used. Because the presence of integrated graphics, even without using a separate graphics card, such as Nvidia series of the GPU, can normally display and use, but as also Xiao also lost because of the presence of integrated graphics, when you have is Nvidia card package driving various problems occur
  • Nvidia discrete graphics card is, at the same time we have to realize that Nvidia drivers are not open source, Ubuntu systems can be integrated Nvidia graphics card driver is a third party open source software nouveau, this software is not a good driver Nvidia graphics card, while the installation of when genuine Nvidia graphics driver, driver installation will also affect the final success, so this is the reason we should realize nouveau disabled when installing Nvidia graphics driver.

Installation Steps Nvidia card Ubuntu16.04

1. Disable the nouveau driver

Some tutorial is the first step in using the sudo apt-get updatesoftware update system-dependent, and I think this can be added from time to increase, our main question should first clear the system comes with the nouveau driver.

  • First check whether the nouveau driver is loaded kernel
// 一般在没有禁用之前,输入下列会输出结果
lsmod | grep nouveau
  • The nouveau blacklist
sudo vim /etc/modprobe.d/blacklist.conf
// 將blacklist nouveau加入文件最后
// 插曲:对于刚安装的Ubuntu系统可能没有默认自带vim,可以使用命令 sudo apt-get install vim 进行安装

// 更新一下内核
sudo update-initramfs -u
// 更新内核后需重启电脑!

// 再次检查nouveau是否被禁用
lsmod | grep nouveau
// 此时应当没有任何输出结果

Note: If the check nouveau driver output of that command is still there, then you should be a case of extraordinary circumstances, and can be disabled by removing nouveau.ko nouveau and nouveau.ko.org file method, the command is as follows:

// 注意4.8.0-36-generic是你安装的系统对应的内核
cd /lib/modules/4.8.0-36-generic/kernel/drivers/gpu/drm/nouveau
sudo rm -rf nouveau.ko
sudo rm -rf nouveau.ko.org
// 之后再更新一下内核,并检查nouveau是否禁用

2. Download the Nvidia graphics driver

After completing the first step of disabling nouveau driver, we can now know as the Nvidia discrete graphics card has no driver software, and that is not invoked by the processor for display work, and now the show is to call the host computer's integrated graphics to complete . So the rest of us work is relatively clear is to install the corresponding driver software to play, so that the processor can call Nvidia graphics display to complete the job. Here we use the work after manually download the Nvidia graphics driver software to complete, as another method of using PPA sources, we discuss the issue later on.

  • Nvidia corresponding model query

    query graphics model is to go to the official website to download the appropriate driver software, there are two ways to query:
  1. There is no model look directly related to the information on the card, write down the model
  2. If your video card has been fitted to the inside of the main chassis, open is not very convenient, and that can be queried in Ubunutu system
// 输入命令查询Nvidia显卡型号
lspci | grep NVIDIA

Output is as follows:
Here Insert Picture Description
the first row comprises Nvidia i.e. graphics models. However, it should be noted that some specific models can be exported as GeForce RTX 2070, sometimes numbering only output PCI, PCI ID card as the figure above is 1f07, this case need not worry, go to this site query.
Here Insert Picture Description
Here Insert Picture Description

  • OK! Now that we know the card model, so you can go directly to Nvidia's official website download.
  • Our driver software downloaded from the official website .run file itself is not directly run the need to modify the properties. Right-click the downloaded driver files, enter the property
    Here Insert Picture Description

    check 可以作为可执行文件打选项to

3. Install the Nvidia graphics driver software

Now for the final step of the driver installation, you can follow the steps to

  • Installation beat Nvidia driver before uninstalling
// 如果之前没安装过驱动可跳过
sudo apt-get remove --purge nvidia-*
  • Command Line Interface press Ctrl + Alt + F1, and then enter the command to close the graphical interface
sudo service lightdm stop
  • Driven file directory, run the driver file
sudo ./NVIDIA-Linux-x86_64-384.90.run –no-x-check –no-nouveau-check –no-opengl-files

Note: Be sure to bring these parameters! ! !

含义如下:
–no-x-check:安装驱动时关闭X服务
–no-nouveau-check: 安装驱动时禁用nouveau
–no-opengl-files: 只安装驱动文件,不安装OpenGL文件

4. Check the driver is successfully installed

Check whether the drive is successful, this step is very important! ! !

// 运行命令检查驱动
nvidia-smi

If the run command output results are as follows, the driver installation was successful!
Here Insert Picture Description
Otherwise, the driver installation failed! Attention please! After driver installation fails you must first run the uninstall command to uninstall the driver just installed

sudo apt-get remove --purge nvidia-*

If you do not uninstall both cases occur:

1.如果你是Ubuntu引导的双系统,那么重启进入Ubuntu后会黑屏,且有光标闪烁。在我看来这是因为安装完驱动后,处理器不调用集成显卡而开始调用Nvidia显卡进行工作,但是驱动是安装不成功的,也就意味着处理器不能成功使用显卡,所以结果无法正常显示。
2.如果你是其他系统引导的双系统,如win7,那么重启后无法进入Ubuntu系统。

而这两种情况都是由于驱动安装不成功引起的,这也就是我不推荐PPA源安装方法的原因,因为使用PPA源可能会安装版本不对而导致驱动安装失败打情况!

Solution: Reboot into the BIOS settings, the secure boot open (just when we install the drivers by default are not open secure boot), so Nvidia driver will not be using ubuntu system, you can re-re-enter the system.

Released three original articles · won praise 0 · Views 118

Guess you like

Origin blog.csdn.net/le_more/article/details/104082643