G550 dual-head + DRI freezes system [sort of SOLVED]

This forum is for questions about all G-series cards (G200, G400, G450, ...) that need the mga driver to work properly

G550 dual-head + DRI freezes system [sort of SOLVED]

Postby Tuomas » Tue Feb 27, 2007 10:46 pm

Hi

I have tried to get my G550 dual head configuration to work for two days and read probably all relevant post on the topic. I think it is time to ask for help. I have understood that it is possible to get acceleration working for both heads with no very special tricks when "xinerama" is not enabled. I would like to use the second monitor mostly (LCD-TV) for watching DVDs. When dri support is commented out:

Code: Select all
#    Load       "dri"


Xine plays a DVD ok on the primary monitor and CPU load is maybe 30%. But on the secondary monitor performance is unacceptably jerky and CPU load near 100%. This configuration also does not support chromium or other acceleration dependent software.

When dri is enabled:

Code: Select all
    Load       "dri"


the system hangs after log on. The gnome visual greeter works but the desktop never appears as everything freezes after a few seconds:

Code: Select all

...
(EE) MGA(1): Not initializing the DRI on the second head
...
(WW) MGA(1): Direct rendering disabled
...
(EE) AIGLX: Screen 1 is not DRI capable
...

Backtrace:
0: /usr/bin/X(xf86SigHandler+0x85) [0x80bfcd5]

Fatal server error:
Caught signal 11.  Server aborting

(II) Screen 0 shares mem & io resources
(II) Screen 1 shares mem & io resources
(EE) MGA(0): [dri] Idle timed out, resetting engine...
(EE) MGA(0): [dri] Idle timed out, resetting engine...
(EE) MGA(0): [dri] Idle timed out, resetting engine...
(EE) MGA(0): [dri] Idle timed out, resetting engine...
# This error is repeated forever until power off
# Keyboard and mouse do not respond.



It is not quite clear to me what is required for watching video files. They probably do not require accelerated drawing of lines and boxes? Would it be enough to get some kind support for efficient video memory access on the second head or is this part of DRI or something?

The preferred solution would be to get all acceleration and fast memory access working on both heads. If this is not possible then acceleration for primary monitor and enough support for video on secondary monitor. I have xorg.conf and xorg.0.log attached. My configuration is:

P4 2400 MHz running Gentoo Linux
xorg-server version 1.1.1-r1
xorg-x11 version 7.1
kernel version 2.6.18-gentoo-r6

Primary monitor connected to VGA-port.
LCD-TV connected to DVI-port with VGA-adapter.
Latest driver installed with:

Code: Select all
matroxdriver_mga-x86_32-4.4.2-installer.run


The support for agpgart for Intel motherboard is enabled as a module (agpgart) and Direct rendering manager for Matrox (mga). I have experimented with framebuffer support enabled and disabled with no change in behaviour.

The whole xorg.conf is attached. Here are the device section definitions that are probably the most relevant since the configuration shows picture on both monitors when dri is disabled. I wonder how the video memory should be defined and divided for two monitors:

Code: Select all
Section "Device"
    Identifier  "G550"
    Driver      "mga"
    VendorName  "Matrox"
    VideoRam   16384
    Option "DPMS" "true"
    BusID       "PCI:1:0:0"
    Screen        0
EndSection

Section "Device"
    Identifier  "G550 TV"
    Driver      "mga"
    VendorName  "Matrox"
    VideoRam   16384
    BusID       "PCI:1:0:0"
    Screen          1
EndSection


This problem does not arise when the secondary screen is commented out in the ServerLayout section. DRI is enabled and acceleration works on the primary monitor and LCD-TV says "signal out of range or something":

Code: Select all
        Screen "Screen 0"
#    Screen "Screen 0" LeftOf "Screen 1"
#    Screen "Screen 1"


I will now stop banging my head on the wall for tonight and wait for good advice or new ideas. Good night everybody.

-----
Tuomas
Attachments
Xorg.0.log
Xorg.0.log
(46.69 KiB) Downloaded 106 times
xorg.conf
xorg.conf
(2.59 KiB) Downloaded 121 times
Last edited by Tuomas on Mon Mar 05, 2007 1:24 am, edited 1 time in total.
Tuomas
Private
Private
 
Posts: 6
Joined: Tue Feb 27, 2007 8:02 pm
Location: Finland

I got what I wanted

Postby Tuomas » Mon Mar 05, 2007 1:22 am

(Same author as for the original message)
I got what I wanted:

1. Acceleration works on my primary monitor.
2. Playing DVDs works on the secondary monitor (LCD-TV).
3. My system does not freeze after log-on.

The possibly only important change was adding the following option in xorg.conf
Code: Select all
Section "ServerFlags"
     Option  "AIGLX" "off"
EndSection

I also disabled frame-buffer support for matrox in kernel configuration (and fiddled with some other options I am not quite sure what, sorry :oops:). I do not know if this kernel change was even relevant.

The secondary monitor does not come up automatically. It needs a X-restart by ctrl-atl-del. Logging out of Gnome also does the trick. What is the difference to the normal start-up via gdm I do not know. This should not be too hard to configure?

The TV reports the screen mode to be 1360x768 that is what it should ideally be for a 1366x768 LCD-monitor. This is more than I could hope for as my xorg.conf mentions only 1024x768 for both monitors. 1024x768 is the correct resolution for my primary monitor.

The DVDs get played with the following command.
Code: Select all
DISPLAY=":0.1" xine -V xshm -s DVD -p=fhq -r 4:3

I am not very familiar what gets loaded for the gdm-greeter and what happens after logging in. My guess is that the problem with aiglx has something to do with Metacity? I hope this helps somebody out there. '

PS. The 10 metre VGA-cable cost almost as much as a DVD-player... :?
Tuomas
Private
Private
 
Posts: 6
Joined: Tue Feb 27, 2007 8:02 pm
Location: Finland

Postby tuxx-home.at » Mon Mar 05, 2007 11:17 am

I got what I wanted:


Great and sorry for the late reply :-/

I also disabled frame-buffer support for matrox in kernel configuration


I suppose that this change was the one that really fixed your issue, because
when the framebuffer is enabled, there may be troubles configuring other
acceleration features in X.

The secondary monitor does not come up automatically.


This issue mostly is caused by the bogus memory autodetection on the
mga chips. Therefore you may want to add the 'Option "Crtc2Ram"' resp.
'Option "Crtc2Half"' to your first device section to specify the correct
amount of video memory for the second head.

Additionally, the option 'VideoRam' in the first head specifies the total
amount of available VideoRam for your physical card and is invalid in the
second device section (for your special card), so your device sections should
look like this (assuming that you are using a card with 32MiB of VideoRam):

Code: Select all
Section "Device"
    Identifier  "G550"
    Driver      "mga"
    VendorName  "Matrox"
    VideoRam    32768
    Option "Crtc2Half" "True"
    Option "DPMS" "true"
    BusID       "PCI:1:0:0"
    Screen           0
EndSection

Section "Device"
    Identifier  "G550 TV"
    Driver      "mga"
    VendorName  "Matrox"
    BusID       "PCI:1:0:0"
    Screen            1
EndSection


My guess is that the problem with aiglx has something to do with Metacity?


It definetly has, but before your post I never heard about such troubles
with composite managers and the mga cards. I guess your setup must be
slightly different in some parts.

The TV reports the screen mode to be 1360x768 that is what it should
ideally be for a 1366x768 LCD-monitor. This is more than I could hope for
as my xorg.conf mentions only 1024x768 for both monitors.


Maybe the monitor has a good EDID implementation and negotiates the
resolution with the Matrox card well.

PS. The 10 metre VGA-cable cost almost as much as a DVD-player...


Yes, it does. Therefore I once googled for alternatives to buying a 20m VGA
cable and found a nice HOWTO about using VGA HD-15 over CAT-5 cables.
After some hours of soldering and wondering how this could work at all,
I had built a self-made HD-15 CAT5 connector that worked up to 15meters
perfectly (if I would have isolated the pins a bit more thoroughly and if I
had a better shield foil, it maybe would also have worked at longer distances).

There are some cons for such a cable: It doesn't support Sync-on-green or
other special features that are supported with native VGA-cables, but if you
don't need such features, it's a perfect alternative - a very cheap one too.
User avatar
tuxx-home.at
Supreme Commander
Supreme Commander
 
Posts: 2199
Joined: Mon Jan 01, 2007 12:51 pm
Location: Vassach - Austria - Europe

Postby Tuomas » Mon Mar 05, 2007 8:32 pm

Thank you for your post. I made some further testing.

Quote:

I also disabled frame-buffer support for matrox in kernel configuration

I suppose that this change was the one that really fixed your issue, because
when the framebuffer is enabled, there may be troubles configuring other
acceleration features in X.

The behaviour changed in many ways when framebuffer was enabled:

1. Secondary display picture size was resized to 1024 x 768 (as was really configured in xorg.conf). I did not try to fix this for now.
2. The second head tried to show something already on start up, but the signal was unrecognized.
3. With some kernel options an valid X screen was enabled on the second head only after log out, some options resulted in the second display coming up right after X started.

The acceleration worked the same as before: acceleration for head 1, no DRI support for head 2.
Quote:

The secondary monitor does not come up automatically.

This issue mostly is caused by the bogus memory autodetection on the
mga chips. Therefore you may want to add the 'Option "Crtc2Ram"' resp.
'Option "Crtc2Half"' to your first device section to specify the correct
amount of video memory for the second head.

Additionally, the option 'VideoRam' in the first head specifies the total
amount of available VideoRam for your physical card and is invalid in the
second device section (for your special card), so your device sections should
look like this (assuming that you are using a card with 32MiB of VideoRam):

Code:

Section "Device"
Identifier "G550"
Driver "mga"
VendorName "Matrox"
VideoRam 32768
Option "Crtc2Half" "True"
Option "DPMS" "true"
BusID "PCI:1:0:0"
Screen 0
EndSection

Section "Device"
Identifier "G550 TV"
Driver "mga"
VendorName "Matrox"
BusID "PCI:1:0:0"
Screen 1
EndSection

This did not seem to make any difference on the behaviour of the system. The log file comments concerning video ram did differ. I am not even positive if my G550 has 32 KB memory.
Quote:

My guess is that the problem with aiglx has something to do with Metacity?

It definetly has, but before your post I never heard about such troubles
with composite managers and the mga cards. I guess your setup must be
slightly different in some parts.

They mention something about DRI locking on Matrox cards in section Known not to work and also something about updated X-server, metacity and stuff in the Overview section.
http://fedoraproject.org/wiki/RenderingProject/aiglx
Matroxfb enabled or not, enabling the AIGLX results in the infinite engine restart loop.

I will include my kernel .config in this post. I made the following change to fix a Skype bug/feature
Code: Select all
This seems to be solved adjusting 2 kernel parameters:
Processor type and features --->
-- Preemption Model (Preemptible Kernel (Low-Latency Desktop))
-- Timer frequency (250 HZ)


The major kernel and processor parameters are:

Code: Select all
localhost linux # uname -a
Linux localhost 2.6.18-gentoo-r6 #11 PREEMPT Tue Feb 27 18:45:52 EET 2007 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux


Some possibly relevant version numbers:

x11-base/xorg-server Latest version installed: 1.1.1-r1
x11-base/xorg-x11 Latest version installed: 7.1
matroxdriver_mga-x86_32-4.4.2-installer.run # matrox driver

My current video configuration is acceptable but probably not optimal: The CPU can just handle Chromium on head 1 and Xine+DVD on head 2 with display depth 16. Display depth 24 also works for both applications but not at the same time. Some reduction in CPU load would be welcome. Is the DRI-support for the second head a hardware issue? Should I forget that?
Code: Select all
(EE) MGA(1): Not initializing the DRI on the second head
(EE) AIGLX: Screen 1 is not DRI capable

The xshm video driver was the best available option for Xine. I do not seem to be able to use the mga or xv driver in xine or mplayer. I wonder if there is something to be gained with a different video output driver? All suggestions are welcome.
Tuomas
Private
Private
 
Posts: 6
Joined: Tue Feb 27, 2007 8:02 pm
Location: Finland

Postby tuxx-home.at » Tue Mar 06, 2007 10:46 am

They mention something about DRI locking on Matrox cards in section Known
not to work and also something about updated X-server, metacity and stuff in
the Overview section.


This site is quite out of date. They're right that there's some DRI locking bug
around, better said: there _WAS_ some DRI locking bug around, but with 4.4.2
this should be fixed due to the merged with the xorg mga driver.

Maybe there's another DRI locking bug with newer Xorg/metacity/etc. releases
that shows up now with 4.4.2, but currently, I'm unable to test this.

As mentioned in another post, I'll have to do another merged with the Xorg
mga driver to see what has changed, but that takes some time, unfortunately...

I will include my kernel .config in this post.


Well, where is it? :)

The CPU can just handle Chromium on head 1


That's due to the use of Xinerama. Currently with the mga driver, DRI is not
supported well in multihead setups. By the end of march, there should be
an updated mga driver available by Matrox that propably will fix this.

Is the DRI-support for the second head a hardware issue?


Back when I used a G550 on Windows, I had full acceleration on both heads,
so I don't think so.

The xshm video driver was the best available option for Xine. I do not seem
to be able to use the mga or xv driver in xine or mplayer. I wonder if there
is something to be gained with a different video output driver?


I'm afraid xshm is your only option, as the second head is not accelerated.
User avatar
tuxx-home.at
Supreme Commander
Supreme Commander
 
Posts: 2199
Joined: Mon Jan 01, 2007 12:51 pm
Location: Vassach - Austria - Europe

.config

Postby Tuomas » Thu Mar 08, 2007 10:30 pm

Quote:

I will include my kernel .config in this post.


Well, where is it? Smile

Well, it was safe and sound on my hard disk. Now it should also be an attachement to this post 8)
The CPU can just handle Chromium on head 1


That's due to the use of Xinerama. Currently with the mga driver, DRI is not
supported well in multihead setups. By the end of march, there should be
an updated mga driver available by Matrox that propably will fix this.

I don't have "Xinerama" explicitly enabled in my xorg.conf.

Anyway thank you for your post and great work. For now I can survive with my current configuration. I will test the new driver when it emerges and report on the result.

Tuomas
Tuomas
Private
Private
 
Posts: 6
Joined: Tue Feb 27, 2007 8:02 pm
Location: Finland

Postby tuxx-home.at » Mon Mar 12, 2007 1:49 pm

Now it should also be an attachement to this post


Well, and what if it isn't? :)

I will test the new driver when it emerges and report on the result.


That would be great.

I don't have "Xinerama" explicitly enabled in my xorg.conf.


Well, but you still have the 'AIGLX "off"' thing in your xorg.conf, right?
User avatar
tuxx-home.at
Supreme Commander
Supreme Commander
 
Posts: 2199
Joined: Mon Jan 01, 2007 12:51 pm
Location: Vassach - Austria - Europe

.kernel

Postby Tuomas » Mon Mar 12, 2007 7:24 pm

Quote:

Now it should also be an attachement to this post


Well, and what if it isn't? Smile

Well. It seems quite evident that computers are much too complicated machines for me to use. Trying again :? once more ... Hmmm, taking notice of error messages helps: The filename extension was not allowed. Now there should finally be an attachement


Quote:

I don't have "Xinerama" explicitly enabled in my xorg.conf.


Well, but you still have the 'AIGLX "off"' thing in your xorg.conf, right?

Right.
Attachments
kernel_config.conf
.config
(32.35 KiB) Downloaded 98 times
Tuomas
Private
Private
 
Posts: 6
Joined: Tue Feb 27, 2007 8:02 pm
Location: Finland

Postby tuxx-home.at » Wed Mar 14, 2007 5:55 pm

Now there should finally be an attachement


Yep. Looks good.

Well, but you still have the 'AIGLX "off"' thing in your xorg.conf, right?

Right.


Try removing it from your xorg.conf, because it may be the reason for the
acceleration being disabled.
User avatar
tuxx-home.at
Supreme Commander
Supreme Commander
 
Posts: 2199
Joined: Mon Jan 01, 2007 12:51 pm
Location: Vassach - Austria - Europe

Back to the original problem

Postby Tuomas » Wed Mar 14, 2007 8:25 pm

Removing the Option "AIGLX" "off" gets me back to the original infinite engine restart problem that was the topic of my first two posts.

With AIGLX off or on the log files do not differ much. Both versions mention that direct rendering is enabled for head 0 and disabled for head 1
Code: Select all
(II) MGA(0): Direct rendering enabled
(WW) MGA(1): Direct rendering disabled


Both log files are included mainly as my excercise for attaching files :)
The difference looks like:
Code: Select all
localhost log # diff Xorg.0.aiglx_on.log Xorg.0.aiglx_off.log
14c14
< (==) Log file: "/var/log/Xorg.0.log", Time: Wed Mar 14 19:47:29 2007
---
> (==) Log file: "/var/log/Xorg.0.log", Time: Wed Mar 14 19:42:22 2007
34a35
> (**) Option "AIGLX" "off"
227c228
< (==) AIGLX enabled
---
> (**) AIGLX disabled
732c733
< (II) MGA(0): [drm] mapped SAREA 0xe09b5000 to 0xb43fd000
---
> (II) MGA(0): [drm] mapped SAREA 0xe09b5000 to 0xb43ec000
809,834d809
< drmOpenDevice: node name is /dev/dri/card0
< drmOpenDevice: open result is 8, (OK)
< drmOpenByBusid: Searching for BusID pci:0000:01:00.0
< drmOpenDevice: node name is /dev/dri/card0
< drmOpenDevice: open result is 8, (OK)
< drmOpenByBusid: drmOpenMinor returns 8
< drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
< (WW) AIGLX: 3D driver claims to not support visual 0x23
< (WW) AIGLX: 3D driver claims to not support visual 0x24
< (WW) AIGLX: 3D driver claims to not support visual 0x25
< (WW) AIGLX: 3D driver claims to not support visual 0x26
< (WW) AIGLX: 3D driver claims to not support visual 0x27
< (WW) AIGLX: 3D driver claims to not support visual 0x28
< (WW) AIGLX: 3D driver claims to not support visual 0x29
< (WW) AIGLX: 3D driver claims to not support visual 0x2a
< (WW) AIGLX: 3D driver claims to not support visual 0x2b
< (WW) AIGLX: 3D driver claims to not support visual 0x2c
< (WW) AIGLX: 3D driver claims to not support visual 0x2d
< (WW) AIGLX: 3D driver claims to not support visual 0x2e
< (WW) AIGLX: 3D driver claims to not support visual 0x2f
< (WW) AIGLX: 3D driver claims to not support visual 0x30
< (WW) AIGLX: 3D driver claims to not support visual 0x31
< (WW) AIGLX: 3D driver claims to not support visual 0x32
< (II) AIGLX: Loaded and initialized /usr/lib/dri/mga_dri.so
< (II) GLX: Initialized DRI GL provider for screen 0
< (EE) AIGLX: Screen 1 is not DRI capable
840a816
> (II) GLX: Initialized MESA-PROXY GL provider for screen 0
875,885d850
< (II) Screen 0 shares mem & io resources
< (II) Screen 1 shares mem & io resources
< (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
< (II) No APM support in BIOS or kernel
< (II) Screen 0 shares mem & io resources
< (II) Screen 1 shares mem & io resources
< (II) Screen 0 shares mem & io resources
< (II) Screen 1 shares mem & io resources
< (II) Entity 0 shares no resources
< (II) Entity 1 shares no resources
< (II) Mouse1: ps2EnableDataReporting: succeeded
888,913d852
<
< Backtrace:
< 0: /usr/bin/X(xf86SigHandler+0x85) [0x80bfcd5]
<
< Fatal server error:
< Caught signal 11.  Server aborting
<
< (II) Screen 0 shares mem & io resources
< (II) Screen 1 shares mem & io resources
< (EE) MGA(0): [dri] Idle timed out, resetting engine...
< (EE) MGA(0): [dri] Idle timed out, resetting engine...etc...etc...etc
Attachments
Xorg.0.aiglx_on.log
#Option &quot;AIGLX&quot; &quot;off
(45.09 KiB) Downloaded 72 times
Xorg.0.aiglx_off.log
Option &quot;AIGLX&quot; &quot;off
(42.33 KiB) Downloaded 81 times
Tuomas
Private
Private
 
Posts: 6
Joined: Tue Feb 27, 2007 8:02 pm
Location: Finland


Return to Matrox G-Series Cards

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron