备忘录

记录学习过、研究过、使用过和总结过的内容,以备不时之需

统计

留言簿(4)

积分与排名

其它

技术网站

牛人博客

阅读排行榜

评论排行榜

(原创)RHEL 6.3安装NVIDIA官方驱动

一、本地环境:
1、显卡:ASUS ENGTX460
GPU品牌:NVIDIA
GPU型号:nVIDIA GeForce GTX 460

2、显示器:Samsung S24A350H
最佳分辨率:1920*1080
水平刷新率:30 kHz ~ 82 kHz
垂直刷新率:55 到 75 赫兹

3、操作系统:Red Hat Enterprise Linux 6.3 (x86)

二、安装步骤
1、安装Linux系统
下载RHEL6.3的ISO文件,刻录成系统光盘后,进行安装,具体安装过程略。

2、Linux系统的相关包
安装驱动,需要kernel相关包,和一些编译源码的工具包:
kernel、kernel-devel、kernel-doc、kernel-headers、gcc\*、glibc\*、glibc-\*

3、下载NVIDIA官方驱动
登录NVIDIA官方网站http://www.nvidia.com,下载对应的显卡驱动NVIDIA-Linux-x86-310.32.run,
本人的情况是:GeForce --> GeForce 400 Series --> GeForce GTX 460 --> Linux 32-bit --> English(US),当前最新版本是310.32

4、关闭Linux的自带驱动
REHL6.3默认安装了第三方开源nvidia驱动nouveau,需要通过加入黑名单将其禁用掉,
使用vi打开/etc/modprobe.d/blacklist.conf,在内容末尾增加一行:blacklist nouveau
保存并退出

5、Linux系统initramfs重建
使用dracut重新建立initramfs image file:
# mv /boot/initramfs-$(uname -r).img  /boot/initramfs-$(uname -r).img.bak
重新建立 the initramfs file:
# dracut -v /boot/initramfs-$(uname -r).img $(uname -r)

6、调整启动模式
用vi打开/etc/inittab,修改启动模式为3(文本模式):id:3:initdefault:
修改完毕后保存退出,使用reboot重启

7、安装NVIDIA官方驱动文件:
使用root帐号登录(重启后的文本模式)系统,进行/tmp目录(我的NVIDIA-Linux-x86-310.32.run存放在/tmp目录里),执行命令:
[root@RHEL-6 tmp]# chmod +x NVIDIA-Linux-x86-310.32.run
[root@RHEL-6 tmp]# ./NVIDIA-Linux-x86-310.32.run
安装过程中,选择“Accept”和“YES”后,即可。

8、调整启动模式
用vi打开/etc/inittab,修改启动模式为5(X模式):id:5:initdefault:
修改完毕后保存退出,使用reboot重启

9、判断驱动安装是否成功
Linux重启后,登录系统,进入X-window界面,“系统“的”首选项”中出现“NVIDIA X Server Settings”,并且
“系统“的”首选项”中“桌面效果”可设置3D加速,表明NVIDIA官方驱动安装成功

10、调整分辨率
驱动安装成功后,但是(我的)桌面的分辨率极差,并且(在“首选项”中的”NVIDIA X Server Settings“或“桌面”都)不可调。
此时,我手动修改/etc/X11/xorg.conf文件,修改后的内容如下:(红色处表示修改)
----------------------------------------------------------xorg.conf文件内容开始-----------------------------------------------------
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 310.32  (buildmeister@swio-display-x86-rhel47-09)  Mon Jan 14 15:46:49 PST 2013

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    FontPath        "/usr/share/fonts/default/Type1"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from data in "/etc/sysconfig/keyboard"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XkbLayout" "us"
    Option         "XkbModel" "pc105"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Samsung"
    ModelName      "S24A350H"
    HorizSync       30.0 - 82.0
    VertRefresh     55.0 - 75.0
    Option         "DPMS"
    UseModes       "Modes0"
EndSection

Section "Modes"
    Identifier     "Modes0"      
    Modeline       "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Viewport 0 0
        Depth       24
        Modes        "1920x1080_60.00"
    EndSubSection
EndSection
----------------------------------------------------------xorg.conf文件内容截止-----------------------------------------------------

说明:
a、Section "Monitor"中,VendorName表示显示器生产商,ModelName表示显示器型号,HorizSync表示水平刷新率,VertRefresh表示垂直刷新率

b、Section "Modes"中的Modeline来源于下面这个命令:
[root@RHEL-6 桌面]# gtf 1920 1080 60
这个命令的执行结果如下:
  # 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
  Modeline "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync

gtf具体是什么,可以自己去查查资料

c、Section "Screen"中的
("1920x1080_60.00")要与上面Section "Modes"中的Modeline保持一致。

11、保存文件并重启,待登录后,系统界面已经是1920*1080_60了。

posted on 2013-02-07 01:25 雪山飞狐 阅读(2200) 评论(1)  编辑  收藏 所属分类: 其它

评论

# re: (原创)RHEL 6.3安装NVIDIA官方驱动 2013-05-13 15:47 kxd

在system--->preferences--->NVIDIA X Server Settings中出现“You do not appear to be using the NVIDIA X driver. Please edit your X configuration file (just run `nvidia-xconfig` as root), and restart the X server.”,按照提示做,仍然不能解决问题,能不能给在下一些解决的建议,谢谢。  回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航: