硬件和操作系统环境
intel cpu芯片:
[root@centos7 ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
32 Intel(R) Xeon(R) CPU E5-2667 v2 @ 3.30GHz
显卡硬件情况:
[root@centos7 ~]# lspci | grep -i vga
0e:01.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200eW WPCM450 (rev 0a)
84:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1070 Ti] (rev a1)
操作系统情况:
[root@centos7 ~]# uname -r
3.10.0-1160.59.1.el7.x86_64
[root@centos7 ~]# uname -a
Linux centos7.9 3.10.0-1160.59.1.el7.x86_64 #1 SMP Wed Feb 23 16:47:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
安装nvidia驱动-屏蔽nouveau模块
解决直接安装时报错问题,需要屏蔽 nouveau 模块
yum erase kmod-nvidia
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum install yum-plugin-fastestmirror
vim /lib/modprobe.d/dist-blacklist.conf
填入:
#blacklist nvidiafb
blacklist nouveau
options nouveau modeset=0
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
dracut /boot/initramfs-$(uname -r).img $(uname -r)
lspci | grep nouveau
没有输出,说明屏蔽默认带有的nouveau成功。
安装nvidia驱动-显卡检测工具
yum install nvidia-detect nvidia显卡检测
nvidia-detect -v 检测结果
yum -y install kmod-nvidia 安装显卡驱动 这一步应该不需要
[root@centos7 ~]# nvidia-detect -v
Probing for supported NVIDIA devices...
[102b:0532] Matrox Electronics Systems Ltd. MGA G200eW WPCM450
[10de:1b82] NVIDIA Corporation GP104 [GeForce GTX 1070 Ti]
This device requires the current 510.47.03 NVIDIA driver kmod-