Matrox Video Cards With Xorg On FreeBSD December 30, 2009 At this point, I strongly recommend replacing the Matrox cards when possible. In particular, AMD/ATI Radeon cards are well-supported with a current driver, and are available in AGP, PCI, and PCIe versions. However, a patched version of the 1.9.100 mga driver still builds and is at least somewhat functional with xorg-server-1.6.1,1. Single monitor works, anyway, and I lack the setup to do much other testing. Hopefully it will help someone, but no guarantees are expressed, implied, related, shown, or otherwise construed. Support, well, this file may be all there is. If it doesn't work, that's fate telling you the Matrox card has had a long life and is ready for retirement. (as root) cd /usr/ports/x11-drivers/xf86-video-mga make deinstall cd /tmp fetch 'http://www.wonkity.com/~wblock/mgapatch/mgaport-1.9.100.tgz' tar -C /usr/ports -xvzf /tmp/mgaport-1.9.100.tgz cd /usr/ports/x11-drivers/xf86-video-mga-1.9.100 make install Add Option "HWcursor" "off" to the Device section of your xorg.conf as below. ---old information below--- Matrox Multihead on FreeBSD With Xorg 7.4 Updated January 30, 2009, Warren Block (wblock@wonkity.com) The long-awaited update to xorg-7.4 has happened. libpciaccess means there's no need to patch xorg-server. Thanks to Robert Noland, Florent Thoumie, and everyone else for all their work on this. Before rebuilding xorg, check /usr/ports/UPDATING. If present, remove the obsolete patch file patch-Pci.c-WB from /usr/ports/x11-servers/xorg-server/files/ Tested Configuration Matrox G450 dual-VGA FreeBSD i386 7.x (tested on 7.1-STABLE as of January 21, 2009) /usr/ports/x11-servers/xorg-server version 1.5.3_2,1 /usr/ports/x11-drivers/xf86-video-mga version 1.9.100,1 Sample xorg-7.4 config file: http://www.wonkity.com/~wblock/mgapatch/xorg.conf-xorg-7.4 Note: DefaultDepth is set to 24 in that xorg.conf. The xorg log says (EE) MGA(0): Static buffer allocation failed, not initializing the DRI (EE) MGA(0): Need at least 41400 kB video memory at this resolution, bit dept ... (WW) MGA(0): Direct rendering disabled Yet glxinfo says "direct rendering: Yes" and glxgears gets around 96 FPS. ---old information below--- Matrox Multihead on FreeBSD With Xorg 7.3 Updated November 13, 2008, Warren Block (wblock@wonkity.com) Multihead on FreeBSD with Matrox G450/G550 cards stopped working with recent versions of Xorg. Fortunately, that can be fixed. IMPORTANT: the xf86-video-mga driver in FreeBSD ports was "backrevved" to 1.4.7 on January 2, 2008. That older version supports modelines in xorg.conf (a feature needed by some), but does not provide multihead or any xrandr-1.2 features. If you're already using 1.9.100, you can use portupgrade's "-x" flag to keep portupgrade from messing with it. It may be prudent to make a backup copy of the port directory in case of future changes. If you weren't paying attention and now have 1.4.7, use ports-mgmt/portdowngrade to go back to 1.9.100. For example: portdowngrade -s freebsdanoncvs@anoncvs.FreeBSD.org:/home/ncvs xf86-video-mga Software And Hardware Requirements FreeBSD i386 6.x (tested on 6-STABLE as of June 15, 2008) FreeBSD i386 7.x (tested on 7.1-PRERELEASE as of November 13, 2008) Matrox G450 or G550 multihead card (G450 AGP and G550 AGP tested) FreeBSD ports: /usr/ports/x11-servers/xorg-server versions 1.4_1,1, 1.4_2,1, 1.4_3,1, 1.4_4,1, 1.4_5,1, 1.4_6,1, 1.4_7,1, 1.4_8,1, 1.4_10,1, 1.4.2,1 /usr/ports/x11-drivers/xf86-video-mga versions 1.9.99, 1.9.100 1. Patch xorg-server: # cd usr/ports/x11-servers/xorg-server/files # fetch 'http://www.wonkity.com/~wblock/mgapatch/patch-Pci.c-WB' # less patch-Pci.c-WB (read it to see what it does) # cd /usr/ports/x11-servers/xorg-server/ # make clean deinstall install 2. Update your xorg.conf to use xrandr features: Example xorg.conf file at http://www.wonkity.com/~wblock/mgapatch/xorg.conf It's mostly like an xorg.conf for only one monitor, but defines a large Virtual screen in the Screen section. Each Monitor section has an Option "Position" "x y" that defines the position of the monitor on the large virtual screen. The Device section lets you specify which monitor goes with which output. The example has Monitor1 to the left of Monitor0. The 1.9.100 version of the mga driver doesn't yet support a hardware cursor, so that is disabled in the Device section: Option "HWcursor" "off" 3. Notes My AGP versions of the G450 work, and the AGP G550 has been reported to work. Probably the rare PCI version of either card should work, and maybe the rare and expensive four-head PCI Matrox cards. Please let me know if you test any of these other cards (or have them sitting in a box somewhere and would like to share). The patch has been reported to allow a single-head G400 to run xorg-server, which would not start without it. The second head on G400 cards equipped with one isn't yet supported by the mga drivers. When Xorg on FreeBSD starts to use libpciaccess, this patch will be obsolete. You will have to delete it from the xorg-server files directory before building the newer version of the port: # cd usr/ports/x11-servers/xorg-server/files # rm patch-Pci.c-WB