Centos6.6安装Nvidia显卡驱动

1、根据nvidia显卡的具体型号,从官方网站下载驱动,我的是NVIDIA-Linux-x86-331.20.run
下载地址:http://www.geforce.cn/drivers
2、安装编译环境:gcc、kernel-devel、kernel-headers

[root@localhost ~]# yum -y install gcc kernel-devel kernel-headers

3、修改/etc/modprobe.d/blacklist.conf 文件,以阻止 nouveau 模块的加载
方法: 添加blacklist nouveau,注释掉blacklist nvidiafb
修改后内容如下:
#Listing a module here prevents the hotplug scripts from loading it.
#Usually that’d be so that some other driver will bind it instead,
#no matter which driver happens to get probed first. Sometimes user
#mode tools can also control driver binding.
#Syntax: see modprobe.conf(5).
#watchdog drivers
blacklist i8xx_tco
# framebuffer drivers
blacklist aty128fb
blacklist atyfb
blacklist radeonfb
blacklist i810fb
blacklist cirrusfb
blacklist intelfb
blacklist kyrofb
blacklist i2c-matroxfb
blacklist hgafb
#blacklist nvidiafb
blacklist rivafb
blacklist savagefb
blacklist sstfb
blacklist neofb
blacklist tridentfb
blacklist tdfxfb
blacklist virgefb
blacklist vga16fb
blacklist viafb
blacklist nouveau
# ISDN - see bugs 154799, 159068
blacklist hisax
blacklist hisax_fcpcipnp
# sound drivers
blacklist snd-pcsp
# I/O dynamic configuration support for s390x (bz #563228)
blacklist chsc_sch
4、重新建立initramfs image文件

[root@localhost ~]# mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak    

[root@localhost ~]# dracut /boot/initramfs-$(uname -r).img $(uname -r)

5、重启电脑

reboot now

6、输入root和password,进入根用户模式下,确保nouveau kernel driver没有被加载

[root@localhost ~]# lsmod | grep nouveau

7、进入驱动程序所在目录,开始安装

[root@localhost ~]# chmod +x NVIDIA-Linux-x86-331.20.run
[root@localhost ~]# ./NVIDIA-Linux-x86-331.20.run

安装过程中,根据提示选择accept,yes 或 OK,即可完成安装:
如果提示有旧驱动,询问是否删除旧驱动,选Yes;
如果提示缺少某某模块(modules),询问是否上网下载,选no;
如果提示编译模块,询问是否进行编译,选ok;
如果提示将要修改xorg.conf,询问是否允许,选Yes;
接下来就是等待安装完成。

文章目錄
|