|Summary:||Xinerama broken with xserver 1.5|
|Product:||xorg||Reporter:||Reinhard Tartler <siretart>|
|Component:||Driver/mga||Assignee:||Tilman Sauerbeck <tilman>|
|Status:||RESOLVED FIXED||QA Contact:||Xorg Project Team <xorg-team>|
|Priority:||high||CC:||benoit, cruzki123, rboesger, remi, saint.snit, siretart|
|i915 platform:||i915 features:|
Description Reinhard Tartler 2008-11-10 12:40:54 UTC
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).
Comment 1 Reinhard Tartler 2008-11-10 12:42:12 UTC
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.
Comment 2 Ronny Boesger 2009-04-07 01:24:36 UTC
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)
Comment 3 Rémi Cardona 2009-05-06 04:55:51 UTC
Any news here? I have a few users who confirm the patch works. Could the patch be applied to master? Thanks
Comment 4 Ronny Boesger 2009-08-18 03:30:59 UTC
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.
Comment 5 DEMAINE Benoit-Pierre 2009-08-18 03:58:57 UTC
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).
Comment 6 DEMAINE Benoit-Pierre 2010-01-21 13:45:55 UTC
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.
Comment 7 Tyler Gates 2010-09-27 06:57:24 UTC
Created attachment 38982 [details] [review] Fix Xinerama for 1.4.11
Comment 8 Tyler Gates 2010-09-27 06:59:13 UTC
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.
Comment 9 Dave 2012-09-13 21:28:25 UTC
I can confirm that: - Xinerama is still broken under version 1.5.0 of the MGA driver - Tyler's patch from comment 7 applies successfully to MGA driver 1.5.0 - this patch fixes Xinerama I applied the patch nearly two months ago, and the machine has been running X with Xinerama continuously for most of the time since. I've had no problems with it.
Comment 10 Dave 2013-05-27 21:07:55 UTC
What needs to be done in order to get the patch from comment 7 applied?
Comment 11 Tormod Volden 2013-10-25 18:48:02 UTC
I have applied the patch (actually exactly the one that have been used in Debian) to git. Since I don't have the hardware myself, all testing against latest versions of the xserver is welcome. If you are interested in getting EXA to work, please see bug 53423.