centos6.10安装显卡驱动(显卡驱动安装教程)
一、驱动下载和安装依赖
驱动下载地址: https://www.nvidia.cn/geforce/drivers/ (选择自己显卡对应的版本)
yum -y install gcc kernel-devel "kernel-devel-uname-r == $(uname -r)" dkms "kernel-devel-uname-r == $(uname -r)"
修改/etc/modprobe.d/blacklist.conf 文件:
如果存在blacklist.conf,添加blacklist nouveau,注释掉blacklist nvidiafb;
如果不存在,执行:
echo -e "blacklist nouveau\noptions nouveau modeset=0" > /etc/modprobe.d/blacklist.conf
//修改运行级别为文本模式,无桌面环境可跳过此步
sudo systemctl set-default multi-user.target
//重新启动, 使用root用户登陆
reboot
查看操作系统的发行版号
uname -r
执行安装脚本
./NVIDIA-Linux-x86_64-450.57.run --kernel-source-path=/usr/src/kernels/3.10.0-1127.el7.x86_64 -k $(uname -r) --dkms -s
执行 nvidia-smi 看到以下信息说明安装成功
[root@localhost ~]# nvidia-smi
Tue Jul 21 22:55:12 2020
-----------------------------------------------------------------------------
| NVIDIA-SMI 450.57 Driver Version: 450.57 CUDA Version: 11.0 |
|------------------------------- ---------------------- ----------------------
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=============================== ====================== ======================|
| 0 GeForce GTX 960 Off | 00000000:04:00.0 Off | N/A |
| 37% 40C P0 29W / 120W | 0MiB / 4043MiB | 2% Default |
| | | N/A |
------------------------------- ---------------------- ----------------------
-----------------------------------------------------------------------------
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
-----------------------------------------------------------------------------
//设置运行级别
systemctl set-default graphical.target
//重启
reboot
免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com