Ubuntu

Xinerama broken since intrepid on MGA

Reported by Adrian Quark on 2008-11-01
122
This bug affects 14 people
Affects Status Importance Assigned to Milestone
X.Org X server
Confirmed
High
xserver-xorg-video-mga (Ubuntu)
High
Chris Halse Rogers
Declined for Karmic by Timo Aaltonen
Declined for Maverick by Timo Aaltonen
Lucid
Undecided
Unassigned
Natty
High
Chris Halse Rogers

Bug Description

Binary package hint: xserver-xorg-video-mga

I have a Matrox G450 dual-head. When I start Xorg with a second screen enabled, it errors with the message:
MGA(0): Unable to map BAR 0. Invalid argument (22)

This problem is referenced elsewhere on the internet, so far without a solution:
https://answers.launchpad.net/ubuntu/+source/xorg/+question/49251
http://www.linux-club.de/viewtopic.php?f=48&t=97381

If I disable the second screen, it starts up fine (but with the same image on both monitors). I realize Xinerama is deprecated in favor of xrandr but the version of the mga driver in intrepid doesn't seem to support xrandr configuration -- http://wiki.debian.org/XStrikeForce/HowToRandR12 suggests that version 1.9.99 of the mga driver is needed to support randr, and following the directions on that page does not have any effect.

$ lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10

$ apt-cache policy xserver-xorg-video-mga
xserver-xorg-video-mga:
  Installed: 1:1.4.9.dfsg-1build1
  Candidate: 1:1.4.9.dfsg-1build1
  Version table:
 *** 1:1.4.9.dfsg-1build1 0
        500 http://archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

$ cat /etc/X11/xorg.conf
Section "Device"
 Identifier "MGA[0]"
 Driver "mga"
 BusID "PCI:1:0:0"
 Screen 0
EndSection

Section "Device"
 Identifier "MGA[1]"
 Driver "mga"
 BusID "PCI:1:0:0"
 Screen 1
EndSection

Section "Monitor"
 Identifier "ViewSonic"
 Option "DPMS"
EndSection

Section "Monitor"
 Identifier "Westinghouse"
 Option "DPMS"
EndSection

Section "Screen"
 Identifier "Left Screen"
 Monitor "ViewSonic"
 Device "MGA[0]"
EndSection

Section "Screen"
 Identifier "Right Screen"
 Monitor "Westinghouse"
 Device "MGA[1]"
EndSection

Section "ServerLayout"
 Identifier "Xinerama"
 Screen "Left Screen"
 Screen "Right Screen" RightOf "Left Screen"
 Option "Xinerama" "on"
EndSection

description: updated
Changed in xserver-xorg-video-mga:
status: New → Confirmed
Antti Ruonakoski (anttimr) wrote :

I can confirm this, because I have exactly the same adapter and setup resulting in the same error. My xorg.0.log is essentially similar, but I'm happy to post it here if needed for investigation.

I am having the same problem with the same card. I would very much enjoy any way to get dual-screens working again.

1 comments hidden view all 118 comments
Xtr3me (sjors-sjorsbaltus) wrote :

I have the same problem. Hopefully this is going to be fixed fast.

Svarec (jsvada) wrote :

I have also this problem. Card is G550 DualHead

I also see this issue. My card is a G550 dual head.

Andy MacLean (andy-ub1) wrote :

I have the same issue with a G550 card in dual head mode and managed to change the code to get it all working with some nasty hacks. It looks like it was broken when they changed the driver to use libpciaccess to map memory regions instead of using the old xf86MapPciMem calls. There are two problems:

-> It tries to map the card's IO and iload regions twice, once for each head. libpciaccess doesn't like having two mappings for the same PCI region in the same device so it gives back EINVAL and this causes the breakage. I took out the check in pci_device_map_range in libpciaccess and this worked OK.

-> The new code maps the whole framebuffer into both heads because it uses region->base_addr and region->size instead of pMga->FBAddress and pMga->FbMapSize. This makes both displays draw onto a single monitor and it all looks very silly. I changed that in the mga driver and it works fine now.

I can attach patches if anyone likes but they're a bit hacky and the first change in particular is probably not the right way to fix the problem.

Bubnov (ybubnov) wrote :

I have same issue.
To Andy : Could you post your fix?

Ampfinger (werbedreck) wrote :

I can confirm this bug! Would be nice if it could be fixed.

@Andy MacLean: Maybe you can post your fix :)

Dario Berzano (l3g3nd4ryf0x) wrote :

I can confirm this bug on a G450 too.

It would be totally nice to have this patch posted here :)

Andy MacLean (andy-ub1) wrote :

OK. I'm going to try to do a better patch than this which just changes the MGA driver but for now you need two patches. Here is the first against the libpciaccess library which disables the duplicate mapping check. This isn't how it should be done, but it's a quick hack and it does get the thing from completely broken to working a bit. You need the next patch to get it working in a usable way.

This is just a quick hack so far which worked for me but your mileage may vary!

I don't know how you're supposed to submit patches here so I did mine with diff -urN old-src/commin_interface.c src/common_interface.c. To apply it you just go to the src directory and do 'patch < libpciaccess.patch'. If there's some other way it's meant to be done then please let me know.

Andy MacLean (andy-ub1) wrote :

Oops, sent the above without a comment. The second patch is against the xserver-xorg-video-mga package. Patch in the src directory again. It maps the framebuffers correctly and makes the mga driver work in xinerama mode for me. As with the above, this works for me but use at your own risk!

95 comments hidden view all 118 comments

This bug is forwarded from https://.launchpad.net/bugs/292214.

when the mga driver is configured for xinerama, the server aborts with the message:

MGA(0): Unable to map BAR 0. Invalid argument (22)

This bug is confirmed in ubuntu and OpenSuse at http://www.linux-club.de/viewtopic.php?f=48&t=97381.

I belive it is different to #9261 (this is no segfault).

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-mga/+bug/292214/comments/8 has a first analyses of this issue:

  Andy MacLean (0) wrote on 2008-11-07: (permalink)

I have the same issue with a G550 card in dual head mode and managed to change the code to get it all working with some nasty hacks. It looks like it was broken when they changed the driver to use libpciaccess to map memory regions instead of using the old xf86MapPciMem calls. There are two problems:

-> It tries to map the card's IO and iload regions twice, once for each head. libpciaccess doesn't like having two mappings for the same PCI region in the same device so it gives back EINVAL and this causes the breakage. I took out the check in pci_device_map_range in libpciaccess and this worked OK.

-> The new code maps the whole framebuffer into both heads because it uses region->base_addr and region->size instead of pMga->FBAddress and pMga->FbMapSize. This makes both displays draw onto a single monitor and it all looks very silly. I changed that in the mga driver and it works fine now.

95 comments hidden view all 118 comments
Ampfinger (werbedreck) wrote :

Yeah, thanks a lot! It works for me :)

Changed in xorg-server:
status: Unknown → Confirmed

Two notes:
- It's not strictly xinerama that is broken but multi-head support in general.
- As a workaround, I installed the "old" xorg distribution from hardy, works fine even in intrepid.

Jerry West (jerry-west) wrote :

Johannes,

Thanks for the good news there! Could you perhaps post a brief 'how-to' for non-experts to install the old xorg distribution, please? Assume we have no X display :-( but are quite happy using apt-get, etc. What package do we remove (just 'xorg' ??) and what changes are required to /etc/apt/source.list to load the old version? Is it just a matter of (temporarily) changing all references from intrepid to hardy?

Many thanks,
  A bemused user who needs to get up & running again asap.

Antti Ruonakoski (anttimr) wrote :

Thank you Andy MacLean.
Patched versions of libpciaccess and xserver-xorg-video-mga are now available in my PPA. And yes - after installing them xserver starts up fine with the old-style xinerama based xorg.conf. I could not see any disadvangates during a couple minutes of testing.

I recognize everybody planning to install patched versions has noticed Andy's comment that patches are quick hacks, not perfect. While using Hardy's xorg might be much a better option I'd like to offer these packages as a quick and easy workaround.

https://launchpad.net/~anttimr/+archive

How to install the old xorg distribution:
1. add to /etc/apt/sources.list: deb http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
2. sudo aptitude install --without-recommends xserver-xorg=1:7.3+10ubuntu10
I got the version by looking at the output of: aptitude -v show xserver-xorg
3. dpkg screwed up the first time I ran (2) so I had to run it again, reject the first suggestion offered (n), and accept the second (y); this time it worked
4. sudo aptitude hold xserver-xorg

This is just a temporary solution, as you won't receive updates to the hardy version. (Someone who knows about "pinning" can perhaps explain how to set that up.) When you're ready to upgrade again, do: sudo aptitude unhold xserver-xorg

This is how I installed the old xorg (if I knew what I was doing it would probably work without the dpkg --purge...):

Added the following lines to /etc/apt/sources.list:
deb http://de.archive.ubuntu.com/ubuntu/ hardy main restricted
deb http://de.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb http://security.ubuntu.com/ubuntu hardy-security main restricted

cd /var/lib/dpkg/info/
dpkg --purge `ls *xorg*.list | sed s/.list// `
dpkg --purge `ls *xorg*.list | sed s/.list// `
dpkg --purge kubuntu-desktop
dpkg --purge `ls *xorg*.list | sed s/.list// `
apt-get --reinstall install x11-common/hardy
apt-get install xserver-xorg-video-mga/hardy xserver-xorg-core/hardy xserver-xorg-video-glint/hardy xserver-xorg/hardy xserver-xorg-input-evdev/hardy xserver-xorg-input-kbd/hardy xserver-xorg-input-mouse/hardy

Dario Berzano (l3g3nd4ryf0x) wrote :

Antti,

  your binary packages do work for me, thank you!

Andy MacLean (andy-ub1) wrote :

Here is a better patch for the mga driver which doesn't require the changes to libpciaccess. This one eliminates the duplicate mappings and counts how many heads are using mapping to prevent unmapping too early. It also fixes a bug I found where the i2c monitor detection on the second head leaves mappings behind forever.

I think this is a reasonably good way to fix the problem and it works fine on my machine. I'm no expert on matrox cards or Xorg drivers though so, as before, use with caution.

Andy MacLean (andy-ub1) wrote :

I finally got the whole source package building/PPA thing working properly. I've put an mga package in my ppa with the nicer fix in it. It works without the libpciaccess patch and is running fine on my machine.

https://launchpad.net/~andy-ub1/+archive

Vyacheslav (armag-vvg) wrote :

Thank you for your patch. New driver works good.

Unfortunately I must setup ServerLayout section in my xorg.conf for this. So, I can't use autodetection feature and "change resolution" applet.
If I don't setup ServerLayout, I get next text in the xorg.log and the server crashes.

(==) MGA(0): Depth 24, (==) framebuffer bpp 32
(==) MGA(0): RGB weight 888
(==) MGA(0): Using AGP 1x mode
(==) MGA(0): Using HW cursor
(==) MGA(0): Using XAA acceleration
(--) MGA(0): Linear framebuffer at 0xF4000000
(--) MGA(0): MMIO registers at 0xFDE00000
(--) MGA(0): Pseudo-DMA transfer window at 0xFD000000
(--) MGA(0): Video BIOS info block at offset 0x07D00
(II) MGA(0): MAPPED Framebuffer F4000000 2000000 to 0xb5b74000.

Backtrace:
0: /usr/X11R6/bin/X(xf86SigHandler+0x79) [0x80c3009]
1: [0xb80d9400]
2: /usr/lib/xorg/modules/drivers//mga_drv.so [0xb7b85c51]
3: /usr/X11R6/bin/X(InitOutput+0x96f) [0x80aac9f]
4: /usr/X11R6/bin/X(main+0x279) [0x8071b19]
5: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7cdd685]
6: /usr/X11R6/bin/X [0x8071101]
Saw signal 11. Server aborting.

Poningru (poningru) wrote :

Yeah I got the same issue... didnt really try to troubleshoot other than look through the log files.

(II) Loading /usr/lib/xorg/modules//libvgahw.so
(II) Module vgahw: vendor="X.Org Foundation"
 compiled for 1.5.2, module version = 0.1.0
 ABI class: X.Org Video Driver, version 4.1
(--) MGA(0): Chipset: "mgag400" (G450)
(II) MGA(0): Creating default Display subsection in Screen section
 "Default Screen" for depth/fbbpp 24/32
(==) MGA(0): Depth 24, (==) framebuffer bpp 32
(==) MGA(0): RGB weight 888
(==) MGA(0): Using AGP 1x mode
(==) MGA(0): Using HW cursor
(==) MGA(0): Using XAA acceleration
(--) MGA(0): Linear framebuffer at 0xF8000000
(--) MGA(0): MMIO registers at 0xE0100000
(--) MGA(0): Pseudo-DMA transfer window at 0xE0800000
(--) MGA(0): Video BIOS info block at offset 0x07720
(II) MGA(0): MAPPED Framebuffer F8000000 2000000 to 0xb5b80000.

Backtrace:
0: /usr/X11R6/bin/X(xf86SigHandler+0x79) [0x80c3009]
1: [0xb80e3400]
2: /usr/lib/xorg/modules/drivers//mga_drv.so [0xb7b91c51]
3: /usr/X11R6/bin/X(InitOutput+0x96f) [0x80aac9f]
4: /usr/X11R6/bin/X(main+0x279) [0x8071b19]
5: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7cec685]
6: /usr/X11R6/bin/X [0x8071101]
Saw signal 11. Server aborting.

Andy MacLean (andy-ub1) wrote :

Thanks for the feedback, that's a silly mistake in the patch. The patched version of the driver ONLY works with a dual head setup, it can't be used when there's only 1 screen or you get a NULL deref. Should have thought of that really. Will do another one tomorrow (my home PC doesn't have a matrox card) and try it with a single head setup as well.

Incidentally I believe the autodetect and screen resolution applet rely on an XRandR extension which isn't present in this driver. The first comment in the bug claims this is in a newer version of the driver but not in this version. I think that means that without a ServerLayout section you'll only ever get single head mode with this version of the driver.

Vyacheslav (armag-vvg) wrote :

It is strange for me, that Xrandr doesn't work in the patched driver. I see "(==) RandR enabled" for both screens in the Xorg.0.log. Additionally there is a line "(II) Initializing built-in extension RANDR". So, all should work accordingly to the log. But, when I run simple utility xrandr, it tell me, that xrandr doesn't work. May be it happens only due to the "ServerLayout" section?...

For original 1.4.9 driver I see the same strings in the log (single head mode) and xrandr utility works fine.

And one more question. Does 3D acceleration work in the dual-head mode?

Andy MacLean (andy-ub1) wrote :

Here's a new version of the patch that works with both 1 and 2 head mode. The package in my PPA has been updated to have the newer version.

Andy MacLean (andy-ub1) wrote :

I see the same RANDR behaviour here, it works in single head mode but not in multi-head. Doing 'xdpyinfo |grep RANDR' shows the extension present in one case but not the other. I don't think this is anything to do with my patch though, we have an Ubuntu 8.04 machine here that behaves in exactly the same way.

As far as I can tell 3D acceleration works just fine in dual head mode. Previous versions of the driver used to only render the 3d on one of the two heads and if you moved a 3d window to the other head it went blank. This version runs glxgears fine for me at 115 FPS. I have Option "AccelMode" "EXA" in both of my "Device" sections but I don't know if this is necessary. It doesn't seem to be Compiz capable though, I get 'The Composite extension is not available', so no funky rippling water effects for this desktop.

Poningru (poningru) wrote :

Thank you Andy. You are right re: the RANDR I think its an upstream issue. I will try to open a bug report for mga upstream and add it to this bug.
Once again thank you, I will test the new stuff out asap and report back.
-Eldo

Using Andy's patched package, I am able to get both screens up again, but the second monitor is distorted like there is a sync problem. However, the monitor is reporting that the signals are correct.

I am using a G550 Dual head with two Dell 2005FPW monitors at 1680x1050.

If I force the second monitor to a different resolution (like 1280x1024), then it will display, but it is distorted due to the wrong aspect ratio. Also, even though I can move windows over to that side, it's almost like the desktop doesn't extend that far. There are no backgrounds or any context menus from the desktop there.

Of course, this all worked fine before updating from Hardy to Intrepid.

Other things I've noticed: Control panel for the display crashes (saw that with KDE4 in Hardy), X -configure does not work with mga driver, mga_hal_drv doesn't like to load.

Andy MacLean (andy-ub1) wrote :

I wonder if the framebuffer for the second head is too small. By default you only get 8Mb for it and you've a high resolution display. Have you tried using

Option "Crtc2Half" "true"

 in the device section for both heads? That should split the framebuffer more evenly and might make the second head work better.

Tried that and other options. When I set the above option, I see this
(note that video and Crtc2 RAM are the same):

(II) MGA(0): Primary V_BIOS segment is: 0xc000
(**) MGA(0): Using 32 MB of AGP memory
(**) MGA(0): Using AGP 4x mode
(--) MGA(0): Linear framebuffer at 0xD0000000
(--) MGA(0): Pseudo-DMA transfer window at 0xD2000000
(--) MGA(0): Video BIOS info block at offset 0x07D20
(II) MGA(0): MAPPED Framebuffer D0000000 2000000 to FFFFFFFFB598E000.
(II) MGA(0): UNMAPPING framebuffer 0xFFFFFFFFB598E000, 0x2000000.
(**) MGA(0): Crtc2 will use 16384K of VideoRam
(--) MGA(0): VideoRAM: 16384 kByte

Without that option, I get:
(--) MGA(0): Crtc2 will use 8192K of VideoRam
(--) MGA(0): VideoRAM: 24576 kByte

Both cases are the same. The second screen is messed up with black
slightly diagonal lines (going down from left to right), but obvious
changes to the distortion when I move the pointer onto that screen. I
can use a lower resolution on that screen which makes it viewable, but
its the wrong aspect ratio and the kde desktop doesn't seem to recognize
it completely (I can put windows over there, but none of the tools seem
to recognize that section).

Both sections of the Xorg.0.log file for MGA(0) and MGA(1) indicate they
picked this modeline to use:
(II) MGA(0): Modeline "1680x1050"x60.0 146.25 1680 1784 1960 2240
1050 1053 1059 1089 -hsync +vsync (65.3 kHz)
(II) MGA(1): Modeline "1680x1050"x60.0 146.25 1680 1784 1960 2240
1050 1053 1059 1089 -hsync +vsync (65.3 kHz)

I had a similar problem to Troy after installing Andy's patch - almost gave up and went back to Hardy - but found that after a reboot (I had been killing the X-server after each change) both screens were working as expected.

I have also found that trying to access 'display' crashes the control panel.

I started with a new intrepid kubuntu install, did an apt-get update/upgrade, then changed my xorg.conf file to do dual head and got the BAR 0 issue. I then installed Andy's ppa mga driver and rebooted the machine. I get the same result as before. The second monitor looks out of sync (diagonal lines, distorted picture), and when I swtich back to console mode, the screen resolution on the second monitor is 720x350@70 Hz (according to the monitor's status screen).

Both monitors should be running at 1680x1050@60Hz. The primary monitor seems to be correct in that regard, and the second monitor _reports_ that it is getting set to that resolution/refresh rate, but something must not be reporting correctly.

I've also tried mergedFB, but it fails when it complains it cannot load mga_hal. Since I am using a PCI G550 (I think it might be dual DVI, but I am using the monitors in analog mode), I didn't think the driver was supposed to try to load mga_hal. In any case, mga_hal is not installed.

Well, as a temporary fix, I went with the solution that installs Hardy's xorg packages along with the "unofficial" 4.4.4 driver. Unfortunately, now the system is constantly wants to upgrade the whole xorg system back to the Intrepid versions. I don't want to upgrade all that again until I am sure it will do dual monitor (in my setup) will work.

Martijn Vermaat (mvermaat) wrote :

What is the status of the mga 1.9.x driver? It is suggested that it is needed for xrandr support, but it looks like 1.4.8 and 1.4.9 were released after 1.9.99:

http://cgit.freedesktop.org/xorg/driver/xf86-video-mga/

and 1.9.99 (as well as 1.9.100) were never included in Debian (i386) or Ubuntu it seems. Are they still experimental branches waiting to stabilize before replacing 1.4.x?

Has anyone tried 1.9.100? Should it work with Xorg 7.4 in Intrepid and xrandr 1.2?

Martijn Vermaat (mvermaat) wrote :

I tried mga 1.9.100

http://xorg.freedesktop.org/archive/individual/driver/xf86-video-mga-1.9.100.tar.gz

on Xorg 7.4 that comes with Intrepid and with that I can use xrandr to configure both screens.

There are, however, some problems:

* Using accelleration (either EXA or XAA) gives a lot of screen corruption, I have to use Option "NoAccel" "true".
* I cannot get DRI to work, which (I presume) is the reason of very slow scrolling in the browser.

jr244 (jr244) wrote :

Hi there,

I have a dual screen configuration working by following http://bgoglin.livejournal.com/12835.html

here's my lspci:

01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G400/G450 (rev 82)
        Subsystem: Matrox Graphics, Inc. Device 0641
        Flags: bus master, medium devsel, latency 64, IRQ 16
        Memory at f8000000 (32-bit, prefetchable) [size=32M]
        Memory at fdefc000 (32-bit, non-prefetchable) [size=16K]
        Memory at fd000000 (32-bit, non-prefetchable) [size=8M]
        Expansion ROM at fd800000 [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: matrox_w1
        Kernel modules: matrox_w1, matroxfb_base

and I have attached the xorg.conf.

I have installed mga 1.9.100 following the link provided by Martjin. This didn't work for me. However, since I have been messing about with the configuration and drivers of X11 for a few hours now, I may have a part in the result, or not, I have no idea...

Good luck everybody. It's a bit of a pain, eh?

Martijn Vermaat (mvermaat) wrote :

Are you sure you installed 1.9.100 in /usr/lib/xorg/modules/drivers/mga_drv.so (the driver installs to another directory by default)? And I think I also manually applied any relevant patches from the 1.4.9 Ubuntu package before building the driver, but I don't remember if that included anything important.

I should also note that Metacity is only useable under 1.9.100 if I enable compositing (/apps/metacity/general/compositing_manager gconf key).

See also this xorg bug that prevents 1.9.100 to be used with Jaunty's xorg: http://bugs.freedesktop.org/show_bug.cgi?id=20380

There are still some annoyances in my setup with 1.9.100, e.g. none of the video outputs seem to work ok. But xrandr with dual screen and compositing work.

Bryce Harrington (bryce) on 2009-04-02
Changed in xserver-xorg-video-mga (Ubuntu):
assignee: nobody → bryceharrington
importance: Undecided → High
status: Confirmed → Triaged
71 comments hidden view all 118 comments

Bug also reported on Gentoo:
http://bugs.gentoo.org/show_bug.cgi?id=265100

Last Patch available here:
http://launchpadlibrarian.net/19618287/mga-driver-3.patch

I use this patch since yesterday, no problems so far

(Gentoo, AMD64, MGA G550 (DualHead PCIe)

Bryce Harrington (bryce) on 2009-04-08
Changed in xserver-xorg-video-mga (Ubuntu):
assignee: Bryce Harrington (bryceharrington) → nobody

Any news here? I have a few users who confirm the patch works. Could the patch be applied to master?

Thanks

Any news here?

Is it really anoying to use this fix, whenever a new revision / release of the corg server comes, please have a look on this issue.Thanks.

I can not work yet on this bug. Maybe I have it, but, I have tons of other X problems. Two are very ennoying, and prevent me working on the MGA one:
- when X (1.5) starts, it freeses the box (no more ping) => reset
- after reboot, I have no log file anywhere => no way to know what happened.

As long as I dont have logs, I can not comment here. I think launching over ssh will NOT help (too many caches every where in IP layers).

What I can say is that ... I am pretty sure X 1.5 does not take care any more about the conf file. I can also say that I have several Matrox, and one non matrox card; and that, whether I tell the conf to use xinerama or not, I have bugs; but, as it does not read the conf ... and I dont get any log ...

even things like (forgot what I typed exactly)
X -- verbose --debug >>/root/log 2>&1
X freeses immediatly (less than 2s), so, the inode cache is not written on disk. So, even stdout>disk does not work (X freeses the kernel before the ext3 5s auto-sync).

Bryce Harrington (bryce) on 2009-09-02
tags: added: intrepid

I still can not work on this bug. I have a brand new machine, with 3 ATI Radeon cards, dual head each, and i frequently got X freese, or kernel panics. It depends on the driver and the conf. Even using X 1.7 and Mesa 1.4 does not help.

Amongst other problems, I don't what are the required features at the kernel level. Some people mentioned about VGA_ARB ... and KMS, ut i do not understand if they are required, recommended, or discouraged.

I don't know which kind of kernel is required, and which driver is apropriate to help debuging this (ATI, radeon, radeonhd, fglrx ...)

Of course, I still have crashes, and rarely got logs.

I am ready for more tests, but don't know what to do. So many factors impact ...

I have two working conf ATM:
- two heads on the first card
- one head per card, can only mouse the mouse from :0 to :1, and then from :1 to ;2 . Never can move it back.

In either case, the monitor report the resolution to be 1024x768 when i asked for 1280x1024 (monitor can display 1280, but X claims that EDID stuff do not say so). ATM, the best way to have two cards or 2 monitors working is to downgrade to X 1.4. 1.4 does what is in the conf, or shout about what's wrong. 1.5 1.6 and 1.7 just crash, don't report problems, and are sensible to many factors (mesalib, sdllib, kernel conf ... ).

And I did not find any tuto about how to do things.

tags: added: patch
Bryce Harrington (bryce) on 2010-04-13
Changed in xserver-xorg-video-mga (Ubuntu):
status: Triaged → Incomplete
36 comments hidden view all 118 comments
jo (jventure) wrote :

@Eckart
I tried your suggestion on 9.04 but unfortunately it did not help. I will try out 10.04 when it is finally released.

@Petr
Play around with these settings in the device section:

Option "Crtc2Half" # [<bool>]
Option "Crtc2Ram" # <i>

I think you just need to set the first one to "true" (omit the 2nd); although I am not sure - just a guess.

@Marty
Did you try the patch-4 on 10.04 beta2? Can you please clarify what you mean with

"Just remember to also grab patch-3 ( https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-mga/+bug/292214/comments/28 ) and apply the mga.h parts of that diff. "

All I did was install one of the patches via repository, and then played around with xorg.conf - unfortunately with no success. What (&how) do I need to apply to mga.h when I already install the patch from repository (I'm not a programmer). Thanks.

Petr Michalík (petr-michalik) wrote :

Thanks jo,

Option "Crtc2Half" "true" works :)

Petr

jo (jventure) wrote :

@Petr, glad I could help. You say: "...I run Ubuntu 9.10 with G550 AGP and after several tries dual head works for me"; I have the same card, but no luck. What made it work for you finally? Something else than installing the patch from repository and messing around with xorg.conf? Would be nice if you could post how you did it. Thanks.

Petr Michalík (petr-michalik) wrote :

to jo and all whichfind it useful,

here is the description of what I did:

I have a standard Ubuntu 9.10 installation - xserver-xorg-video-mga, version 1:1.4.11.dfsg-1, my adapter is Matrox Millenium G550 (Matrox Graphics, Inc. MGA G550 AGP (rev 01) - from lspci).

I downloaded patched driver from here: http://launchpadlibrarian.net/32153149/mga_drv.so and copied it to /usr/lib/xorg/modules/drivers/ (after backing up the original version).

Then I created xorg.conf (attached).
You probably have to change HorizSync and VertRefresh lines according to your monitors specifications. For the first try you don't need them at all. You also don't need the "Display" subsections at the begining, I added them when it already worked, just to set up preferred resolutions.

Ethan Close (ethan-close) wrote :

I am *very* new to all of this, but I did manage to get the Maxtor G450 working in Dual Monitor mode on 9.10

 I used the exact instructions as Petr's above but changed both the ChipSet values to 'mga400' and the "HorizSync" and "VertRefresh" values as seen in the xorg.conf file that I attached. Before changing the sync and refresh the second monitor at horizontal ribbons running across it.

The screen boots with an odd rectangle in the upper left, but that disappears. The resolution on Screen 1 needs to be reset for my monitor I think, but I have two almost acceptable monitors now. More work needs to be done.

Thank you to everyone!

I hope this post is okay. It's my first on any linux forum.

justin (justin-minions4) wrote :

Eckart's patch worked for me on this issue, once I fixed my foolishly authored (by me) xorg.conf

Bryce Harrington (bryce) wrote :

[This is an automatic notification.]

Hi REPORTER,

This bug was reported against an earlier version of Ubuntu, can you
test if it still occurs on Lucid?

Please note we also provide technical support for older versions of
Ubuntu, but not in the bug tracker. Instead, to raise the issue through
normal support channels, please see:

    http://www.ubuntu.com/support

If you are the original reporter and can still reproduce the issue on
Lucid, please run the following command to refresh the report:

  apport-collect BUGNUMBER

If you are not the original reporter, please file a new bug report, so
we can work with you as the original reporter instead (you can reference
bug BUGNUMBER in your report if you think it may be related):

  ubuntu-bug xorg

If by chance you can no longer reproduce the issue on Lucid or if you
feel it is no longer relevant, please mark the bug report 'Fix Released'
or 'Invalid' as appropriate, at the following URL:

  https://bugs.launchpad.net/ubuntu/+bug/BUGNUMBER

Changed in xserver-xorg-video-mga (Ubuntu):
status: Incomplete → New
status: New → Incomplete
tags: added: needs-retested-on-lucid-by-june
Bryce Harrington (bryce) wrote :

[This is an automatic notification.]

Hi Adrian,

This bug was reported against an earlier version of Ubuntu, can you
test if it still occurs on Lucid?

Please note we also provide technical support for older versions of
Ubuntu, but not in the bug tracker. Instead, to raise the issue through
normal support channels, please see:

    http://www.ubuntu.com/support

If you are the original reporter and can still reproduce the issue on
Lucid, please run the following command to refresh the report:

  apport-collect 292214

If you are not the original reporter, please file a new bug report, so
we can work with you as the original reporter instead (you can reference
bug 292214 in your report if you think it may be related):

  ubuntu-bug xorg

If by chance you can no longer reproduce the issue on Lucid or if you
feel it is no longer relevant, please mark the bug report 'Fix Released'
or 'Invalid' as appropriate, at the following URL:

  https://bugs.launchpad.net/ubuntu/+bug/292214

Changed in xserver-xorg-video-mga (Ubuntu):
status: Incomplete → New
status: New → Incomplete
plopix (erik-code) wrote :

I can confirm that this bug is in lucid.

tags: added: patch-forwarded-upstream
CuTeBoi (anthony-hernandez) wrote :

I can confirm this is still a problem in lucid, has been. And from what I keep reading, will be. If any other information needed, I will check on this bug report in the future.

Tom Adams (tomladams) wrote :

I also had this problem on lucid. Applying the patches automatically failed, but I was able to manually apply the patches and I'm up and running with two monitors. I repackaged patch-3 as it worked on my system and have attached that patch. I've had to fight this across three upgrades. It sure would be nice if this was accepted.

to apply:
sudo apt-get source xserver-xorg-video-mga
cd xserver-xorg-video-mga-1.4.11.dfsg
./configure
make (to be sure it compiles)
cd src
apply the patch
patch < lucid_mga_dual.patch
cd ..
make
sudo cp mga_drv.so /usr/lib/xorg/modules/drivers/mga_drv.so

Tom Adams (tomladams) wrote :

I spoke a little too soon. Things *mostly* work, but there's an irritating bug I've hit 3 times where the mouse cursor rapidly flashes and the mouse locks up. It looks as though it's confused about which monitor it's on and some of the flashes are on the far right of my leftmost monitor and some on the far left of my right monitor. In earlier release I've seen a couple other quirks where there's some confusion about which area is part of which monitor, but this is teh first time there's a lock up.

I've attached my /var/log/Xorg.0.log. There're some errors in there that might be informative if (unlike me) you actually know what you're doing. Here's the bit that caught my attention:

[mi] EQ overflowing. The server is probably stuck in an infinite loop.

Backtrace:
0: /usr/bin/X (xorg_backtrace+0x3b) [0x80e937b]
1: /usr/bin/X (mieqEnqueue+0x1ab) [0x80e8b6b]
2: /usr/bin/X (xf86PostMotionEventP+0xd2) [0x80c2d02]
3: /usr/lib/xorg/modules/input/evdev_drv.so (0x2ec000+0x48a1) [0x2f08a1]
4: /usr/lib/xorg/modules/input/evdev_drv.so (0x2ec000+0x4b96) [0x2f0b96]
5: /usr/bin/X (0x8048000+0x6d5bf) [0x80b55bf]
6: /usr/bin/X (0x8048000+0x122794) [0x816a794]
7: (vdso) (__kernel_sigreturn+0x0) [0xb33400]
8: /usr/lib/xorg/modules/libfb.so (fbBltStip+0x73) [0x4059d3]
9: /usr/lib/xorg/modules/libfb.so (fbGetImage+0x235) [0x40a0e5]
10: /usr/lib/xorg/modules/libxaa.so (0x43a000+0x5d97) [0x43fd97]
11: /usr/lib/xorg/modules/libxaa.so (0x43a000+0x4ab16) [0x484b16]
12: /usr/bin/X (0x8048000+0x162b6f) [0x81aab6f]
13: /usr/bin/X (XineramaGetImageData+0x2bd) [0x80fbcfd]
14: /usr/bin/X (0x8048000+0xbbeec) [0x8103eec]
15: /usr/bin/X (0x8048000+0x2a477) [0x8072477]
16: /usr/bin/X (0x8048000+0x1ed7a) [0x8066d7a]
17: /lib/tls/i686/cmov/libc.so.6 (__libc_start_main+0xe6) [0x165bd6]
18: /usr/bin/X (0x8048000+0x1e961) [0x8066961]
"

justin (justin-minions4) wrote :

I can confirm the bug re-occurs on Lucid. After building and applying Tony's patch above, I was able to enable dual-screen once again.

I haven't had any crashes or lockups yet.

wb8nbs (wb8nbs) wrote :

I am fighting this problem on a 10.04 install. The card is a G450.
Per Petr's post I copied in the driver binary from http://launchpadlibrarian.net/32153149/mga_drv.so but get:
"undefined symbol rssVgaShared" and a server crash on bootup.

My config file is attached

@wb8nbs, please read comment #89 (Tom Adams wrote on 2010-05-06) and try that.

Why is this bug still unresolved anyways?

Sergei Kirjanov (rewlad) wrote :

on lucid #89 fails during ./configure with:

checking for XORG... configure: error: Package requirements (xorg-server >= 1.1.0 xproto fontsproto ) were not met:
No package 'xorg-server' found
No package 'fontsproto' found

On Lucid (based on comment #89):

Commands (you can copy and past these commands if you want:
aptitude -y install build-essential
apt-get -y build-dep xserver-xorg-video-mga
apt-get source xserver-xorg-video-mga
cd xserver-xorg-video-mga-*
./configure
make
cd src
wget -O lucid_mga_dual.patch https://bugs.launchpad.net/xorg-server/+bug/292214/+attachment/1377942/+files/lucid_mga_dual.patch
patch < lucid_mga_dual.patch
cd ..
make
sudo cp mga_drv.so /usr/lib/xorg/modules/drivers/mga_drv.so

Changed in xorg-server:
importance: Unknown → High
wb8nbs (wb8nbs) wrote :

I was able to compile using Michiel's directions but no .so file is produced. I am attaching the output from ./configure and from make.
Can anyone see what I am doing wrong?

sudo cp src/.libs/mga_drv.so /usr/lib/xorg/modules/drivers/mga_drv.so

you can find files in a directory with the command:
find /directory -iname '*.so'

wb8nbs (wb8nbs) wrote :

Thanks Michiel - that found the module. What is the point of compiling into a hidden directory??
But on copying to /usr/lib/xorg/modules/drivers/ the server immediately crashed and would not restart on a reboot.
The log file shows a bus error -- attached.

wb8nbs (wb8nbs) wrote :

I've worked around this problem by E-Baying a newer Nvidia GeFORCE-FX5200 card which does do dual monitors OK with the NVidia supplied driver.

I'm willing to move the Matrox 450 back into the PC if you need something tested.

17 comments hidden view all 118 comments

Created attachment 38982
Fix Xinerama for 1.4.11

Attached a patch to fix Xinerama with version 1.4.11. I've tested this for several days on at least 10 machines without any issues.

17 comments hidden view all 118 comments
Tyler Gates (tgates81) wrote :

Attached patch to enable xinerama 1.4.11. I've used this for several days on several machines without issues. Included this patch upstream as well:
https://bugs.freedesktop.org/process_bug.cgi

I just tested this on Ubuntu 10.10.

- The problem still exists (error message "unable to map BAR 0" when starting with dual-screen setup).
- The patch kind of works (using build instructions from comment #95).
- "kind of" means: I can start X in dual screen mode fine, but as soon as I start Konqueror, the X server crashes

I haven't found any other applications that cause X to crash, but I haven't tried much. Konqueror doesn't cause X to crash when it's running with the unpatched mga_drv.so.

Svarec (jsvada) wrote :

I tested on Ubuntu 10.10 too, but have same problem.

- After installation error message "unable to map BAR 0" when starting with dual-screen setup.
- I tried the patch from comment #95 then the dualhead start well, but when i'd like to start a psi-plus the X-server crashes.

Have you some solution to this or some other patch that works correctly.

Thanks a lot.

The additional problem on Ubuntu 10.10 (X server crashing when starting QT app such as konqueror) has a separate bug report. A patch is also available now. See https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/650539/comments/91

I have just installed Ubuntu 10.10 with G450 Matrox, and came upon this issue.

- I tried running patch from #100, but this didn't work at all.
- I then applied patch manually. This then built a mga_drv.so file that allowed me to boot into the GUI.

I then tried countless versions of the xorg.conf, but the second monitor attached to the DVI never seemed to work.

Until I logged out instead of restarting the machine.

I was always trying out my changes by restarting the machine. And this never worked. But if I log in with an xorg.conf set up for single monitor mode, copy over xorg.conf with one set up for dual monitor mode, then log out, hey presto - both monitors are working at the login screen.

Hope this bit of info helps anyone figure out what is going on.

Martin Pitt (pitti) wrote :

Chris, can you please check out the patch in comment 100, whether it's appropriate? Please reassign to someone else if more appropriate, I'm not quite sure how you, Bryce, and Robert split the work between you. Thanks!

Changed in xserver-xorg-video-mga (Ubuntu Natty):
assignee: nobody → Chris Halse Rogers (raof)
Colm Linehan (colm-linehan) wrote :

On 19 Nov 2010 14:36, "Martin Pitt" <email address hidden> wrote:

Chris, can you please check out the patch in comment 100, whether it's
appropriate? Please reassign to someone else if more appropriate, I'm
not quite sure how you, Bryce, and Robert split the work between you.
Thanks!

** Changed in: xserver-xorg-video-mga (Ubuntu Natty)
    Assignee: (unassigned) => Chris Halse Rogers (raof)

--
Xinerama broken since intrepid on MGA
https://bugs.launchpad.net/bugs/292214
You received this ...

Robert Hooker (sarvatt) wrote :

This is now fixed in natty:

xserver-xorg-video-mga (1:1.4.11.dfsg-4+squeeze1) unstable; urgency=low

  * Add patch: 02_tentatively_unbreak_dual_head.diff, tested by Ferenc
    Wágner (thanks!). Patch by Andy MacLean, stolen from LP's #292214
    (hopefully closes: #562209).
 -- Ubuntu Archive Auto-Sync <email address hidden> Tue, 23 Nov 2010 10:46:53 +0000

Changed in xserver-xorg-video-mga (Ubuntu Natty):
status: Incomplete → Fix Released
Changed in xorg-server:
importance: High → Unknown
Changed in xorg-server:
importance: Unknown → High
Tyler Gates (tgates81) wrote :

Can we please get this pushed out to Lucid? I've been using patch from comment #100 for months without any trouble.

Timo Aaltonen (tjaalton) on 2011-05-25
Changed in xserver-xorg-video-mga (Ubuntu Lucid):
assignee: nobody → Timo Aaltonen (tjaalton)
status: New → In Progress
Timo Aaltonen (tjaalton) wrote :

12.04 LTS is soon released, and includes the fix.

Changed in xserver-xorg-video-mga (Ubuntu Lucid):
assignee: Timo Aaltonen (tjaalton) → nobody
status: In Progress → Won't Fix
Displaying first 40 and last 40 comments. View all 118 comments or add a comment.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.