LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Matrox G400 DRI single-head (https://www.linuxquestions.org/questions/linux-hardware-18/matrox-g400-dri-single-head-266071/)

FrozenMist 12-13-2004 06:43 PM

Matrox G400 DRI single-head [Solved]
 
OVer ther past couple of days I have attempted getting Direct Rendering to work with my Gentoo 2.6.9-r4 Linux box with X.org 6.8.0 but to no avail. I have compiled into my kernel agpgart and my AGP chipset drivers. I have also tried a variety of things, using hte kernel DRM drivers for my matrox card, downloading and installing the drivers from matrox, but nothing seems to work.

Before I start X I have to manually load the following:

modprobe agpgart
modprobe intel-agp
modprobe mga

If I then look at my X.org log it reads the following:

Code:

(II) LoadModule: "glx"
(II) Loading /usr/X11R6/lib/modules/extensions/libglx.a
(II) Module glx: vendor="X.Org Foundation"
        compiled for 6.8.0, module version = 1.0.0
        ABI class: X.Org Server Extension, version 0.2
(II) Loading sub module "GLcore"
(II) LoadModule: "GLcore"
(II) Loading /usr/X11R6/lib/modules/extensions/libGLcore.a
(II) Module GLcore: vendor="X.Org Foundation"
        compiled for 6.8.0, module version = 1.0.0
        ABI class: X.Org Server Extension, version 0.2
(II) Loading extension GLX
(II) LoadModule: "dri"
(II) Loading /usr/X11R6/lib/modules/extensions/libdri.a
(II) Module dri: vendor="X.Org Foundation"
        compiled for 6.8.0, module version = 1.0.0
        ABI class: X.Org Server Extension, version 0.2
(II) Loading sub module "drm"
(II) LoadModule: "drm"
(II) Loading /usr/X11R6/lib/modules/linux/libdrm.a
(II) Module drm: vendor="X.Org Foundation"
        compiled for 6.8.0, module version = 1.0.0
        ABI class: X.Org Server Extension, version 0.2
(II) Loading extension XFree86-DRI
(II) LoadModule: "mga"
(II) Loading /usr/X11R6/lib/modules/drivers/mga_drv.o
(II) Module mga: vendor="X.Org Foundation"
        compiled for 6.8.1, module version = 4.0.0
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 0.7




...[then further down]...



(==) MGA(0): Default visual is TrueColor
(II) MGA(0): [drm] bpp: 16 depth: 16
(II) MGA(0): [drm] Sarea 2200+664: 2864
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmOpenByBusid: Searching for BusID pci:0000:01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmOpenByBusid: drmOpenMinor returns 5
drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
(II) MGA(0): [drm] DRM interface version 1.2
(II) MGA(0): [drm] created "mga" driver at busid "pci:0000:01:00.0"
(II) MGA(0): [drm] added 8192 byte SAREA at 0xe08be000
(II) MGA(0): [drm] mapped SAREA 0xe08be000 to 0xb6488000
(II) MGA(0): [drm] framebuffer handle = 0xf4000000
(II) MGA(0): [drm] added 1 reserved context for kernel
(II) MGA(0): [agp] Mode 0x1f000201 [AGP 0x8086/0x7190; Card 0x102b/0x0525]
(II) MGA(0): [agp] 12288 kB allocated with handle 0x00000001
(II) MGA(0): [agp] WARP microcode handle = 0xf0000000
(II) MGA(0): [agp] WARP microcode mapped at 0xb6480000
(II) MGA(0): [agp] Primary DMA handle = 0xf0008000
(II) MGA(0): [agp] Primary DMA mapped at 0xb6380000
(II) MGA(0): [agp] DMA buffers handle = 0xf0108000
(II) MGA(0): [agp] DMA buffers mapped at 0xb5b80000
(II) MGA(0): [drm] Added 128 65536 byte DMA buffers
(II) MGA(0): [agp] agpTexture handle = 0xf0908000
(II) MGA(0): [agp] agpTexture size: 2816 kb
(II) MGA(0): [drm] Registers handle = 0xf77fc000
(II) MGA(0): [drm] Status handle = 0xe08db000
(II) MGA(0): [agp] Status page mapped at 0xb5b7e000
(II) MGA(0): [dri] visual configs initialized
(II) MGA(0): Memory manager initialized to (0,0) (1600,2400)
(II) MGA(0): Largest offscreen area available: 1600 x 1200
(II) MGA(0): Reserved back buffer at offset 0x754000
(II) MGA(0): Reserved depth buffer at offset 0xafe000
(II) MGA(0): Reserved 1376 kb for textures at offset 0xea8000
(II) MGA(0): Using XFree86 Acceleration Architecture (XAA)
        Screen to screen bit blits
        Solid filled rectangles
        Solid filled trapezoids
        8x8 mono pattern filled rectangles
        8x8 mono pattern filled trapezoids
        Indirect CPU to Screen color expansion
        Screen to Screen color expansion
        Solid Lines
        Dashed Lines
        Scanline Image Writes
        Offscreen Pixmaps
        Driver provided FillMono8x8PatternRects replacement
        Setting up tile and stipple cache:
                32 128x128 slots
                19 256x256 slots
(==) MGA(0): Backing store disabled
(==) MGA(0): Silken mouse enabled
(II) MGA(0): Using overlay video
(II) MGA(0): X context handle = 0x00000001
(II) MGA(0): [drm] installed DRM signal handler
(II) MGA(0): [DRI] installation complete
(II) MGA(0): [drm] Mapped 128 DMA buffers
(II) MGA(0): [drm] dma control initialized, using IRQ 16
(==) MGA(0): Direct rendering enabled
(==) RandR enabled

As you can see when X starts it seems from the following line in the log that Direct Rendering is enabled.

Code:

(==) MGA(0): Direct rendering enabled
However running
Code:

export LIBGL_DEBUG=verbose
glxinfo

I get the following error:
[CODE]name of display: :0.0
libGL: XF86DRIGetClientDriverName: 4.0.0 mga (screen 0)
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/mga_dri.so
drmOpenByBusid: Searching for BusID pci:0000:01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: drmOpenMinor returns 4
drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
libGL error:
MGA DRI driver expected DDX version 1.0.x but got version 4.0.0
libGL warning: 3D driver returned no fbconfigs.
libGL error: InitDriver failed
libGL error: reverting to (slow) indirect rendering
display: :0 screen: 0
direct rendering: No
[/CODE}

has anyone else had this problem, or does anyone have any ideas on how to get past this? thanx in advance.

FrozenMist 12-16-2004 02:54 PM

Matrox G400 DRI single-haed [SOLVED]
 
Well, i scrapped everything i had done so far and followed a how-to for S3 cards ( even though mine isnt one ) and used the DRI cvs, so now I have finally got DRI working.

LorenzoIT 12-22-2004 07:16 AM

Hi, I'm having the same problem with my G400 MAX, can you please tell me how solved it?

Here's Xorg.0.log:
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (Unknown error 999)
drmOpenDevice: open result is -1, (Unknown error 999)
drmOpenDevice: Open failed
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (Unknown error 999)
drmOpenDevice: open result is -1, (Unknown error 999)
drmOpenDevice: Open failed
drmOpenByBusid: Searching for BusID pci:0000:01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 6, (OK)
drmOpenByBusid: drmOpenMinor returns 6
drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
(II) MGA(0): [drm] loaded kernel module for "mga" driver
(II) MGA(0): [drm] DRM interface version 1.2
(II) MGA(0): [drm] created "mga" driver at busid "pci:0000:01:00.0"
(II) MGA(0): [drm] added 8192 byte SAREA at 0xe0983000
(II) MGA(0): [drm] mapped SAREA 0xe0983000 to 0xb5465000
(II) MGA(0): [drm] framebuffer handle = 0xce000000
(II) MGA(0): [drm] added 1 reserved context for kernel
(II) MGA(0): [agp] Mode 0x1f000201 [AGP 0x1106/0x0691; Card 0x102b/0x0525]
(II) MGA(0): [agp] 12288 kB allocated with handle 0x00000001
(II) MGA(0): [agp] WARP microcode handle = 0xd0000000
(II) MGA(0): [agp] WARP microcode mapped at 0xb545d000
(II) MGA(0): [agp] Primary DMA handle = 0xd0008000
(II) MGA(0): [agp] Primary DMA mapped at 0xb535d000
(II) MGA(0): [agp] DMA buffers handle = 0xd0108000
(II) MGA(0): [agp] DMA buffers mapped at 0xb4b5d000
(II) MGA(0): [drm] Added 128 65536 byte DMA buffers
(II) MGA(0): [agp] agpTexture handle = 0xd0908000
(II) MGA(0): [agp] agpTexture size: 2816 kb
(II) MGA(0): [drm] Registers handle = 0xcd000000
(II) MGA(0): [drm] Status handle = 0xe098a000
(II) MGA(0): [agp] Status page mapped at 0xb4b5b000
(II) MGA(0): [dri] visual configs initialized
(II) MGA(0): Memory manager initialized to (0,0) (1280,2047)
(II) MGA(0): Largest offscreen area available: 1280 x 1023
(II) MGA(0): Reserved back buffer at offset 0xa00000
(II) MGA(0): Reserved depth buffer at offset 0xf00000
(II) MGA(0): Reserved 12288 kb for textures at offset 0x1400000
(II) MGA(0): Using XFree86 Acceleration Architecture (XAA)
Screen to screen bit blits
Solid filled rectangles
Solid filled trapezoids
8x8 mono pattern filled rectangles
8x8 mono pattern filled trapezoids
Indirect CPU to Screen color expansion
Screen to Screen color expansion
Solid Lines
Dashed Lines
Scanline Image Writes
Offscreen Pixmaps
Driver provided FillMono8x8PatternRects replacement
Setting up tile and stipple cache:
32 128x128 slots
9 256x256 slots
(==) MGA(0): Backing store disabled
(==) MGA(0): Silken mouse enabled
(II) MGA(0): Using overlay video
(II) MGA(0): X context handle = 0x00000001
(II) MGA(0): [drm] installed DRM signal handler
(II) MGA(0): [DRI] installation complete
(II) MGA(0): [drm] Mapped 128 DMA buffers
(II) MGA(0): [drm] dma control initialized, using IRQ 10
(==) MGA(0): Direct rendering enabled
(==) RandR enabled
Symbol xf86I2CWriteByte from module /usr/X11R6/lib/modules/drivers/mga_drv.o is unresolved!
Symbol xf86I2CWriteByte from module /usr/X11R6/lib/modules/drivers/mga_drv.o is unresolved!
Symbol xf86I2CWriteByte from module /usr/X11R6/lib/modules/drivers/mga_drv.o is unresolved!
Symbol xf86I2CWriteByte from module /usr/X11R6/lib/modules/drivers/mga_drv.o is unresolved!
Symbol xf86I2CWriteByte from module /usr/X11R6/lib/modules/drivers/mga_drv.o is unresolved!
Symbol xf86DestroyI2CBusRec from module /usr/X11R6/lib/modules/drivers/mga_drv.o is unresolved!
Symbol xf86DestroyI2CBusRec from module /usr/X11R6/lib/modules/drivers/mga_drv.o is unresolved!
Symbol xf86DestroyI2CBusRec from module /usr/X11R6/lib/modules/drivers/mga_drv.o is unresolved!
Symbol xf86I2CProbeAddress from module /usr/X11R6/lib/modules/drivers/mga_drv.o is unresolved!
Symbol xf86I2CProbeAddress from module /usr/X11R6/lib/modules/drivers/mga_drv.o is unresolved!

what about all those unresolved symbol? does the matrox driver works only with XFree?

and here's the output from glxinfo with LIBGL_DEBUG=verbose:
name of display: :0.0
libGL: XF86DRIGetClientDriverName: 4.1.0 mga (screen 0)
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/mga_dri.so
drmOpenByBusid: Searching for BusID pci:0000:01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: drmOpenMinor returns 4
drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
libGL error:
MGA DRI driver expected DDX version 1.0.x but got version 4.1.0
libGL warning: 3D driver returned no fbconfigs.
libGL error: InitDriver failed
libGL error: reverting to (slow) indirect rendering

thanks for your help :)

bye!

FrozenMist 12-23-2004 03:45 AM

OK. Well, it is not exactly the same as my problem, but i will try and help as much as i can. Well, first things first, the

Code:

drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (Unknown error 999)
drmOpenDevice: open result is -1, (Unknown error 999)
drmOpenDevice: Open failed
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (Unknown error 999)
drmOpenDevice: open result is -1, (Unknown error 999)
drmOpenDevice: Open failed

issue was the first thing that i fixed. What i did was run lspci | grep AGP and find my AGP chipset ( not graphics card. ). The output from this command was as follows:

Code:

0000:00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03)
0000:01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G400 AGP (rev 04)

The first line ( not matrox card ) was the one that i needed. I then compiled the following as modules into my kernel:

Code:

Device Drivers -->
              Character Devices -->
                                  x x      <M> /dev/agpgart (AGP Support)
                                  x x      <M>  Intel 440LX/BX/GX, I8xx and E7x05 chipset support
                                  x x[*] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)          x x 
                                  x x      <M>  Matrox g200/g400

(EDIT)
forgot to mention that i read in alot of places that you also need MTRR support enabled for Direct REndering so I also had this enabled in my kernel

Code:

  Processor type and features  --->[*] MTRR (Memory Type Range Register) support
(/EDIT)

After editing my GRUB configureation files, and rebooting into the new kernel I had to load the intel chipset AND agpgart BEFORE starting X. This got rid of the OpenDevice error, but direct rendering still did not work.

Now if I can remember correctly ( which i think i can ) I then followed the SiS tutorial, to no real avail, but caught on and followed the tutorial from the DRI web site.

What you need to do is this ( i think ) go to http://dri.sourceforge.net/cgi-bin/moin.cgi/Building and follow the instructions for CVS install. If you are like me, i was hesitant at using CVS as i didnt want to create stuff out of my portage only installed system. However, what i did, was create a cvs directory in /home and then did everything inside the /home/cvs folder ( i.e ran all the cvs commands so I ended up with /home/cvs/Mesa /home/cvs/DRI /home/cvs/xc ). Just follow the instructions on that site. However, there are one or two little bits that confused me a little, dont know whether you will find confusing, but after completing

1.1.4 Installing over X.org or XFree86

go onto 1.1.6 and continue on. There is a little message down the bottom which relates to Gentoo users, talking about open-gl update, and how there are lotsa problems with it. I wanted Direct Rendering working REALLY bad so i jsut decided to emerge -C opengl-update before starting the process. Might make things a little easier.

Well, after all of that i just added the modules to my /etc/modules.autoload.d/kernel-2.6 like so:

agpgart
intel-agp

No need to autoload the mga module, X.org seemed to do that on it's own. Well, i think that is everything, so go through it and try to get it working. I will be glad to ( try ) and help if you run into any problems, but if it works make sure you post here and tell me :D. I would feel great if i managed to help someone else to get Direct Rendering to work.

LorenzoIT 12-25-2004 03:31 AM

Hi, thanks for you help, building from cvs solved the problem, now everything works :)
thanks again :)

FrozenMist 12-26-2004 02:45 PM

Glad to be of help. :D


All times are GMT -5. The time now is 03:23 AM.