|
在Linux的世界里……我是个菜鸟。本想写个详细点的提问贴,请教一下如何装显卡驱动。谁知写着写着却把驱动装好了,所以提问贴就变成了下面的菜鸟教程,每一步都那么详细,适合菜鸟看。如果有错误的地方请大虾们指出,偶第一次写教程。谢谢
注意:本教程系统环境为RH9,内核4.20-8 没有升级过。在2.6内核环境下安装请另外下载驱动,方法差不多,具体请看官方的Readme。
一、准备工作
首先在这里下载5328驱动
http://www.nvidia.com/object/linux_display_ia32_1.0-5328
直接下载地址是
http://download.nvidia.com/XFree ... 6-1.0-5328-pkg1.run
官方的说明是
Install
Type "sh NVIDIA-Linux-x86-1.0-5328-pkg1.run" to install the driver, then edit your X86Config file as appropriate. See the text README for more detailed instructions.
上面说到的README在这里
ftp://download.nvidia.com/XFree86/Linux-x86/1.0-5328/README
官方说明文档的确很详细,从安装驱动到编辑 XF86Config文件都说得很详细,甚至有各个部分的FAQ,如果英文不错请详细阅读,如果按照这个方法安装不成功也可按照README找解决方法。
二、安装驱动
1、开机设定
首先修改#vi /etc/inittab 设定启动到文字界面(不启动xwindow)
将 id:5:initdefault: 一行中的5改为3
2、安装
开机后用root登陆,进入存放刚才下载保存驱动的目录
#sh NVIDIA-Linux-x86-1.0-5328-pkg1.run
然后看到安装提示,按同意继续,完成后退出。
3、编辑XF86Config文件
为了保险起见,我的做法是先拷贝一份,要是修改失败还可以恢复
#cp /etc/X11/XF86Config /root
然后修改
#vi /etc/X11/XF86Config
在XF86Config中找到下面部分修改
Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"---------------------------如果没有的话添加这项
Load "record"
Load "freetype"
Load "type1"
# Load "GLcore"---------------------注释掉(我装好后没这项)
# Load "dri" -------------------------注释掉
Section "Device"
Identifier "Videocard0"
Driver "nvidia"-----------------------这里nv改为nvidia
VendorName "Videocard vendor"
BoardName "NVIDIA GeForce 2 MX (generic)"
三、安装后步骤
1、编辑开机设定
把第一步中改掉的/etc/inittab文件改回来
我是做了这一部才看到Logo的,这才证实驱动已经安装
原来我没有这样做就没看到Logo,也许是个问题。也许是我的机太快startx的时候没看到。总之,这步应该不是必须的。
2、重启
#reboot
重启后应该就能在出现登陆画面前看到nvidia的Logo一闪而过,听大虾们说这就是安装好驱动了,我不是大虾我也不知道,但是玩着就没觉得有什么不同,因为我不会打开OpenGL,也不会装Q3.
===============================================
下面是我的XF86Config文件
# XFree86 4 configuration created by redhat-config-xfree86
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
# RgbPath is the location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "unix/:7100"
EndSection
Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
# Load "dri"
EndSection
Section "InputDevice"
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# Or if you just want both to be control, use:
# Option "XkbOptions" "ctrl:nocaps"
#
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
EndSection
Section "InputDevice"
# If the normal CorePointer mouse is not a USB mouse then
# this input device can be used in AlwaysCore mode to let you
# also use USB mice at the same time.
Identifier "DevInputMice"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Lite-On B1770NSL"
DisplaySize 320 240
HorizSync 30.0 - 69.0
VertRefresh 50.0 - 120.0
Option "dpms"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "nvidia"
VendorName "Videocard vendor"
BoardName "NVIDIA GeForce 2 MX (generic)"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Section "DRI"
Group 0
Mode 0666
EndSection |
|