歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> RHEL6上安裝Nvidia顯卡驅動

RHEL6上安裝Nvidia顯卡驅動

日期:2017/2/28 16:01:32   编辑:Linux教程

一:下載nvidia顯卡驅動,從nvidia的官方網站根據顯卡的型號下載相應的驅動文件
http://www.nvidia.cn/Download/index.aspx?lang=cn

二:在字符界面下(運行級3)運行驅動安裝程序,在RHEL6上因為Nouveau的關系會出現下面的錯誤,因此需要將該模塊禁用掉
[root@rhel6 ~]# sh NVIDIA-Linux-x86_64-275.09.07.run
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 275.09.07....................................................................................................................


Please read the following LICENSE and then select either "Accept" to accept the license and continue with the installation, or select "Do Not Accept" to abort the installation.

Accept Do Not Accept

ERROR: The Nouveau kernel driver is currently in use by your system. This driver is incompatible with the NVIDIA driver, and must bedisabled before proceeding. Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.

[root@rhel6 ~]# lsmod |grep nouveau
nouveau 537914 1
ttm 46942 1 nouveau
drm_kms_helper 32113 1 nouveau
drm 200778 3 nouveau,ttm,drm_kms_helper
i2c_algo_bit 5664 1 nouveau
video 20966 1 nouveau
i2c_core 31274 5 i2c_nforce2,nouveau,drm_kms_helper,drm,i2c_algo_bit

將該模塊加入黑名單:
[root@rhel6 ~]# tail -1 /etc/modprobe.d/blacklist.conf
blacklist nouveau

備份原先的初始化內存文件系統
[root@rhel6 ~]# mv /boot/initramfs-2.6.32-71.el6.x86_64.img /boot/initramfs-2.6.32-71.el6.x86_64.img.orig

使用dracut命令重新生成initramfs文件,並重啟
[root@rhel6 ~]# dracut -v /boot/initramfs-2.6.32-71.el6.x86_64.img 2.6.32-71.el6.x86_64
[root@rhel6 ~]# reboot

重啟後發現該模塊依然被加載
[root@rhel6 ~]# lsmod |grep nouveau
nouveau 537914 1
ttm 46942 1 nouveau
drm_kms_helper 32113 1 nouveau
drm 200778 3 nouveau,ttm,drm_kms_helper
i2c_algo_bit 5664 1 nouveau
video 20966 1 nouveau
powernow_k8 16298 0
freq_table 4847 2 cpufreq_ondemand,powernow_k8
i2c_core 31274 5 nouveau,drm_kms_helper,drm,i2c_algo_bit,i2c_nforce2

在grub.conf文件中將改模塊加入黑名單
[root@rhel6 ~]# grep -1 default /etc/grub.conf
rdblacklist=nouveau
default=1
timeout=1
將nouveau.ko內核對象文件移除
[root@rhel6 ~]# mv /lib/modules/2.6.32-71.el6.x86_64/kernel/drivers/gpu/drm/nouveau/nouveau.ko /tmp

重啟後發現該模塊以及沒有被加載了
[root@rhel6 ~]# reboot
[root@rhel6 ~]# lsmod |grep no
powernow_k8 16298 0
freq_table 4847 2 cpufreq_ondemand,powernow_k8

接下來就可以在字符界面一路回車將顯卡驅動裝好了,但移除nouveau.ko文件後,RHEL6啟動界面將會變成進度條形式,原來的光圈啟動將會消失!

三:測試

Copyright © Linux教程網 All Rights Reserved