安装nvidia驱动过程较为复杂,可参考如下:
安装完成后,重启启动,查看nvidia模块是否正常启动:
[root@guptest system]# lsmod |grep nvidia*
nvidia_uvm 888832 4
nvidia_drm 45056 0
nvidia_modeset 1089536 1 nvidia_drm
nvidia 14045184 482 nvidia_uvm,nvidia_modeset
ipmi_msghandler 57344 4 ipmi_devintf,ipmi_si,nvidia,ipmi_ssif
drm_kms_helper 196608 2 mgag200,nvidia_drm
drm 458752 5 drm_kms_helper,mgag200,nvidia_drm,ttm
如果没有,需要创建启动脚本
/etc/rc.d/rc.local
-
#!/bin/bash
-
-
/sbin/modprobe nvidia
-
-
if [ "$?" -eq 0 ]; then
-
# Count the number of NVIDIA controllers found.
-
NVDEVS=`lspci | grep -i NVIDIA`
-
N3D=`echo "$NVDEVS" | grep "3D controller" | wc -l`
-
NVGA=`echo "$NVDEVS" | grep "VGA compatible controller" | wc -l`
-
-
N=`expr $N3D + $NVGA - 1`
-
for i in `seq 0 $N`; do
-
mknod -m 666 /dev/nvidia$i c 195 $i
-
done
-
-
mknod -m 666 /dev/nvidiactl c 195 255
-
-
else
-
exit 1
-
fi
-
-
/sbin/modprobe nvidia-uvm
-
-
if [ "$?" -eq 0 ]; then
-
# Find out the major device number used by the nvidia-uvm driver
-
D=`grep nvidia-uvm /proc/devices | awk '{print $1}'`
-
-
mknod -m 666 /dev/nvidia-uvm c $D 0
-
else
-
exit 1
-
fi
修改/lib/systemd/system/rc-local.service,增加内容如下:
[Install]
WantedBy=multi-user.target
执行如下命令;
systemctl enable rc-local.service
阅读(12272) | 评论(0) | 转发(0) |