fkung: 1, Matrox: 0

Anyone using an old Matrix Millennium G400 dual-head video card will share my pain in getting it to work. The open-source mga driver doesn’t support dual-head for this model, requiring a binary blob from matrox. Matrox, however, hasn’t updated their drivers in a while, and their drivers don’t work out-of-the-box either. But it can be made to work!

Before, there were some nice instructions on Matrix support forums detailing how to do this; however the Matrox forums have been taken down and a yum update destroyed my old working setup. I finally found a great page for this, at http://www.tuxx-home.at/projects/mga/HOWTO_mga_Xorg7 which most of this is based on – however it’s a bit out-dated and those instructions also need tweaking

The binary bits needed from Matrix (using the newest 4.4 source is not possible; we need the 4.1 line):

ftp://ftp.matrox.com/pub/mga/archive/linux/2004/mgadriver-4.1.tar.gz

ftp://ftp.matrox.com/pub/mga/archive/linux/2004/mgadriver-4.1-1-src.tar.gz

The xorg mga drivers (using the newst ones – 1.4.6 – is possible):

http://xorg.freedesktop.org/releases/individual/driver/xf86-video-mga-1.4.6.tar.bz2

Unzip them all to a working directory somewhere (I’ll call it $tmp). Go into $tmp/xf86-video-mga-1.4.6 and configure (“./configure”), then add the following line at the end of config.h:

#define USEMGAHAL

Then we need to copy a header file in, binding.h. The header file is provided with the matrox sources. “cp $tmp/mgadriver-4.1-1-src/6.8.1/mga/HALlib/binding.h $tmp/xf86-video-mga-1.4.6/src/” It will replace an older version of the binding.h file.

And finally, build the drivers (“make”). Do not install them.

Alexander Griesser’s guide now tells you to strip down the mgaHALlib.a file that was shipped with the matrox sources (two “ar” commands), but this doesn’t seem required any more.

Copy the file, $tmp/mgadriver-4.1-1-src/6.8.1/mga/HALlib/mgaHALlib.a to $tmp/xf86-video-mga-1.4.6/src/.libs/

Now we need to link the binary blob into the driver that we compiled. Go into the .libs directory ($tmp/xf86-video-mga-1.4.6/src/.libs) and issue this nice, long command (note it’s a bit different from the one in the other guide):

libtool –mode=link gcc –shared -DXFree86Server -DIN_MODULE -DXFree86Module -DXFree86LOADER -I/usr/include/xorg -I/usr/include/drm -I/usr/include/X11/dri -g -O2 -module -avoid-version –whole-archive clientlx.o mga_arc.o mga_bios.o mga_dac3026.o mga_dacG.o mga_dga.o mga_dh.o mga_dri.o mga_driver.o mga_esc.o mga_exa.o mga_g450pll.o mga_halmod.o mga_hwcurs.o mga_merge.o mga_shadow.o mga_storm.o mga_vga.o mga_video.o mgaHALlib.a -o mga_drv.so

And, as root, install the drivers by hand:

cd /usr/lib/xorg/modules/drivers

mv mga_drv.so mga_drv.so.backup

mv mga_hal_drv.o mga_hal_drv.o.backup

cp $tmp/xf86-video-mga-1.4.6/src/.libs/mga_drv.so ./

cp $tmp/mgadriver-4.1/xfree86/6.8.1/mga_hal_drv.o ./

Done. But bookmark his and save the working directory, since any updates to the original X driver will overwrite your changes! Or, you may want to explicity disable updates to the mga package (in Fedora, that’s excluding xorg-x11-drv-mga in your yum configuration).  This is a dinosaur of a card, but it’s dual-head and good enough for office-type work!

About these ads

8 Responses to “fkung: 1, Matrox: 0”

  1. Alexander Griesser Says:

    I updated the HOWTO and the automatic installer after I read your posting.
    Please have a look at them again now.

    ciao,
    Alexander Griesser

  2. Alextoss Says:

    Hey All ! ! !
    Want to spend your vacation to be remembered for long?
    Tourism
    help you carry out your wishes !

  3. online marketing melbourne Says:

    online marketing melbourne

    online marketing melbourne

  4. Chalvaxia Says:

    ONLINE – DRUGSTORE!
    PRICES of ALL MEDICINES!

    FIND THAT NECESSARY…
    VIAGRA, CIALIS, PHENTERMINE, SOMA… and other pills!

    Welcome please: pills-prices.blogspot.com

    NEW INFORMATION ABOUT PAYDAY LOANS!

    Welcome please: payday-d-loans.blogspot.com

    GOOD LUCK!

  5. Josh Says:

    He rised. ,

  6. Daniel Lange's blog Says:

    Getting dual-screen (xinerama) to work with Matrox G450/550 graphics cards and Xorg 1.5…

    Gentoo finally decided to update Xorg to 1.5. Because this has very substantial changes
    against the previous version, some things break and there is a migration guide that you
    are nagged to read. After the upgrade I found that the Matrox card in one of…

  7. visit Says:

    Hi I thank you for a wonderful site. You have done very good job.

  8. sonicrafter review Says:

    Thanks for sharing the information. I found the info incredibly helpful.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: