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):
The xorg mga drivers (using the newst ones – 1.4.6 – is possible):
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:
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:
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!