免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123下一页
最近访问板块 发新帖
查看: 8704 | 回复: 29
打印 上一主题 下一主题

[FreeBSD] [求助]nvidia GeForce 7300 GT on FreeBSD 6.2-RELEASE amd64 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-01-25 15:25 |只看该作者 |倒序浏览
Pentium D 2.8G Dual-Core
nvidia GeForce 7300 GT ( 256M 128bits )

已经安装完毕 FreeBSD 6.2 amd64 版本,已更新了 src tree 和 ports tree,重编译了内核
在安装显卡驱动的时候碰到了难题
FreeBSD 6.2 所带的 xorg-server 是 xorg-server-6.9.0_5,其中的nv驱动(nv_drv.so)貌似不支持7300GT
在 /usr/ports/x11/nvidia-driver 下面 make 报如下错误

  1. ===>  nvidia-driver-1.0.9746 is only for i386, and you are running amd64..
  2. *** Error code 1

  3. Stop in /opt/ports/x11/nvidia-driver.
复制代码


查了2天文章,几乎一无所获,仅找到一篇极为含糊的文章说编译驱动并启动 X 成功,于是按照文中描述多次尝试,终于编译成功,但是启动 X 失败,过程如下:
1、下载 X11R6.9.0-src.tar.bz2 并解包
2、下载了xf86-video-nv-1.2.2.1.tar.bz2,解包,并将其src目录下的 nv_* 复制到了 xc/programs/Xserver/hw/xfree86/drivers/nv
3、在 xc 下用 make World 创建了所有必须的 Makefile 和软连接、头文件等
4、进入 xc/programs/Xserver/hw/xfree86/drivers/nv
5、操作如下

  1. -su-2.05b# pwd
  2. /opt/nvdrv/xc/programs/Xserver/hw/xfree86/drivers/nv

  3. 修改 Makefile,加上
  4. -DUSE_LIBC_WRAPPER

  5. 修改 nv_driver.c,加上
  6. #define PACKAGE_VERSION_MAJOR           1
  7. #define PACKAGE_VERSION_MINOR           2
  8. #define PACKAGE_VERSION_PATCHLEVEL      2

  9. make

  10. -su-2.05b# ls -al nv_drv.so
  11. -rwxr-xr-x  1 root  800  116198 Jan 25 14:24 nv_drv.so

  12. -su-2.05b# file nv_drv.so
  13. nv_drv.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (FreeBSD), not stripped

  14. -su-2.05b# cp nv_drv.so /usr/X11R6/lib/modules/drivers/
  15. -su-2.05b#
复制代码


运行 Xorg -configure 创建了 /root/xorg.conf.new
用 X -config /root/xorg.conf.new 检查配置文件

  1. -su-2.05b# clear
  2. -su-2.05b# X -config /root/xorg.conf.new
  3. _XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
  4. _XSERVTransOpen: transport open failed for inet6/bsd64.Neil.Xian:0
  5. _XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

  6. X Window System Version 6.9.0
  7. Release Date: 21 December 2005
  8. X Protocol Version 11, Revision 0, Release 6.9
  9. Build Operating System: FreeBSD 6.2 amd64 [ELF]
  10. Current Operating System: FreeBSD bsd64.Neil.Xian 6.2-RELEASE FreeBSD 6.2-RELEASE #1: Tue Jan 23 03:50:03 CST 2007     root@bsd64.Neil.Xian:/usr/src/sys/amd64/compile/Neil amd64
  11. Build Date: 16 October 2006
  12.         Before reporting problems, check http://wiki.X.Org
  13.         to make sure that you have the latest version.
  14. Module Loader present
  15. Markers: (--) probed, (**) from config file, (==) default setting,
  16.         (++) from command line, (!!) notice, (II) informational,
  17.         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
  18. (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jan 25 14:33:40 2007
  19. (++) Using config file: "/root/xorg.conf.new"
  20. (WW) ****INVALID MEM ALLOCATION**** b: 0x51000000 e: 0x51ffffff correcting
  21. (WW) ****INVALID MEM ALLOCATION**** b: 0x40000000 e: 0x4fffffff correcting
  22. (WW) ****INVALID MEM ALLOCATION**** b: 0x50000000 e: 0x50ffffff correcting
  23. (EE) sparse io range (base: 0x6ff640  mask: 0x6ff680)doesn't satisfy (base & mask = mask)
  24. (EE) NV(0): No valid modes found
  25. (EE) Screen(s) found, but none have a usable configuration.

  26. Fatal server error:
  27. no screens found

  28. Please consult the The X.Org Foundation support
  29.          at http://wiki.X.Org
  30. for help.
  31. Please also check the log file at "/var/log/Xorg.0.log" for additional information.

  32. -su-2.05b#
复制代码


log文件的主要内容如下

  1. -su-2.05b# cat /var/log/Xorg.0.log
  2. _XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
  3. _XSERVTransOpen: transport open failed for inet6/bsd64.Neil.Xian:0
  4. _XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

  5. X Window System Version 6.9.0
  6. ...
  7. ...
  8. ==) Log file: "/var/log/Xorg.0.log", Time: Thu Jan 25 14:33:40 2007
  9. (++) Using config file: "/root/xorg.conf.new"
  10. (==) ServerLayout "X.org Configured"
  11. (**) |-->Screen "Screen0" (0)
  12. (**) |   |-->Monitor "Monitor0"
  13. (**) |   |-->Device "Card0"
  14. (**) |-->Input Device "Mouse0"
  15. (**) |-->Input Device "Keyboard0"
  16. (WW) The directory "/usr/X11R6/lib/X11/fonts/CID/" does not exist.
  17.         Entry deleted from font path.
  18. (**) FontPath set to "/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/TTF/,/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/"
  19. (**) RgbPath set to "/usr/X11R6/lib/X11/rgb"
  20. (**) ModulePath set to "/usr/X11R6/lib/modules"
  21. (II) Module ABI versions:
  22.         X.Org ANSI C Emulation: 0.2
  23.         X.Org Video Driver: 0.8
  24.         X.Org XInput driver : 0.5
  25.         X.Org Server Extension : 0.2
  26.         X.Org Font Renderer : 0.4
  27. (II) Loader running on freebsd
  28. (II) LoadModule: "bitmap"
  29. (II) Loading /usr/X11R6/lib/modules/fonts/libbitmap.so
  30. (II) Module bitmap: vendor="X.Org Foundation"
  31.         compiled for 6.9.0, module version = 1.0.0
  32.         Module class: X.Org Font Renderer
  33.         ABI class: X.Org Font Renderer, version 0.4
  34. (II) Loading font Bitmap
  35. (II) LoadModule: "pcidata"
  36. (II) Loading /usr/X11R6/lib/modules/libpcidata.so
  37. (II) Module pcidata: vendor="X.Org Foundation"
  38.         compiled for 6.9.0, module version = 1.0.0
  39.         ABI class: X.Org Video Driver, version 0.8
  40. (--) Using syscons driver with X support (version 549739036674.0)
  41. (--) using VT number 9

  42. (II) PCI: PCI scan (all values are in hex)
  43. ...
  44. ...
  45. (II) LoadModule: "glx"
  46. (II) Loading /usr/X11R6/lib/modules/extensions/libglx.so
  47. (II) Module glx: vendor="X.Org Foundation"
  48.         compiled for 6.9.0, module version = 1.0.0
  49.         ABI class: X.Org Server Extension, version 0.2
  50. (II) Loading sub module "GLcore"
  51. (II) LoadModule: "GLcore"
  52. (II) Loading /usr/X11R6/lib/modules/extensions/libGLcore.so
  53. (II) Module GLcore: vendor="X.Org Foundation"
  54.         compiled for 6.9.0, module version = 1.0.0
  55.         ABI class: X.Org Server Extension, version 0.2
  56. (II) Loading extension GLX
  57. ...
  58. ...
  59. (II) Loading font CID
  60. (II) LoadModule: "nv"
  61. (II) Loading /usr/X11R6/lib/modules/drivers/nv_drv.so
  62. (II) Module nv: vendor="X.Org Foundation"
  63.         compiled for 6.9.0, module version = 1.2.2
  64.         Module class: X.Org Video Driver
  65.         ABI class: X.Org Video Driver, version 0.8
  66. (II) LoadModule: "mouse"
  67. ...
  68. ...
  69. (II) NV: driver for NVIDIA chipsets: RIVA 128, RIVA TNT, RIVA TNT2,
  70. ...
  71. ...
  72.         GeForce 7600 GS, GeForce 7300 GT, GeForce 7600 LE, GeForce 7300 GT,
  73. ...
  74. ...
  75. (II) Primary Device is: PCI 01:00:0
  76. (--) Chipset GeForce 7300 GT found
  77. (II) resource ranges after xf86ClaimFixedResources() call:
  78. ...
  79. ...
  80. (WW) ****INVALID MEM ALLOCATION**** b: 0x51000000 e: 0x51ffffff correcting
  81. ...
  82. (WW) ****INVALID MEM ALLOCATION**** b: 0x40000000 e: 0x4fffffff correcting
  83. ...
  84. (WW) ****INVALID MEM ALLOCATION**** b: 0x50000000 e: 0x50ffffff correcting
  85. ...
  86. (EE) sparse io range (base: 0x6ff640  mask: 0x6ff680)doesn't satisfy (base & mask = mask)
  87. ...
  88. ...
  89. II) Setting vga for screen 0.
  90. (II) Loading sub module "int10"
  91. (II) LoadModule: "int10"
  92. (II) Loading /usr/X11R6/lib/modules/libint10.so
  93. (II) Module int10: vendor="X.Org Foundation"
  94.         compiled for 6.9.0, module version = 1.0.0
  95.         ABI class: X.Org Video Driver, version 0.8
  96. (II) NV(0): Initializing int10
  97. (==) NV(0): Write-combining range (0xa0000,0x20000) was already clear
  98. (==) NV(0): Write-combining range (0xc0000,0x40000) was already clear
  99. (II) NV(0): Primary V_BIOS segment is: 0xc000
  100. (==) NV(0): Write-combining range (0x0,0x1000) was already clear
  101. (--) NV(0): Chipset: "GeForce 7300 GT"
  102. (==) NV(0): Depth 16, (==) framebuffer bpp 16
  103. (==) NV(0): RGB weight 565
  104. (==) NV(0): Default visual is TrueColor
  105. (II) Loading sub module "vgahw"
  106. (II) LoadModule: "vgahw"
  107. (II) Loading /usr/X11R6/lib/modules/libvgahw.so
  108. (II) Module vgahw: vendor="X.Org Foundation"
  109.         compiled for 6.9.0, module version = 0.1.0
  110.         ABI class: X.Org Video Driver, version 0.8
  111. (==) NV(0): Using HW cursor
  112. (--) NV(0): Linear framebuffer at 0x0
  113. (--) NV(0): MMIO registers at 0x1000000
  114. (==) NV(0): Write-combining range (0x1000000,0x1000000) was already clear
  115. (II) Loading sub module "i2c"
  116. (II) LoadModule: "i2c"
  117. (II) Loading /usr/X11R6/lib/modules/libi2c.so
  118. (II) Module i2c: vendor="X.Org Foundation"
  119.         compiled for 6.9.0, module version = 1.2.0
  120.         ABI class: X.Org Video Driver, version 0.8
  121. (II) Loading sub module "ddc"
  122. (II) LoadModule: "ddc"
  123. (II) Loading /usr/X11R6/lib/modules/libddc.so
  124. (II) Module ddc: vendor="X.Org Foundation"
  125.         compiled for 6.9.0, module version = 1.0.0
  126.         ABI class: X.Org Video Driver, version 0.8
  127. (II) NV(0): I2C bus "DDC" initialized.
  128. (II) NV(0): Probing for analog device on output A...
  129. (--) NV(0):   ...can't find one
  130. (II) NV(0): Probing for analog device on output B...
  131. (--) NV(0):   ...found one
  132. (II) NV(0): Probing for EDID on I2C bus A...
  133. (II) NV(0): I2C device "DDC:ddc2" registered at address 0xA0.
  134. (II) NV(0): I2C device "DDC:ddc2" removed.
  135. (II) NV(0):   ... none found
  136. (II) NV(0): Probing for EDID on I2C bus B...
  137. (II) NV(0): I2C device "DDC:ddc2" registered at address 0xA0.
  138. (II) NV(0): I2C device "DDC:ddc2" removed.
  139. (II) NV(0):   ... none found
  140. (--) NV(0): CRTC 1 appears to have a CRT attached
  141. (II) NV(0): Using CRT on CRTC 1
  142. (--) NV(0): VideoRAM: 0 kBytes
  143. (==) NV(0): Using gamma correction (1.0, 1.0, 1.0)
  144. (II) NV(0): Monitor0: Using hsync range of 30.00-83.00 kHz
  145. (II) NV(0): Monitor0: Using vrefresh range of 56.00-76.00 Hz
  146. (II) NV(0): Clock range:  12.00 to 400.00 MHz
  147. ...
  148. ...
  149. (II) NV(0): Not using default mode "640x350" (insufficient memory for mode)
  150. ...
  151. ...
  152. (WW) NV(0): Mode pool is empty
  153. (EE) NV(0): No valid modes found
  154. (==) NV(0): Write-combining range (0x0,0x1000) was already clear
  155. (II) UnloadModule: "nv"
  156. (II) UnloadModule: "ddc"
  157. (II) Unloading /usr/X11R6/lib/modules/libddc.so
  158. (II) UnloadModule: "i2c"
  159. (II) Unloading /usr/X11R6/lib/modules/libi2c.so
  160. (II) UnloadModule: "vgahw"
  161. (II) Unloading /usr/X11R6/lib/modules/libvgahw.so
  162. (II) UnloadModule: "int10"
  163. (II) Unloading /usr/X11R6/lib/modules/libint10.so
  164. (EE) Screen(s) found, but none have a usable configuration.

  165. Fatal server error:
  166. no screens found
复制代码


因为以前一直在 console 下,X用得极少,这个错误以前没有碰到过,多方找资料无果,来此求助,望各位协助,谢谢。

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
2 [报告]
发表于 2007-01-25 15:31 |只看该作者
好像还是和显卡的驱动有关

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
3 [报告]
发表于 2007-01-25 15:33 |只看该作者
(EE) sparse io range (base: 0x6ff640  mask: 0x6ff680)doesn't satisfy (base & mask = mask)
(EE) NV(0): No valid modes found
(EE) Screen(s) found, but none have a usable configuration.

Fatal server error:
no screens found

贴一下你的 xorg.conf

论坛徽章:
0
4 [报告]
发表于 2007-01-25 15:47 |只看该作者

  1. -su-2.05b# cat /root/xorg.conf.new | sed -e "/#/ d"
  2. Section "ServerLayout"
  3.         Identifier     "X.org Configured"
  4.         Screen      0  "Screen0" 0 0
  5.         InputDevice    "Mouse0" "CorePointer"
  6.         InputDevice    "Keyboard0" "CoreKeyboard"
  7. EndSection

  8. Section "Files"
  9.         RgbPath      "/usr/X11R6/lib/X11/rgb"
  10.         ModulePath   "/usr/X11R6/lib/modules"
  11.         FontPath     "/usr/X11R6/lib/X11/fonts/misc/"
  12.         FontPath     "/usr/X11R6/lib/X11/fonts/TTF/"
  13.         FontPath     "/usr/X11R6/lib/X11/fonts/Type1/"
  14.         FontPath     "/usr/X11R6/lib/X11/fonts/CID/"
  15.         FontPath     "/usr/X11R6/lib/X11/fonts/75dpi/"
  16.         FontPath     "/usr/X11R6/lib/X11/fonts/100dpi/"
  17. EndSection

  18. Section "Module"
  19.         Load  "dbe"
  20.         Load  "dri"
  21.         Load  "extmod"
  22.         Load  "glx"
  23.         Load  "record"
  24.         Load  "xtrap"
  25.         Load  "freetype"
  26.         Load  "type1"
  27. EndSection

  28. Section "InputDevice"
  29.         Identifier  "Keyboard0"
  30.         Driver      "kbd"
  31. EndSection

  32. Section "InputDevice"
  33.         Identifier  "Mouse0"
  34.         Driver      "mouse"
  35.         Option      "Protocol" "auto"
  36.         Option      "Device" "/dev/sysmouse"
  37.         Option      "ZAxisMapping" "4 5 6 7"
  38. EndSection

  39. Section "Monitor"
  40.         Identifier   "Monitor0"
  41.         VendorName   "PHL"
  42.         ModelName    "Philips 170C"
  43.         HorizSync    30.0 - 83.0
  44.         VertRefresh  56.0 - 76.0
  45.         Option      "DPMS"
  46. EndSection

  47. Section "Device"
  48.         Identifier  "Card0"
  49.         Driver      "nv"
  50.         VendorName  "nVidia Corporation"
  51.         BoardName   "Unknown Board"
  52.         BusID       "PCI:1:0:0"
  53. EndSection

  54. Section "Screen"
  55.         Identifier "Screen0"
  56.         Device     "Card0"
  57.         Monitor    "Monitor0"
  58.         SubSection "Display"
  59.                 Viewport   0 0
  60.                 Depth     1
  61.         EndSubSection
  62.         SubSection "Display"
  63.                 Viewport   0 0
  64.                 Depth     4
  65.         EndSubSection
  66.         SubSection "Display"
  67.                 Viewport   0 0
  68.                 Depth     8
  69.         EndSubSection
  70.         SubSection "Display"
  71.                 Viewport   0 0
  72.                 Depth     15
  73.         EndSubSection
  74.         SubSection "Display"
  75.                 Viewport   0 0
  76.                 Depth     16
  77.         EndSubSection
  78.         SubSection "Display"
  79.                 Viewport   0 0
  80.                 Depth     24
  81.         EndSubSection
  82. EndSection

  83. -su-2.05b#
复制代码


这个是用 Xorg -configure 自动创建的

[ 本帖最后由 Neil 于 2007-1-25 15:49 编辑 ]

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
5 [报告]
发表于 2007-01-25 15:51 |只看该作者
SubSection "Display"
                Viewport  0 0
                Depth     24
                Modes     "800x600" # 加一行试试
        EndSubSection
EndSection

论坛徽章:
0
6 [报告]
发表于 2007-01-25 15:53 |只看该作者
加了,还是同样错误


  1. (EE) sparse io range (base: 0x6ff640  mask: 0x6ff680)doesn't satisfy (base & mask = mask)
  2. (EE) NV(0): No valid modes found
  3. (EE) Screen(s) found, but none have a usable configuration.

  4. Fatal server error:
  5. no screens found
复制代码



(II) Primary Device is: PCI 01:00:0
(--) Chipset GeForce 7300 GT found

驱动已经加载了,显卡也找到了,但是貌似内存分配有问题。。。可能这就是64位和32位系统内存管理上的区别之一?。。。不知道怎么处理了。。。汗

[ 本帖最后由 Neil 于 2007-1-25 15:55 编辑 ]

论坛徽章:
0
7 [报告]
发表于 2007-01-25 18:06 |只看该作者
1.确认nvidia驱动安装好了,如果nvidia驱动已经安装好了,使用 kldstat 查看加载 nvidia.ko 模块了没有,没有的话手动加载 kldload nvidia.ko 并在/boot/loader.conf 中加入 nvidia_load="YES"
2.编辑/etc/X11/xorg.conf
Section "Device"
        Identifier  "Card0"
        Driver      "nvidia"
        VendorName  "nVidia Corporation"
        BoardName   "NV34 [GeForce FX 5200]" # 这里是我的显卡名 记得改成你的
        BusID       "PCI:1:0:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultDepth        16            # 这里最好是16 很多人用24显卡就不工作了
        SubSection "Display"
                Viewport   0 0
                Depth     16          # 上面16对应
                Modes        "1024x768"    # 改成自己喜欢的模式
        EndSubSection
EndSection

论坛徽章:
0
8 [报告]
发表于 2007-01-25 20:10 |只看该作者
谢谢先
我编译的是动态库,不是内核模块
我一会儿试试编译为内核模块看看行不行

谢谢楼上的2位


nv的源码貌似没有做编译为内核模块的配置,我自己改源码会疯掉di... 只能想想其他办法了

顺便问下楼上的兄台,可以告诉我一下你系统的版本吗? uname -a 即可, 谢谢

[ 本帖最后由 Neil 于 2007-1-25 21:56 编辑 ]

论坛徽章:
0
9 [报告]
发表于 2007-01-25 20:45 |只看该作者
貌似nvidia的官方并没有开发64位的Freebsd显卡驱动,似乎有开发人员正在搞

论坛徽章:
0
10 [报告]
发表于 2007-01-25 21:51 |只看该作者
我查到的资料绝大部分是这么说的,
但是在这个帖子里
http://www.bsdforums.org/forums/ ... newpost&t=46765
我看到了貌似有人搞成了,我已经回了帖了...但是目前还没有回应
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP