FS#28924 - No video under X with new mga driver after installing updates this morning

Attached to Project: Arch Linux
Opened by Jeff Novick (Jiffy) - Thursday, 15 March 2012, 12:42 GMT
Last edited by Andreas Radke (AndyRTR) - Monday, 19 March 2012, 19:03 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
No video under X with new mga driver.
The only changes to the system were the updates I took this morning.
This is a 64 bit build on a DELL T610 server, not sure if this problem exists on the 32 bit architecture.

Error message:

X.Org X Server 1.12.0
Release Date: 2012-03-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.2.9-1-ARCH x86_64
Current Operating System: Linux thing1 3.2.9-1-ARCH #1 SMP PREEMPT Thu Mar 1 09:31:13 CET 2012 x86_64
Kernel command line: root=/dev/sda8 ro vga=795
Build Date: 05 March 2012 05:59:48AM

Current version of pixman: 0.24.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.4.log", Time: Thu Mar 15 08:35:53 2012
(==) Using config directory: "/etc/X11/xorg.conf.d"
/usr/bin/X: symbol lookup error: /usr/lib/xorg/modules/drivers/mga_drv.so: undefined symbol: xf86IsPc98
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

Additional info:
* package version(s)
extra/xf86-video-mga 1.4.13-5
lspci | grep VGA
09:03.0 VGA compatible controller: Matrox Graphics, Inc. MGA G200eW WPCM450 (rev 0a)

* config and/or log files etc.
no /etc/X11/xorg.conf file and Xorg log file is attached

Steps to reproduce:
type startx at command line
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Monday, 19 March 2012, 19:03 GMT
Reason for closing:  Fixed
Additional comments about closing:  driver is working now with Xorg 1.12 - dualhead is sadly dead now.
Comment by ian sison (iansison) - Friday, 16 March 2012, 02:03 GMT
I added this patch to remove xf86IsPC98. I read in the X.org ML that they removed xf86IsPC98.

http://patchwork.freedesktop.org/patch/7359/

patch -Np0 -i $startdir/remove-xf86IsPc98.patch || return 1

I rebuilt the xf86-video-mga package with this and all problems were resolved, for me.
Comment by Thomas Trepl (ernibert) - Friday, 16 March 2012, 07:17 GMT
> not sure if this problem exists on the 32 bit architecture

Yes it's also true on 32bit. Have the same problem. Going to try the patch.
Comment by Jeff Novick (Jiffy) - Friday, 16 March 2012, 11:53 GMT
I received an error applying this patch:

==> Extracting Sources...
-> Extracting xf86-video-mga-1.4.13.tar.bz2 with bsdtar
==> Starting build()...
patching file man/Makefile.am
patching file man/mga.man
patching file src/binding.h
patching file src/mga.h
patching file src/mga_common.h
patching file src/mga_dacG.c
patching file src/mga_dri.c
patching file src/mga_dri.h
patching file src/mga_dripriv.h
patching file src/mga_driver.c
patching file src/mga_macros.h
patching file src/mga_merge.c
patching file src/mga_reg.h
patching file src/mga_sarea.h
patching file src/mga_storm.c
patching file src/mgareg_flags.h
patching file util/stormdwg.c
patching file src/mga_driver.c
Hunk #1 succeeded at 2222 (offset 30 lines).
Hunk #2 FAILED at 3243.
Hunk #3 succeeded at 4228 (offset 88 lines).
Hunk #4 succeeded at 4343 (offset 88 lines).
1 out of 4 hunks FAILED -- saving rejects to file src/mga_driver.c.rej
patching file src/mga_merge.c
Hunk #1 succeeded at 391 (offset 1 line).
==> ERROR: A failure occurred in build().
Aborting...
Comment by Jeff Novick (Jiffy) - Friday, 16 March 2012, 11:54 GMT
cat src/xf86-video-mga-1.4.13/src/mga_driver.c.rej
--- src/mga_driver.c 2010-08-10 22:53:50.000000000 +0800
+++ src/mga_driver.new.c 2012-03-13 21:23:46.086285377 +0800
@@ -3243,13 +3243,6 @@
vgaHWProtect(pScrn, FALSE);
}

- if (xf86IsPc98()) {
- if (pMga->Chipset == PCI_CHIP_MGA2064)
- outb(0xfac, 0x01);
- else
- outb(0xfac, 0x02);
- }
-
MGA_NOT_HAL(
if (pMga->is_G200SE) {
OUTREG8(0x1FDE, 0x06);
Comment by ian sison (iansison) - Friday, 16 March 2012, 12:05 GMT

I applied the patch before git-fixes.patch:

build() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -Np0 -i $startdir/remove-xf86IsPc98.patch || return 1
patch -Np1 -i "${srcdir}/git-fixes.patch"
patch -Np1 -i $startdir/unbreak-dual-head.patch || return 1

export CPPFLAGS="$CPPFLAGS -I/usr/include/xorg -I/usr/include/pixman-1"
./configure --prefix=/usr #--enable-dri
make
}
Comment by ian sison (iansison) - Friday, 16 March 2012, 12:06 GMT
FYI, the unbreak-dual-head.patch is an extra patch I included to fix dual head support for MGA adapters. It's not part of the standard ARCH package.
Comment by Jeff Novick (Jiffy) - Friday, 16 March 2012, 12:12 GMT
Applying before git-fixes.patch worked. I do not require dual head support.
I have video again, thanks!
Comment by Thomas Trepl (ernibert) - Friday, 16 March 2012, 17:48 GMT
Yup, the patch does its job :-) Thanks to Ian Sison.
Comment by Andreas Radke (AndyRTR) - Friday, 16 March 2012, 18:38 GMT
Please test latest pkg in testing, It has all current git patches.
Comment by ian sison (iansison) - Saturday, 17 March 2012, 04:01 GMT
Unfortunately part of this patch-set includes patches which remove Dual Head functionality...

"Adam Jackson wrote:

Hey, so, remember back in the dark ages when dualhead was this
insanely wild differentiating feature? Matrox thought it was so
special, in fact, that they hid most of the implementation of it
(and a bunch of other stuff) in a binary-only blob called the
HALlib. As you'd expect it was pretty much a cut-and-paste of
the relevant Windows code, and then some open glue to keep it
working; clientlx.c is that glue.

I guess the theory was that if you don't tell people which
registers to duplicate to implement a second pipe in their own
hardware, they won't figure it out? A pretty eyeroll-worthy
idea even at the time, and definitely not something we should be
condoning anymore.

Kill it with fire ..."

I doubt if this will sit well with others who have dual head MGA adapters. I know it won't with me.. :(

Comment by Jeff Novick (Jiffy) - Monday, 19 March 2012, 11:14 GMT
I've just installed xf86-video-mga 1.4.13-6 from testing, and it is working.

Loading...