# Any success on Matrox G400 with Xorg6.8.2 and kernel 2.6.11?

## bahadir

Has anyone got Matrox G400 running with Xorg6.8.2. and kernel 2.6.11 or later?

I installed Xorg 6.8.2 and 6.8.0 and both failed with mga drivers 4.1.

In xorg log, the first obvious error is: 

```

drmOpenDevice: node name is /dev/dri/card0

drmOpenDevice: open result is -1 (No such device) 

[drm] failed to load kernel module "mga"

```

So does this show that the mga module is incompatible with my 2.6.11 kernel (since it was working previously with an older Xorg/kernel combination) or is it rather Xorg version 6.8.2, or even both?

Thanks,

Bahadir

----------

## eonbluelance

I am also trying to get a Matrox G400 to work with Xorg6.8.2 and kernel 2.6.12-r6.  To make matters worse, I'm also running in x86_64.

I am new to Gentoo, but have been using Linux for a while.

I'm just wondering where to get the correct files.  From what I understand you need mga_drv.o and mga_hal_drv.o.  I tried using the compiled ones you can download from the Matrox site.  That didn't work, though I didn't expect it to.  I downloaded the source and didn't really know what to do with it... ran "xmkmf -a" and had a bunch of missing header files. I'm new to Imakefiles so I don't know if I'm doing this right...

Apparently this guy got it to work, and he posted his xorg.conf.. It's actually a three monitor setup, but you can get a good idea of how it work work for just two...

http://gentoo-wiki.com/EvilDick's_Triple_Monitors#X_Setup_for_Matrox_G400_AGP_Dualhead_and_Matrox_G400_PCI

Anyone know where I can get mga_drv.o and mga_hal_drv.o for x86_64?

----------

## bahadir

I gave up on mga. I installed Xorg 6.8.0. I autoconfigured an xorg.conf file and I'm using a single monitor. 

I know that those drivers work for 6.8.1 or 6.8.0 versions, last time I had a 2.6.7 kernel with 6.8.0 and it was working. 

If I were you, I would install the older versions, use an older kernel, (I have another machine that is x86_64 and it runs 2.6.7 with dual screens) and not bother really. In fact your time to get this working is more valuable than what you're going to get with a latest 2.6.12 kernel and a 6.8.2 xorg. Its maybe the 15th time I'm installing XFree86, and everytime it was a hassle to get things to work.

----------

## brihall

I am currently using a G400 on my ~amd64 Gentoo box, running Gentoo 2005.1, xorg-x11-6.8.2-r2 and 2.6.11-ck10 kernel (waiting for 2.6.13 to come out since 2.6.12 has x86_64 issues). AMD 3000+, 512MB DDR333.

I have accelerated 3D video/DRI and Xv working fine using only the open-source drivers that come with xorg. I haven't used the Matrox HAL code since I used 2.4.x. 

That all being said, I do not use TV-out on this box. However, I do have a pvr box connected to my TV via s-video that uses a G400. The pvr uses 2.4.30 and the kernel framebuffer drivers (matroxfb). The pvr does not use X, although I suppose I could put X on the framebuffer if I wanted. I did try to use directfb but never got it to work with freevo.

----------

## efwahl

I'm trying to get dri working on kernel 2.6.12-gentoo-r10 and xorg 6.8.2-r4.  

The xorg log shows the card missing from /dev/dri:

```
(II) MGA(0): [drm] bpp: 32 depth: 24

(II) MGA(0): [drm] Sarea 2200+664: 2864

drmOpenDevice: node name is /dev/dri/card0

drmOpenDevice: open result is -1, (No such device)

drmOpenDevice: open result is -1, (No such device)

drmOpenDevice: Open failed

<more similar entries omitted>

```

dmesg shows that agpgart is failing to init drm:

```

Linux agpgart interface v0.101 (c) Dave Jones

[drm] Initialized drm 1.0.0 20040925

ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 16

[drm:drm_fill_in_dev] *ERROR* Cannot initialize the agpgart module.

DRM: Fill_in_dev failed.

```

googling that error shows that the fill_in_dev error is associated with the card-specific agpgart module not being loaded.    However lsmod shows that mga is loaded:

```

mga                    59008  0 

drm                    65172  1 mga

agpgart                35440  1 drm

```

So I'm a bit stumped.  Any thoughts on where to look next, or what dumb mistakes I'm making would be much appreciated.

tia

----------

## snowhite

Im having similar problems whit my G450, 

I tried installing the drivers of matrox, this made things even worse. 

Is there not a decent howto for matrox cards that WORKS for everybody?

cheers.

----------

## bahadir

Please let us know if you find it, I'm not willing to spend any more time on this. 

I even deferred to buy a second monitor until this is sorted. 

Thanks to this hassle, it'll also be cheaper by then.  :Smile: 

----------

## A.S. Pushkin

I note that you have a g400 MAX and it is working. I have been searching for anyone, who actually has 3D working and does not lock up.

Everything I have says I have direct rendering, but when I run glxgears, or either of the two apps I wants to use, Blender and Wings, my machine does a hard lockup.

FYI, I'm running the 2.6.13-r5 gentoo kernel and Xorg 6.8.2-r6.

I ask this question as I had read that the 2.6 kernel and Xorg 3D, that is DRI were incompatible.

I'd really appreciate any input on this. I'm seriously considering moving back to my 2.4 Gentoo machine.

 *brihall wrote:*   

> I am currently using a G400 on my ~amd64 Gentoo box, running Gentoo 2005.1, xorg-x11-6.8.2-r2 and 2.6.11-ck10 kernel (waiting for 2.6.13 to come out since 2.6.12 has x86_64 issues). AMD 3000+, 512MB DDR333.
> 
> I have accelerated 3D video/DRI and Xv working fine using only the open-source drivers that come with xorg. I haven't used the Matrox HAL code since I used 2.4.x. 
> 
> That all being said, I do not use TV-out on this box. However, I do have a pvr box connected to my TV via s-video that uses a G400. The pvr uses 2.4.30 and the kernel framebuffer drivers (matroxfb). The pvr does not use X, although I suppose I could put X on the framebuffer if I wanted. I did try to use directfb but never got it to work with freevo.

 

Thanks!

----------

## bahadir

 *brihall wrote:*   

> I am currently using a G400 on my ~amd64 Gentoo box, running Gentoo 2005.1, xorg-x11-6.8.2-r2 and 2.6.11-ck10 kernel (waiting for 2.6.13 to come out since 2.6.12 has x86_64 issues). AMD 3000+, 512MB DDR333.
> 
> I have accelerated 3D video/DRI and Xv working fine using only the open-source drivers that come with xorg. I haven't used the Matrox HAL code since I used 2.4.x. 
> 
> 

 

Hi, 

You haven't said whether you have dual screens or not. Do you have dual screens with xorg drivers?

Bahadir

----------

## A.S. Pushkin

I'm afraid I have just one monitor, but I was amazed to even get a slow DRI working the other day.

FYI, kernel sys-kernel/gentoo-sources-2.6.14-r4

 x11-base/xorg-x11-6.8.2-r6, x11-base/opengl-update-2.2.1 and x11-base/opengl-update-2.2.1 installed. Frame rate was even slow for my Matrox, but previously running glxgears would lock the machien up hard.

I suspect my default /etc/drirc is messed up so fixing that may help, but I've not had time to do so yet.

----------

## enrique

I have used my Matrox G400Max with 6.8.2 and kernels newer than 2.6.11 (latest I tried was 2.6.14) and with no problems, i.e. 3D and dri works. 

My notes are here: Rockhopper.dk: Matrox G400 Max and my dmesg

----------

## dwnoon

I have solved this problem on my system by statically linking the agpgart, drm and mga drivers into the kernel. It seems there is a timing issue such that the drm driver requires the mga driver during its initialization, but the mga driver has to be loaded after the drm driver. The only immediately obvious way to do this is to link all the drivers staticslly into the kernel.

Also, you need to ensure you enable the detection of the bus control chipset by the agpgart driver. In my case, this is the Via Technologies MVP3 chipset.

Without all of this, drm didn't work.

----------

