LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 21692|回复: 85

如何安装NVIDIA芯片的显卡驱动?

[复制链接]
发表于 2002-10-2 04:31:33 | 显示全部楼层 |阅读模式
小弟是头一次安装Nvidia驱动程序,看了很多有关帖子好像都不是我要的方法(注:系统搜索的驱动文件不同),请大师们指点一下好吗?

我运行 sh NVchooser.sh后提示
Please download and install the following files:
NVIDIA_kernel-1.0-3123.src.rpm
NVIDIA_GLX-1.0-3123.i386.rpm
此时我已将这两个文件下载了。
接着该如何做了,谢谢!
发表于 2002-10-2 04:33:37 | 显示全部楼层

本方法对所有NVIDIA的显卡都有效。前提是必须把kernel source安装上,如果弟兄们升级有错误可能就是gcc或者kernel source没有安装上。如果出现问题,就要把错误信息发上来,这样才能高效解决问题。发帖时不要忘记说自己的所用的版本,以及硬件信息等。多谢。

1]下载显卡的驱动tar包,只要是NVIDIA的,这两个包都适用:
www.linuxsir.cn/driver/nvidia/NVIDIA_GLX-1.0-3123.tar.gz
www.linuxsir.cn/driver/nvidia/NVIDIA_kernel-1.0-3123.tar.gz

安装:[经quanlinking兄指教,make时是有先后顺序的,要先make  NVIDIA_kernel-1.0-3123]

# tar zxvf NVIDIA_GLX-1.0-3123.tar.gz
# tar zxvf NVIDIA_kernel-1.0-3123.tar.gz
# cd NVIDIA_kernel-1.0-3123
# make
# cd NVIDIA_GLX-1.0-3123
# make


把/etc/X11中的XF86Config-4文件中的nv改成nvidia。其它注销项目,请见我的XF86Config-4文件。有些版本没有这个文件,可以修改XF86Config文件.
发表于 2002-10-2 04:36:43 | 显示全部楼层
/etc/X11/XF86Config-4文件,有些版本没有这个文件,可以修改XF86Config文件.
用下面的来参考



# File generated by anaconda.

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

Section "Files"

# 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.

RgbPath "/usr/X11R6/lib/X11/rgb"

# 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.
如果汉化就把路径加在这里,如果不汉化,就不要加了
FontPath "unix/:7100"

EndSection

Section "Module"
Load "xtt"如果汉化了,在加上这一句没有汉化就不要加了
Load "GLcore"在这句的前面,要加一个#号
Load "dbe"在这句的前面,要加一个#号
Load "extmod"
Load "fbdevhw"
Load "dri"在这句的前面,要加一个#号
Load "glx"
Load "record"
Load "freetype"如果汉化了,也在这句的前面,要加一个#号;没有用汉化,就不要加#号了
Load "type1"如果汉化了,也在这句的前面,要加一个#号;没有用汉化,就不要加#号了
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"

# Option "AutoRepeat" "500 5"

# when using XQUEUE, comment out the above line, and uncomment the
# following line
# Option "rotocol" "Xqueue"

# 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:nocaps"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc102"
Option "XkbLayout" "us"
Option "XkbVariant" "basic"
#Option "XkbOptions" ""
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "rotocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
HorizSync 30-62
VertRefresh 50-75
Option "dpms"在这句的前面,要加一个#号

# -- 1400x1050 --
# 1400x1050 @ 60Hz, 65.8 kHz hsync
Modeline "1400x1050" 129 1400 1464 1656 1960
1050 1051 1054 1100 +HSync +VSync

# 1400x1050 @ 70Hz, 76.8 kHz hsync
Modeline "1400x1050" 151 1400 1464 1656 1960
1050 1051 1054 1100 +HSync +VSync

# 1400x1050 @ 75Hz, 82.3 kHz hsync
Modeline "1400x1050" 162 1400 1464 1656 1960
1050 1051 1054 1100 +HSync +VSync

# 1400x1050 @ 85Hz, 93.2 kHz hsync
Modeline "1400x1050" 184 1400 1464 1656 1960
1050 1051 1054 1100 +HSync +VSync

EndSection

Section "Device"
# no known options
Identifier "NVIDIA GeForce 3 (generic)"
Driver "nv"在这里,要把nv改成nvidia
VendorName "NVIDIA GeForce 3 (generic)"
BoardName "NVIDIA GeForce 3 (generic)"

#BusID
EndSection

Section "Screen"
Identifier "Screen0"
Device "NVIDIA GeForce 3 (generic)"
Monitor "Monitor0"
DefaultDepth 24

Subsection "Display"
Depth 24
Modes "1024x768" "1024x768"
EndSubsection

EndSection

Section "DRI"
Mode 0666
EndSection
 楼主| 发表于 2002-10-2 04:50:03 | 显示全部楼层
非常感谢北南南北兄帮助,/etc/X11/XF86Config-4文件是对应Redhat7.3的,刚才我忘记说正在使用Redht8.0了,Redhat8.0下是不是修改/etc/X11/XF86Config文件呢?和原来的XF86Config-4相比有何区别呢?谢谢!
发表于 2002-10-2 04:53:07 | 显示全部楼层
兄弟不必客气,看我写的帖子就明白了。其实没有什么差别,你就改我加红字的地方就行了,我写的应该是比较清楚。
 楼主| 发表于 2002-10-2 05:00:21 | 显示全部楼层
谢谢!我还想问一下,如果编译修改后X不能启动的话有什么补救方法吗?如何恢复到原来的状态 。谢谢!
发表于 2002-10-2 05:04:30 | 显示全部楼层

忘记说了一下,无论改什么文件都要事先备份一下.这样就是出了问题,我们也能一下还原.
方法如下:[以RedHat 8.0的XF86Config文件来说明]

这是备份
#cp /etc/X11/XF86Config /etc/X11/XF86Config.BAK

如果我们升级失败了,就用下面这个命令来还原
#cp /etc/X11/XF86Config.BAK /etc/X11/XF86Config
这样就万无一失了。
 楼主| 发表于 2002-10-2 05:07:54 | 显示全部楼层
非常感谢!
 楼主| 发表于 2002-10-2 05:40:46 | 显示全部楼层
按照您上面说的步骤一一做完后。我的X不能启动了。现象是执行startx后只有左上角有一个很小的红方块闪呀闪的。什么都看不到。难道我修改的有问题吗?帮忙看一看。谢谢!
/etc/XF86Config文件内容:
# File generated by anaconda.

Section "ServerLayout"
        Identifier     "Anaconda Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Mouse1" "SendCoreEvents"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
# 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  "dri"
        Load  "glx"
        Load  "record"
        Load  "freetype" (好像Redhat8.0中文SIMSUN字体用到它所以我没注释掉)
        Load  "type1"
EndSection

Section "InputDevice"
#        Option        "AutoRepeat"        "500 5"
# when using XQUEUE, comment out the above line, and uncomment the
# following line
#        Option        "rotocol"        "Xqueue"
# 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"
        #Option        "XkbOptions"        ""
        Identifier  "Keyboard0"
        Driver      "keyboard"
        Option            "XkbRules" "xfree86"
        Option            "XkbModel" "pc105"
        Option            "XkbLayout" "us"        #Option        "XkbVariant"        ""
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option            "rotocol" "IMPS/2"
        Option            "Device" "/dev/psaux"
        Option            "ZAxisMapping" "4 5"
        Option            "Emulate3Buttons" "yes"
EndSection

Section "InputDevice"
        Identifier  "Mouse1"
        Driver      "mouse"
        Option            "Device" "/dev/input/mice"
        Option            "rotocol" "IMPS/2"
        Option            "Emulate3Buttons" "no"
        Option            "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
        HorizSync    30.0 - 66.0
        VertRefresh  50.0 - 110.0
#        Option            "dpms"
EndSection

Section "Device"
        # no known options
        #BusID
        Identifier  "RIVA TNT2"
        Driver      "nvidia"
        VendorName  "RIVA TNT2"
        BoardName   "RIVA TNT2"
        VideoRam    32768
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "RIVA TNT2"
        Monitor    "Monitor0"
        DefaultDepth     16
        SubSection "Display"
                Depth     16
                Modes    "800x600" "640x480"
        EndSubSection
EndSection

Section "DRI"
        Mode         0666
EndSection

还有 我在恢复时直接复制原XF86Config文件还不行,必须把其中的Load  "glx"注释掉才能启动。这和以前有什么区别吗?
发表于 2002-10-2 06:40:33 | 显示全部楼层
#Load "freetype" (好像Redhat8.0中文SIMSUN字体用到它所以我没注释掉)
#Load "type1"

这样试一下,如果把gxl注掉就不能用3D功能了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表