CentOS7 安装 GeForce RTX 2080 Ti 驱动

摘要

CentOS7 采用手动方式安装 RTX 2080 ti 驱动。

下载NVIDIA官方驱动

到NVIDIA的官方驱动网站下载对应显卡的驱动程序,下载后的文件格式为run。

https://www.geforce.cn/drivers

bios禁用禁用secure boot,也就是设置为disable

如果没有禁用secure boot,会导致NVIDIA驱动安装失败,或者不正常。

https://www.technorms.com/45538/disable-enable-secure-boot-asus-motherboard-uefi-bios-utility

禁用nouveau(未验证)

1
2
3
4
5
6
7
8
9
10
11
12
13
[root@iflysse123 ~]# lshw -numeric -C display
*-display UNCLAIMED
description: VGA compatible controller
product: NVIDIA Corporation [10DE:1E07]
vendor: NVIDIA Corporation [10DE]
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list
configuration: latency=0
resources: memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff

观察 configuration 中是否有一项 driver=nouveau,如果有,就需要禁用掉 nouveau

打开编辑配置文件:

/etc/modprobe.d/blacklist.conf

在最后一行添加:

blacklist nouveau

这一条的含义是禁用nouveau第三方驱动,之后也不需要改回来。

由于nouveau是构建在内核中的,所以要执行下面命令生效:

update-initramfs -u

mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
dracut -v /boot/initramfs-$(uname -r).img $(uname -r)

停止可视化桌面

为了安装新的Nvidia驱动程序,我们需要停止当前的显示服务器。最简单的方法是使用telinit命令更改为运行级别3。执行以下linux命令后,显示服务器将停止,因此请确保在继续之前保存所有当前工作(如果有):

telinit 3

验证

1
2
3
4
5
6
7
8
9
10
11
12
13
[root@iflysse123 home]# lshw -numeric -C display
*-display
description: VGA compatible controller
product: NVIDIA Corporation [10DE:1E07]
vendor: NVIDIA Corporation [10DE]
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:16 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff

#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[root@iflysse123 home]# nvidia-smi
Fri Nov 9 17:14:38 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.73 Driver Version: 410.73 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 208... Off | 00000000:01:00.0 Off | N/A |
| 32% 40C P0 56W / 280W | 0MiB / 10989MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

参考

https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-centos-7-linux
https://blog.csdn.net/wf19930209/article/details/81877822