elmore
September 30th, 2003, 00:55
I've seen a lot of requests on the FBSD mailling lists for working configs of a dual headed video card. The most popular request is for the Matrox G450 dualhead card. I happen to be fortunate enough to have one of these and I just got mine working with two 21-inch monitors. Slick. Anyways, I figured I'd post up my config for everyone to see.

XF86Config

Section "ServerLayout"
Identifier "layout1"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Screen "screen0"
Screen "screen1" RightOf "screen0"
Option "Xinerama"
EndSection

Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection

Section "Module"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "record"
Load "xtrap"
Load "speedo"
Load "type1"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "AUTO"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
Identifier "monitor0"
VendorName "Plug'n Play"
ModelName "NEC MultiSync FE1250"
HorizSync 31-110
VertRefresh 55-160

# Sony Vaio C1(X,XS,VE,VN)?
# 1024x480 @ 85.6 Hz, 48 kHz hsync
ModeLine "1024x480" 65.00 1024 1032 1176 1344 480 488 494 563 -hsync -vsync

# TV fullscreen mode or DVD fullscreen output.
# 768x576 @ 79 Hz, 50 kHz hsync
ModeLine "768x576" 50.00 768 832 846 1000 576 590 595 630

# 768x576 @ 100 Hz, 61.6 kHz hsync
ModeLine "768x576" 63.07 768 800 960 1024 576 578 590 616
EndSection

Section "Monitor"
Identifier "monitor1"
VendorName "Plug'n Play"
ModelName "NEC MultiSync FE1250"
HorizSync 31-110
VertRefresh 55-160

# Sony Vaio C1(X,XS,VE,VN)?
# 1024x480 @ 85.6 Hz, 48 kHz hsync
ModeLine "1024x480" 65.00 1024 1032 1176 1344 480 488 494 563 -hsync -vsync

# TV fullscreen mode or DVD fullscreen output.
# 768x576 @ 79 Hz, 50 kHz hsync
ModeLine "768x576" 50.00 768 832 846 1000 576 590 595 630

# 768x576 @ 100 Hz, 61.6 kHz hsync
ModeLine "68x576" 63.07 768 800 960 1024 576 578 590 616
EndSection

Section "Device"
Identifier "device0"
VendorName "Matrox"
BoardName "Matrox Millennium G450 DualHead"
Driver "mga"
Screen 0
BusID "PCI:1:0:0"
Option "DPMS"
EndSection

Section "Device"
Identifier "device1"
VendorName "Matrox"
BoardName "Matrox Millennium G450 DualHead"
Driver "mga"
Screen 1
BusID "PCI:1:0:0"
Option "DPMS"
EndSection

Section "Screen"
Identifier "screen0"
Device "device0"
Monitor "monitor0"
DefaultColorDepth 24

Subsection "Display"
Depth 8
Modes "1600x1200" "1400x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

Subsection "Display"
Depth 15
Modes "1600x1200" "1400x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

Subsection "Display"
Depth 16
Modes "1600x1200" "1400x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

Subsection "Display"
Depth 24
Modes "1600x1200" "1400x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection
EndSection

Section "Screen"
Identifier "screen1"
Device "device1"
Monitor "monitor1"
DefaultColorDepth 24

Subsection "Display"
Depth 8
Modes "1600x1200" "1400x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

Subsection "Display"
Depth 15
Modes "1600x1200" "1400x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

Subsection "Display"
Depth 16
Modes "1600x1200" "1400x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

Subsection "Display"
Depth 24
Modes "1600x1200" "1400x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection
EndSection


There you have it. Hope someone finds it useful

tarballed
August 19th, 2004, 17:34
Thought I would follow up here with a question.

Elmore, was this config working on OpenBSD or FreeBSD? Reason I ask is that a peculiar thing happened to me today when I was working on X for two *BSD desktops.

I setup a OpenBSD 3.5 desktop with Matrox G450 card and used a slightly modified config that you used above. OpenBSD fired up X without a hitch at all. Worked great.

Now, I installed FreeBSD 5.2.1 today on a second machine. Same video card. Went through the same process as I did on the OpenBSD box. When I tried the test config, it wouldn't work. Digging through my log file, it is spouting this error:


(EE) MGA: Failed to load module "mga_hal" (module does not exist, 0)


Did some digging around, and found that I could download some linux drivers from Matrox. I did that, copied the drivers to /usr/X11R6/lib/modules/drivers and after a bit of tweaking, I was able to get one monitor up. After I kill the X session, I see a message on the screen stating:


[drm] failed to load kernel module "mga"


Anyway, im wondering if the problem could be related to an option not being compiled into the Kernel. Not sure though.

Anyone else having this problem with a Matrox card and FreeBSD?

Thanks.

Tarballed

elmore
August 19th, 2004, 17:51
Well this config is for FreeBSD as it's in the FreeBSD section. Did you load the matrox driver for X? Did you enable options XINERAMA when you compiled X?

tarballed
August 20th, 2004, 12:10
Well this config is for FreeBSD as it's in the FreeBSD section. Did you load the matrox driver for X? Did you enable options XINERAMA when you compiled X?

Didn't enable XINERAMA in the kernel. :(
Thought I forgot something. I think what I forgot was that OpenBSD by default, has it built in when you specify X, but it appears that Free does not.

For loading the matrox driver, should it do it automagicaly? Or should I do it?

Cheers.

Tarballed

elmore
August 20th, 2004, 22:15
Well you have to specify it in your config and make sure the module is installed on the machine.