作者 主題: 安裝 nvidia 出現問題了  (閱讀 5119 次)

0 會員 與 1 訪客 正在閱讀本文。

lfighter

  • 可愛的小學生
  • *
  • 文章數: 12
    • 檢視個人資料
    • http://lfighter.ceo.com.tw
安裝 nvidia 出現問題了
« 於: 2002-10-20 14:31 »
今天原本想在 Mandrake90 試試更新 nvidia 的 driver
結果變成無法進入 x-window 了    ^^|||


rpm --rebuild NVIDIA_kernel-1.0-3123.src.rpm
   結果顯示了:  /usr/lib/rpm/rpmb:No such file or directory

後來也重抓 NVIDIA_kernel-1.0-3123.mdk82up.i586.rpm 來試試
rpm -Uvh NVIDIA_kernel-1.0-3123.mdk82up.i586.rpm
   也更改了 /etc/X11/XF86Config-4 的內容
Load "glx"
Driver "nvidia"

重新啟動 x-window,只有出現以下的訊息,我該如何解決呢??
XFree86 Version 4.2.1 / X Window System
(protocol Version 11, revision 0, vendor release 6600)
Release Date: 3 September 2002
   If the server is older than 6-12 months, or if your card is
   newer than the above date, look for a newer version before
   reporting problems.  (See http://www.XFree86.Org/)
Build Operating System: Linux 2.4.18-23mdkenterprise i686 [ELF]
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
         (++) from command line, (!!) notice, (II) informational,
         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/XFree86.0.log", Time: Sun Oct 20 14:06:02 2002
(==) Using config file: "/etc/X11/XF86Config-4"
Parse error on line 105 of section ServerLayout in file /etc/X11/XF86Config-4
   "E:ndSection" is not a valid keyword in this section.
(EE) Problem parsing the config file
(EE) Error from xf86HandleConfigFile()

Fatal server error:
no screens found

我該如何解決呢??

Tetralet

  • 活潑的大學生
  • ***
  • 文章數: 370
    • 檢視個人資料
Re: 安裝 nvidia 出現問題了
« 回覆 #1 於: 2002-10-20 14:40 »
引述: "lfighter"
Parse error on line 105 of section ServerLayout in file /etc/X11/XF86Config-4
   "E:ndSection" is not a valid keyword in this section.


把在 XF86Config-4 中的 E:ndSection 改為 :EndSection 吧!

lfighter

  • 可愛的小學生
  • *
  • 文章數: 12
    • 檢視個人資料
    • http://lfighter.ceo.com.tw
安裝 nvidia 出現問題了
« 回覆 #2 於: 2002-10-20 15:22 »
感謝 Tetralet 的幫忙,多了":",應該是用 vi 不小心按到的  ^^||
現在還是有以下的問題

rpm --rebuild NVIDIA_kernel-1.0-3123.src.rpm
結果顯示了: /usr/lib/rpm/rpmb:No such file or directory

重新啟動 x-window後,出現以下的訊息

Build Operating System: Linux 2.4.18-23mdkenterprise i686 [ELF]
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
         (++) from command line, (!!) notice, (II) informational,
         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/XFree86.0.log", Time: Sun Oct 20 15:12:44 2002
(==) Using config file: "/etc/X11/XF86Config-4"
...............
(EE) NVIDIA(0): Failed to initialize the NVdriver kernel module!
(EE) NVIDIA(0):  *** Aborting ***
(II) UnloadModule: "nvidia"
(II) UnloadModule: "vgahw"
(II) Unloading /usr/X11R6/lib/modules/libvgahw.a
(EE) Screen(s) found, but none have a usable configuration.

Fatal server error:
no screens found

接下來我該如何解決?我已經找過所有的文章了 ><

Tetralet

  • 活潑的大學生
  • ***
  • 文章數: 370
    • 檢視個人資料
安裝 nvidia 出現問題了
« 回覆 #3 於: 2002-10-20 16:11 »
引述: "lfighter"
rpm --rebuild NVIDIA_kernel-1.0-3123.src.rpm
結果顯示了: /usr/lib/rpm/rpmb:No such file or directory


呀!我也不知道耶...
有請其它真正的高手....

引述: "lfighter"
(EE) NVIDIA(0): Failed to initialize the NVdriver kernel module!
(EE) NVIDIA(0):  *** Aborting ***


看到了嗎?
找不到 NVdriver 這一個 module。

似乎是您的 rpm 安裝失敗了。


怎麼辦?
去下載 *.tar.gz 來安裝比較快哦!


以下是我以前的筆記:


# 安裝 NVIDIA kernel 1.0-2960
tar -xvzf NVIDIA_kernel-1.0-2960.tar.gz
cd NVIDIA_kernel-1.0-2960

make install

# 將 module 的資訊寫入 /etc/modules.conf
echo alias char-major-195 NVdriver >> /etc/modules.conf
depmod -a


# 安裝 nVidia GLX 1.0-2960
tar -xvzf NVIDIA_GLX-1.0-2960.tar.gz
cd NVIDIA_GLX-1.0-2960

make install

# 修改 XF86Config-4。
# 將 Driver "nv" 改為 Driver "nvidia"
# 記得要將 Load  "dri" 這行刪掉


這樣子大概就可以了吧?
您可以試試看哦!

螢火飛

  • 酷!學園 學長們
  • 活潑的大學生
  • ***
  • 文章數: 400
    • 檢視個人資料
    • http://firefly.idv.tw
安裝 nvidia 出現問題了
« 回覆 #4 於: 2002-10-20 17:03 »
引述: "lfighter"
感謝 Tetralet 的幫忙,多了":",應該是用 vi 不小心按到的  ^^||
現在還是有以下的問題

rpm --rebuild NVIDIA_kernel-1.0-3123.src.rpm
結果顯示了: /usr/lib/rpm/rpmb:No such file or directory



唔!?似乎是新版 rpm 的問題。
您用的是 MDK 9.0,那麼 rpm 應該是最新版
新版的 rpm 將 build 功能分離出來
系統預設不安裝 build 套件,
請先把 rpmbuild-4*.rpm 安裝到系統中

再用 rpmbuild --rebuild NVIDIA_kernel  試試看
我應該是沒猜錯 ^^

lfighter

  • 可愛的小學生
  • *
  • 文章數: 12
    • 檢視個人資料
    • http://lfighter.ceo.com.tw
安裝 nvidia 出現問題了
« 回覆 #5 於: 2002-10-20 22:23 »
>rpm --rebuild NVIDIA_kernel-1.0-3123.src.rpm
>結果顯示了: /usr/lib/rpm/rpmb:No such file or directory
果然是新版 rpm 的問題,感謝 螢火飛 的提醒
MDK 9.0,新版的 rpm 將 build 功能分離出來
系統預設不安裝 build 套件,

安裝了 rpm-build 套件後,執行
rpm --build NVIDIA_kernel-1.0-3123.src.rpm
卻出現了以下的訊息, wa  la  問題不斷出現 ^^||

Installing NVIDIA_kernel-1.0-3123.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.92919
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.92919
echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -1`\" > nv_compiler.h
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wcast-qual -Wno-multichar  -O -MD -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE  -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=3123  -DNV_UNIX   -DNV_LINUX   -DNVCPU_X86       -I. -I/usr/src/linux/include -Wno-cast-qual nv.c
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.62039


RPM build errors:

lfighter

  • 可愛的小學生
  • *
  • 文章數: 12
    • 檢視個人資料
    • http://lfighter.ceo.com.tw
我把整個執行後的內容列出來好了
« 回覆 #6 於: 2002-10-21 00:02 »
rpm --rebuild NVIDIA_kernel-1.0-3123.src.rpm

Installing NVIDIA_kernel-1.0-3123.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.92172
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd /usr/src/RPM/BUILD
+ rm -rf NVIDIA_kernel-1.0-3123
+ /bin/gzip -dc /usr/src/RPM/SOURCES/NVIDIA_kernel-1.0-3123.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd NVIDIA_kernel-1.0-3123
+ exit 0
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd NVIDIA_kernel-1.0-3123
+ set +e
++ rpm -q --queryformat '%{VERSION}' rpm
+ RPMVERSION=4.0.4
++ echo 4.0.4
++ awk -F . '{print $1;}'
+ RPMMAJOR=4
++ echo 4.0.4
++ awk -F . '{print $2;}'
+ RPMMINOR=0
++ echo 4.0.4
++ awk -F . '{print $3;}'
+ RPMPATCH=4
+ '[' 4 -le 3 -a 0 -le 0 -a 4 -lt 4 ']'
+ make NVdriver
In file included from /usr/include/linux/prefetch.h:13,
from /usr/include/linux/list.h:6,
from /usr/include/linux/module.h:11,
from nv-linux.h:28,
from nv.c:14:
/usr/include/asm/processor.h:55: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/asm/processor.h:55: requested alignment is not a constant
In file included from /usr/include/linux/module.h:296,
from nv-linux.h:28,
from nv.c:14:
/usr/include/linux/version.h:2:2: #error "======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include or"
/usr/include/linux/version.h:12:2: #error " as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic link"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source directory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version.h to"
/usr/include/linux/version.h:23:2: #error " /lib/modules/`uname -r`/build/include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/version.h:26:2: #error " compiler option to use the correct include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error " instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error " Please adjust the Makefile accordingly."
/usr/include/linux/version.h:35:2: #error "======================================================="
In file included from nv-linux.h:28,
from nv.c:14:
/usr/include/linux/module.h:298: parse error before "UTS_RELEASE"
In file included from nv-linux.h:29,
from nv.c:14:
/usr/include/linux/version.h:2:2: #error "======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include or"
/usr/include/linux/version.h:12:2: #error " as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic link"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source directory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version.h to"
/usr/include/linux/version.h:23:2: #error " /lib/modules/`uname -r`/build/include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/version.h:26:2: #error " compiler option to use the correct include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error " instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error " Please adjust the Makefile accordingly."
/usr/include/linux/version.h:35:2: #error "======================================================="
In file included from nv.c:14:
nv-linux.h:31:40: missing binary operator before '('
nv-linux.h:33:42: missing binary operator before '('
nv-linux.h:35:42: missing binary operator before '('
nv-linux.h:37:42: missing binary operator before '('
nv-linux.h:39:42: missing binary operator before '('
nv-linux.h:43:4: #error This driver does not support 2.6.x or newer kernels!
In file included from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:45,
from nv-linux.h:64,
from nv.c:14:
/usr/include/linux/irq.h:65: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/irq.h:65: requested alignment is not a constant
In file included from /usr/include/linux/interrupt.h:45,
from nv-linux.h:64,
from nv.c:14:
/usr/include/asm/hardirq.h:16: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/asm/hardirq.h:16: requested alignment is not a constant
In file included from nv-linux.h:64,
from nv.c:14:
/usr/include/linux/interrupt.h:128: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/interrupt.h:128: requested alignment is not a constant
nv-linux.h:111:28: linux/autoconf.h: No such file or directory
nv.c:99:65: missing binary operator before '('
nv.c:697:65: missing binary operator before '('
nv.c:1011:65: missing binary operator before '('
nv.c:1040:65: missing binary operator before '('
nv.c:1383:65: missing binary operator before '('
nv.c: In function `nv_kern_mmap':
nv.c:1386: warning: implicit declaration of function `pgprot_writecombine'
nv.c:1386: incompatible types in assignment
nv.c:2926:65: missing binary operator before '('
make: *** [nv.o] Error 1
+ exit 0
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd NVIDIA_kernel-1.0-3123
+ rm -f /tmp/files.lst
+ '[' -z '' ']'
++ uname -r
+ export TARGET_KERNEL=2.4.19-16mdk
+ TARGET_KERNEL=2.4.19-16mdk
+ '[' -d /lib/modules/2.4.19-16mdk/kernel ']'
+ INSTALLPATH=/lib/modules/2.4.19-16mdk/kernel/drivers/video
+ mkdir -p /var/tmp/NVIDIA_kernel-1.0//lib/modules/2.4.19-16mdk/kernel/drivers/video
+ install -m 0444 NVdriver /var/tmp/NVIDIA_kernel-1.0//lib/modules/2.4.19-16mdk/kernel/drivers/video
install: cannot stat `NVdriver': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.84438 (%install)

ericbbs

  • 憂鬱的高中生
  • ***
  • 文章數: 166
    • 檢視個人資料
安裝 nvidia 出現問題了
« 回覆 #7 於: 2002-10-21 02:39 »
剛剛我也試了一下...
NVIDIA_kernel-1.0.3123.tar.gz
在make install ...一直錯誤...

NVIDIA_GLX則安裝正常...make install ok.

rpm的套件全裝上去...
--rebuild..還是說..沒這個指令..=.=

呀~~~X掛了2次了....
學長.....大大....有人成功嗎..^^

逸晨

  • 酷!學園 學長們
  • 俺是博士!
  • *****
  • 文章數: 1205
  • 我是逸晨
    • 檢視個人資料
安裝 nvidia 出現問題了
« 回覆 #8 於: 2002-10-21 04:00 »
落盡鉛華束長髮,一筆狂草稱女俠。
踏遍三江五湖路,更攜書劍闖天涯。
          ─ 螢火飛


呵呵~~~
螢火飛學姐也來嘍 ^_^
大夥努力挖寶吧  :wink:  :wink:  :wink:

lfighter

  • 可愛的小學生
  • *
  • 文章數: 12
    • 檢視個人資料
    • http://lfighter.ceo.com.tw
安裝 nvidia 出現問題了
« 回覆 #9 於: 2002-10-27 01:15 »
To build a custom NVIDIA_kernel rpm for your system, first ensure that
the headers for your kernel are installed (RedHat, for example includes
the kernel headers in an rpm called "kernel-source").

這是在 NVIDIA Accelerated Linux Driver Set README & Installation Guide
中所描述的一段話,我想應該是我本身的 Mandrake90 缺少了 kernerl headers,那我要如何將 kernerl headers 補齊??

lfighter

  • 可愛的小學生
  • *
  • 文章數: 12
    • 檢視個人資料
    • http://lfighter.ceo.com.tw
安裝 nvidia 出現問題了
« 回覆 #10 於: 2002-10-27 19:34 »
我嘗試將所有有關 kernel-headers 的套件都裝上後,
再將 NVIDIA_GLX 和 NVIDIA_kernel 移除

NVIDIA_kernel-1.0-3123.src.rpm 和 NVIDIA_GLX-1.0-3123.src.rpm
也都正常安裝, 無錯訊息,執行 startx 還是會有下列的錯誤訊息

(EE) NVIDIA(0): Failed to initialize the NVdriver kernel module!
(EE) NVIDIA(0):  *** Aborting ***
(II) UnloadModule: "nvidia"
(II) UnloadModule: "vgahw"
(II) Unloading /usr/X11R6/lib/modules/libvgahw.a
(EE) Screen(s) found, but none have a usable configuration.

Fatal server error:
no screens found



執行  /sbin/insmod NVdriver  , 檢查 nvidia kernel 是否能工作

/sbin/insmod NVdriver
Using /lib/modules/2.4.19-16mdk/kernel/drivers/video/NVdriver
insmod: a module named NVdriver already exists
也有存在啊,那為什麼不能進入 x-window???

執行 /sbin/lsmod

Module                  Size  Used by    Tainted: P  
NVdriver             1065920   0  (autoclean)

這是有在 run 了嗎??



要如何解決呢??

lfighter

  • 可愛的小學生
  • *
  • 文章數: 12
    • 檢視個人資料
    • http://lfighter.ceo.com.tw
安裝 nvidia 出現問題了
« 回覆 #11 於: 2002-10-30 23:37 »
執行 startx 還是會有下列的錯誤訊息

(EE) NVIDIA(0): Failed to initialize the NVdriver kernel module!
(EE) NVIDIA(0):  *** Aborting ***
(II) UnloadModule: "nvidia"
(II) UnloadModule: "vgahw"
(II) Unloading /usr/X11R6/lib/modules/libvgahw.a
(EE) Screen(s) found, but none have a usable configuration.

Fatal server error:
no screens found
----------------------------------------------------------------------------------
感謝 周星星 的提醒,我在 nvidia_Installation Guide 的 readme 中找到了  


Q: My X server fails to start, and my XFree86 log file contains the error:

   "(EE) NVIDIA(0): Failed to initialize the NVdriver kernel module!"

A: Nothing will work if the NVdriver kernel module doesn't function
   properly.  If you see anything in the X log file like "(EE) NVIDIA(0):
   Failed to initialize the NVdriver kernel module!" then there is
   most likely a problem with the NVdriver kernel module.  First, you
   should verify that if you installed from rpm that the rpm was built
   specifically for the kernel you are using.  You should also check
   that the module is loaded ('/sbin/lsmod'); if it is not loaded try
   loading it explicitly with 'insmod' or 'modprobe' (be sure to exit the
   X server before installing a new kernel module).  If you receive errors
   about unresolved symbols, then the kernel module has most likely been
   built using header files for a different kernel revision than what
   you are running.  You can explicitly control what kernel header files
   are used by building NVdriver from the NVIDIA_kernel tar file with:
   'make install SYSINCLUDE=/path/to/kernel/headers'.

   Please note that the convention for the location of kernel
   header files is in a state of transition, as is the location
   of kernel modules.  If the kernel module fails to load properly,
   modprobe/insmod may be trying to load an older kernel module (assuming
   you've upgraded).  cd'ing into the directory with the new kernel
   module and doing 'insmod ./NVdriver' may help.

   Another cause may be that the /dev/nvidia* device files may
   be missing.

   Finally, the NVdriver may print error messages indicating a problem --
   to view these messages please check /var/log/messages, or wherever
   syslog is directed to place kernel messages.


我在 /var/log/messages 中發現了這麼一段訊息:
Oct 30 22:15:02 mt kernel: nvidia: Can't find an IRQ for your NVIDIA card!
Oct 30 22:15:02 mt kernel: nvidia: Please check your BIOS settings.
Oct 30 22:15:02 mt kernel: nvidia: [Plug & Play OS   ] should be set to NO
Oct 30 22:15:02 mt kernel: nvidia: [Assign IRQ to VGA] should be set to YES
Oct 30 22:15:02 mt kernel: nvidia: loading NVIDIA Linux x86 NVdriver Kernel Mod
                                                                               
其中要將 BIOS 的 [Assign IRQ to VGA] Enable
                                                                               
重新開機後,我終於看到了傳說中的 Nvidia logo,  哇~ 真是太美了 wuwu    ^^y