CentOS 6下Nvidia显卡驱动程序的安装整理总结

1.根据nvidia显卡的具体型号,从官方网站下载驱动 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.修改/etc/inittab,使系统开机进入init 3文本模式:将最后一行“id:5:initdefault:”修改成“id:3:initdefault:”(不包含引号)
注释:5代表系统启动时默认进入x-window图形界面,3代表默认进入终端模式。

6.重启

[root@localhost ~]# reboot now

7.输入root和password,进入根用户模式下,确保nouveau kernel driver没有被加载
[root@localhost ~]# lsmod | grep nouveau


8.先su切换进root模式,进入驱动程序所在目录,开始安装

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


根据提示选择accept,yes 或 OK,其中有一个选择,是说32位的问题,这里选择no。

安装过程中会报错!! 错误为:unable to find the kernel source tree for the currently running kernel.........

将上述语句换成:

# ./NVIDIA-XXXX.run --kernel-source-path=/usr/src/kernels/内核号(2+Tab键  自动出现)
即可解决该错误


上述错误没了,但是新的错误产生了:unable to load the kernel module 'nvidia.ko' .........

怎么办???在改。将上述语句改成:

# ./NVIDIA-XXXX.run --kernel-source-path=/usr/src/kernels/内核号  -k $(uname -r)

9.安装完成后,再修改/etc/inittab,回到界面模式





猜你喜欢

转载自blog.csdn.net/hzt12345hf/article/details/48557933