LinuxSir.cn,穿越时空的Linuxsir!

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

仔细读了一遍x的log,发现drm和dri出问题,导致opengl没法用,请指点一下(封贴)

[复制链接]
发表于 2007-3-27 20:42:51 | 显示全部楼层 |阅读模式
我是9550的显卡。

看来是ati的驱动没装好。

kernel我也重新编译了,drm也选M了,make && make modules_install也做了,可drm还是没法load,我在命令行下,modprobe drm,提示:FATAL: Error inserting drm /lib/modules/2.6.19-gentoo-r5/kernel/drivers/char/drm/drm.ko): Cannot allocate memory



x的log:

(EE) fglrx: Failed to load module "drm" (module does not exist, 0)
(EE) fglrx(0): unable to query kernel module - HW accelerated OpenGL will not work
(EE) AIGLX: Screen 0 is not DRI capable

(WW) fglrx: No matching Device section for instance (BusID PCI:2:0:1) found
(WW) Warning, couldn't open module drm
(WW) fglrx(0): board is an unknown third party board, chipset is supported
(WW) fglrx(0): ***********************************************
(WW) fglrx(0): * DRI initialization failed!                  *
(WW) fglrx(0): * (maybe driver kernel module missing or bad) *
(WW) fglrx(0): * 2D acceleraton available (MMIO)             *
(WW) fglrx(0): * no 3D acceleration available                *
(WW) fglrx(0): ********************************************* *
(WW) fglrx(0): Option "VendorName" is not used
(WW) fglrx(0): Option "ModelName" is not used
 楼主| 发表于 2007-3-27 20:44:19 | 显示全部楼层
例外,有兄弟让我下载ati-drivers的包,并sh一下,我试了:
==================================================
ATI Technologies Linux Driver Installer/Packager
==================================================
Detected configuration:
Architecture: i686 (32-bit)
X Server: Unknown X Window

Detected version of X does not have a matching 'x720' directory
You may override the detected version using the following syntax:
     X_VERSION=<xdir> ./ati-driver-installer-<ver>-<arch>.run [--install]

The following values may be used for <xdir>:
    x430        XFree86 4.3.x
    x430_64a    XFree86 4.3.x 64-bit
    x680        X.Org 6.8.x
    x680_64a    X.Org 6.8.x 64-bit
    x690        X.Org 6.9.x
    x690_64a    X.Org 6.9.x 64-bit
    x700        X.Org 7.0.x
    x700_64a    X.Org 7.0.x 64-bit
    x710        Unknown X Window
    x710_64a    Unknown X Window
Removing temporary directory: fglrx-install

不知所云,呵呵。。
回复 支持 反对

使用道具 举报

发表于 2007-3-27 22:03:38 | 显示全部楼层
内核编译有问题。建议察看agp芯片组选项。
回复 支持 反对

使用道具 举报

发表于 2007-3-27 23:46:02 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2007-3-28 00:33:52 | 显示全部楼层
有点类似我的情况,贴一下我的,显卡是 X200M,不是9550。不知道是否合适。

Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        RgbPath      "/usr/share/X11/rgb"
        ModulePath   "/usr/lib64/xorg/modules"
        FontPath     "/usr/share/fonts/misc/"
        FontPath     "/usr/share/fonts/TTF/"
        FontPath     "/usr/share/fonts/OTF"
        FontPath     "/usr/share/fonts/Type1/"
        FontPath     "/usr/share/fonts/100dpi/"
        FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
        Load  "extmod"
        Load  "record"
        Load  "dbe"
        Load  "GLcore"
        Load  "dri"
        Load  "glx"
        Load  "xtrap"
        Load  "freetype"
        Load  "type1"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
    Option      "Autorepeat" "250 30"
    Option      "XkbModel" "pc105"
    Option      "XkbRules" "xorg"
    Option      "XkbLayout" "gb"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option            "rotocol" "auto"
        Option            "Device" "/dev/input/mice"
        Option            "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        #DisplaySize          300   220        # mm
        Identifier   "Monitor0"
        VendorName   "LPL"
        ModelName    "1151"
EndSection

Section "Monitor"
        Identifier   "Monitor1"
        Option            "VendorName" "ATI Proprietary Driver"
        Option            "ModelName" "Generic Autodetecting Monitor"
        Option            "DPMS" "true"
EndSection

Section "Device"
        Identifier  "fglrx"
        Driver      "fglrx"
        #Option            "UseInternalAGPGART" "no"
        #Option            "UseFastTLS" "2"
        #Option            "VideoOverlay" "on"
        #Option            "EnablePrivateBackZ" "on"
EndSection

Section "Screen"
        Identifier "screen0"
        Device     "fglrx"
        Monitor    "Monitor1"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "dri"
        Mode 0660
        Group "video"
EndSection

Section "Extensions"
        Option "Composite" "Disable"
EndSection
Section "ServerFlags"
        Option "AIGLX" "off"
EndSection
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-28 23:19:52 | 显示全部楼层


检查了N久,最终发现在modprobe fglrx出错,dmesg一下,看到许多未定义的函数,google后,得知应该是fglrx太旧,于是emerge最新的ati测试版驱动,再试依然不行,算了,装开源驱动吧!

又搞了N久,emerge终于完成,配置该改的也改了,startx进入x后,发现drm依然未打开(从glxinfo看到的),分析x的log,发现以下警告和错误,请大家帮我看一下,谢谢!

(--) Assigning device section with no busID to primary device
(WW) fglrx: No matching Device section for instance (BusID PCI:2:0:1) found


(WW) fglrx(0): Failed to open DRM connection
(--) fglrx(0): VideoRAM: 65536 kByte, Type: DDR SGRAM / SDRAM
(II) fglrx(0): AGP card detected
(WW) fglrx(0): board is an unknown third party board, chipset is supported


(WW) fglrx(0): No DRM connection for driver fglrx.


(EE) fglrx(0): GART is not initialized, disabling DRI
(WW) fglrx(0): ***********************************************
(WW) fglrx(0): * DRI initialization failed!                  *
(WW) fglrx(0): * (maybe driver kernel module missing or bad) *
(WW) fglrx(0): * 2D acceleraton available (MMIO)             *
(WW) fglrx(0): * no 3D acceleration available                *
(WW) fglrx(0): ********************************************* *


(WW) fglrx(0): Option "VendorName" is not used
(WW) fglrx(0): Option "ModelName" is not used


(EE) AIGLX: Screen 0 is not DRI capable

另:zh.gentoo-wiki.com/HOWTO_ATI_Open-Source_Drivers 中提到的Section Device中有一个BusID项目,我不知该填什么,我填写了从X的log看到的Primary device的BUSID,好象也不行,请帮我看看,谢谢。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-28 23:32:41 | 显示全部楼层
还有一段log,请看一下:
(II) Primary Device is: PCI 02:00:0
(II) ATI Proprietary Linux Driver Version Identifier:8.34.8
(II) ATI Proprietary Linux Driver Release Identifier: LGDr8.34g1  
(II) ATI Proprietary Linux Driver Build Date: Feb 20 2007 11:49:19
(II) ATI Proprietary Linux Driver Build Information: autobuild-rel-r6-8.34.1.1.2.3-driver-lnx-x86-x86_64-327152
(--) Assigning device section with no busID to primary device
(WW) fglrx: No matching Device section for instance (BusID PCI:2:0:1) found
回复 支持 反对

使用道具 举报

发表于 2007-3-29 20:34:59 | 显示全部楼层
也许我可以帮你,我最近刚调出来。 先说说你的kernel的版本。如果是新的版本,要给官方的driver打个补丁。
我的环境是  kernel 2.6.20.3 . 官方的驱动程序要打补丁才能使用。我的电脑是T60, Ati X1300的显卡

1/ Kernel 的设置
    在这里第一要参考 http://gentoo-wiki.com/HOWTO_ATI_Drivers 的说明,完全按照这个说明设置,特别要注意的是
  

   Character Devices --->
            <M> /dev/agpgart (AGP Support)  

            <M> Intel 440LX/BX/GX , I8xx and E7x05 chip support #这理一定要选

            < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)

   这和Thinkwiki.org中的说明矛盾,但是这里是对的,Thinkwiki是错

2/ 下载 ATI官方的驱动程序,ati-driver-installer-8.34.8-x86.x86_64.run
     选择推荐安装。此时会提示安装不成功,这是因为驱动程序对于2.6.20要打补丁才能使用
     在/lib/modules/fglrx/build_mod/中的firegl_public.c需要补丁。补丁在附件中。用法如下:
     patch firegl_public.c < fglrx-2.6.20.patch
     然后执行 make.sh, 并到上一层目录/lib/modules/fglrx/后再执行make_install.sh
3/
Now simply add the modules to /etc/modules.autoload.d/kernel-2.x where x is your kernel version.

Add the following (ORDER IS VERY IMPORTANT);
File: /etc/modules.autoload.d/kernel-2.x

agpgart
intel-agp # change intel-agp to your chipset. eg: via-agp, nvidia-agp sis-agp.
fglrx


4/reboot 牛X啦
回复 支持 反对

使用道具 举报

发表于 2007-3-29 20:49:09 | 显示全部楼层
这是那个上面的fglx 给2.6.20的patch

--- build_mod/firegl_public.c   2006-12-18 10:58:15.000000000 -0500
+++ build_mod/firegl_public.c   2006-12-18 11:14:04.000000000 -0500
@@ -181,6 +181,70 @@
int errno;
#endif // __ia64__

+#if defined(__i386__)
+#define __syscall_return(type, res) \
+do { \
+        if ((unsigned long)(res) >= (unsigned long)(-(128 + 1))) { \
+                errno = -(res); \
+                res = -1; \
+        } \
+        return (type) (res); \
+} while (0)
+#define _syscall2(type,name,type1,arg1,type2,arg2) \
+type name(type1 arg1,type2 arg2) \
+{ \
+long __res; \
+__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
+        : "=a" (__res) \
+        : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)) \
+        : "memory"); \
+__syscall_return(type,__res); \
+}
+
+#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
+type name(type1 arg1,type2 arg2,type3 arg3) \
+{ \
+long __res; \
+__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
+        : "=a" (__res) \
+        : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)), \
+                  "d" ((long)(arg3)) : "memory"); \
+__syscall_return(type,__res); \
+}
+#elif defined(__x86_64__)
+#define __syscall_clobber "r11","rcx","memory"
+#define __syscall "syscall"
+
+#define __syscall_return(type, res) \
+do { \
+        if ((unsigned long)(res) >= (unsigned long)(-127)) { \
+                errno = -(res); \
+                res = -1; \
+        } \
+        return (type) (res); \
+} while (0)
+#define _syscall2(type,name,type1,arg1,type2,arg2) \
+type name(type1 arg1,type2 arg2) \
+{ \
+long __res; \
+__asm__ volatile (__syscall \
+        : "=a" (__res) \
+        : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)) : __syscall_clobber ); \
+__syscall_return(type,__res); \
+}
+
+#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
+type name(type1 arg1,type2 arg2,type3 arg3) \+        : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)), \
+                  "d" ((long)(arg3)) : __syscall_clobber); \
+__syscall_return(type,__res); \
+}
+#endif
+
// int mlock(const void *addr, size_t len);
_syscall2(int, mlock, const void *, addr, size_t, len )
// int munlock(const void *addr, size_t len);
--- build_mod/firegl_public.c   2007-02-20 19:23:07.000000000 +0100
+++ build_mod/firegl_public.c.new       2007-02-21 23:36:19.000000000 +0100
@@ -5265,7 +5265,7 @@
     kasThread_t* thread_obj = (kasThread_t*)hThread;
     init_MUTEX(&(thread_obj->sleep_finished));
     init_waitqueue_head(&(thread_obj->wq_head));
-    INIT_WORK(&(thread_obj->work), routine, pcontext);
+    INIT_WORK(&(thread_obj->work), routine);
     schedule_work(&(thread_obj->work));
     return 1;
}
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-30 19:24:23 | 显示全部楼层
我的是2.6.19-r5。

你提到的patch是那里看到的?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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