X Segmentation fault with dual-head config on Matrox G45FMDVP32DB /32MB /DVI /VGA

Bug #1180986 reported by Jaromír Cápík on 2013-05-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xserver-xorg-video-mga (Ubuntu)

Bug Description


We're experiencing problems when running X server configured for dual-head with Matrox G45FMDVP32DB.
The crash doesn't appear with single screen config.

lspci -nn
02:00.0 VGA compatible controller [0300]: Matrox Electronics Systems Ltd. MGA G400/G450 [102b:0525] (rev 85)


Jaromír Cápík (tavvva) wrote :
Jaromír Cápík (tavvva) wrote :
Tormod Volden (tormodvolden) wrote :

What was the latest version (xserver and driver) where this worked?

It might not be too difficult to fix this if you can provide a full backtrace. Please see https://wiki.ubuntu.com/DebuggingProgramCrash

Jaromír Cápík (tavvva) wrote :

Hello Tormod.

This was the first time I tested Matrox dual-head with Ubuntu. I'm not 100% sure if i remember that correctly, but I think it worked correctly with Mageia 2. Of course they could have completely different component versions and local patches. I tried to figure out what component the issue lies in by testing an ATI Radeon 7000 card with dual-head in the same computer and it worked without problems. Both screens worked correctly and I could manage them with xrandr ... so .... I believe it must be the MGA driver. As the Xorg guys still doing enhancements and forget to redesign drivers dependent on removed obsolete features, it's kinda expectable. Anyway, according to the manuals on the Internet, this feature worked correctly in the past.

If you have any questions or request, don't hesitate to ask. I'm willing to do any tests, if you want.

Thanks and regards,

Jaromír Cápík (tavvva) wrote :

Hello Tormod.

I finally found some time to collect the backtrace.
Jumping to 0x00000000 is unhealthy ...

#0 0x00000000 in ?? ()
#1 0xb6fda380 in MGACrtc2FillStrip (pScrn=pScrn@entry=0xb7ff6838) at ../../src/mga_driver.c:3170
#2 0xb6fdba2a in MGAScreenInit (pScreen=0xb800f320, argc=1, argv=0xbf92a714) at ../../src/mga_driver.c:3553
#3 0xb7591e2f in AddScreen (pfnInit=0xb6fdb260 <MGAScreenInit>, argc=argc@entry=1, argv=argv@entry=0xbf92a714) at ../../dix/dispatch.c:3830
#4 0xb75d8035 in InitOutput (pScreenInfo=0xb7786280 <screenInfo>, argc=argc@entry=1, argv=argv@entry=0xbf92a714)
    at ../../../../hw/xfree86/common/xf86Init.c:913
#5 0xb757ef06 in main (argc=1, argv=0xbf92a714, envp=0xbf92a71c) at ../../dix/main.c:204


Tormod Volden (tormodvolden) wrote :

Thanks! That line 3170 in the patched Ubuntu version is line 3125 upstream: pMga->RestoreAccelState(pScrn);
Other occurences of this function pointer have been guarded with XAA ifdefs, so it is only initialized if XAA is available in the server. XAA disappeared after Precise IIRC so this explains the regression, probably also seen in Quantal.

Jaromir, I have made a patch that hopefully will fix this. I am attaching a debdiff that can be used for a SRU request if it works fine. For your convenience I have also uploaded a patched package for Raring to my PPA. Please test and report back.

Jaromír Cápík (tavvva) wrote :

Hello Tormod.

Thanks for the quick response. The PPA package build is going to start in 10 hours and therefore I tried to rebuild the package for quantal by myself. It stopped crashing, but it still doesn't work with dual-head. I get only a black screen when trying dual-head. It works correctly with a single screen.

Any ideas?


Jaromír Cápík (tavvva) wrote :

Strange ... after switching to single screen config and then back to dual-head, everything works correctly ...

I have to do this ritual after each reboot, so it seems the card isn't correctly initialized when going directly into dual-head.

The attachment "SRU debdiff for Raring" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Tormod Volden (tormodvolden) wrote :

Ok, I am glad the crashes went away. I think we should treat the initial black screen in another bug report, so it doesn't hold up this crash fix. Can you please then post logs from the initial dual screen run (black screen), single screen run and successful dual-screen run?

Please also include the xorg.conf files you are using and which Ubuntu versions you have tested on (successfully or not).

Changed in xserver-xorg-video-mga (Ubuntu):
status: New → Confirmed
Jaromír Cápík (tavvva) wrote :

Ok. Sounds reasonable.

Chris Halse Rogers (raof) wrote :

We've got a debdiff for raring, but before we can SRU that we need to know that it's fixed in Saucy - does this bug apply to saucy?

Tormod Volden (tormodvolden) wrote :

I am pretty sure it is the same problem and solution in Saucy. Here is a debdiff for Saucy.

For upstream, I think Cyril's 02- Debian patch is a prerequisite and it hasn't been upstreamed either, so dualview is simply broken upstream. I will (re)post that one together with my one on xorg-devel (soon). There is also a related third patch from Matthieu in December, but that one is not needed for Ubuntu.

Tormod Volden (tormodvolden) wrote :

The posted patch + the 02- Debian patch (from Andy via Cyril) are now both upstream.

no longer affects: linuxmint
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers