Click to See Complete Forum and Search --> : XF86 with Matrox G400 video card question


craig the webguy
02-25-2004, 03:33 PM
I have a machine on which I have just installed Mandrake 9.1. I have a Matrox G400 32MB AGP dual-head video card, and I want to get that cool dual monitor "two monitors, one desktop" look. I have been unsuccessful in achieving that thus far.

I know I have to use Xinerama to achieve this, but the rest has been just trial and error thus far.

Here's my XF86Config file:


# File generated by XFdrake.

# ************************************************** ********************
# Refer to the XF86Config man page for details about the format of
# this file.
# ************************************************** ********************

Section "Files"
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Mandrake 6.0 and later now use a font server independent of
# the X server to render fonts.
FontPath "unix/:-1"
EndSection

Section "ServerFlags"
#DontZap # disable <Crtl><Alt><BS> (server abort)
AllowMouseOpenFail # allows the server to start up even if the mouse doesn't work
#DontZoom # disable <Crtl><Alt><KP_+>/<KP_-> (resolution switching)
#Option "Xinerama"
EndSection

Section "Module"
Load "dbe" # Double-Buffering Extension
Load "v4l" # Video for Linux
Load "extmod"
Load "type1"
Load "freetype"
Load "glx" # 3D layer
Load "dri" # direct rendering
EndSection

Section "DRI"
Mode 0666
EndSection

Section "InputDevice"
Identifier "Keyboard1"
Driver "Keyboard"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
Option "XkbCompat" ""
Option "XkbOptions" ""
EndSection

Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "MouseManPlusPS/2"
Option "Device" "/dev/psaux"
Option "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
Identifier "monitor0"
VendorName "Plug'n Play"
ModelName "Dell M770"
HorizSync 30-69
VertRefresh 48-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 "Gateway EV700"
HorizSync 30-69
VertRefresh 48-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 "Device"
Identifier "device0"
VendorName "Matrox Graphics, Inc."
BoardName "Matrox Millennium G400 DualHead"
Driver "mga"
VideoRam 32768
Option "DPMS"
Screen 0
EndSection

Section "Device"
Identifier "device1"
VendorName "Matrox Graphics, Inc."
BoardName "Matrox Millennium G400 DualHead"
Driver "mga"
VideoRam 32768
Option "DPMS"
Screen 1
EndSection

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

Subsection "Display"
Depth 8
Modes "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

Subsection "Display"
Depth 15
Modes "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

Subsection "Display"
Depth 16
Modes "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

Subsection "Display"
Depth 24
Modes "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection
EndSection

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

Subsection "Display"
Depth 8
Modes "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

Subsection "Display"
Depth 15
Modes "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

Subsection "Display"
Depth 16
Modes "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

Subsection "Display"
Depth 24
Modes "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection
EndSection

Section "ServerLayout"
Identifier "layout1"
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice "Mouse1" "CorePointer"
Option "Xinerama"
Screen "screen0" LeftOf "screen1"
EndSection


I know I'm doing something wrong. Just don't know what it is.

Thanks in advance

JamminJoeyB
02-25-2004, 03:42 PM
http://www.justlinux.com/forum/showthread.php?s=&threadid=112305

This thread has a good how to on dual monitors. It also has links to some good documentation on line for dual monitors. I use 2 video cards and this thread helped me out.

Not really sure about a dual headed vid card, but this should help.

Your xconfig file did look ok.

With 2 cards you have to specify the bus id of the card. I don't think that applies to dual headed cards.

EnigmaOne
02-25-2004, 04:52 PM
This works on one of my systems, with the only difference being that it's a G550 and the monitor specs are for a Viewsonic:
/etc/X11/XF86Config-4

Section "ServerLayout"
Identifier "Lovingly Kludged by Hand"
Screen 0 "Display 2" RightOf "Display 1"
Screen "Display 2" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "unix/:7100"
EndSection

Section "Module"
Load "GLcore"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
EndSection

Section "ServerFlags"
Option "Xinerama"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
EndSection

Section "Monitor"
Identifier "Display 1"
VendorName "ViewSonic, Inc."
ModelName "G90fb"
HorizSync 30.0 - 97.0
VertRefresh 50.0 - 180.0
ModeLine "1400x1050" 129.0 1400 1464 1656 1960 1050 1051 1054 1100 +hsync +vsync
ModeLine "1400x1050" 151.0 1400 1464 1656 1960 1050 1051 1054 1100 +hsync +vsync
ModeLine "1400x1050" 162.0 1400 1464 1656 1960 1050 1051 1054 1100 +hsync +vsync
ModeLine "1400x1050" 184.0 1400 1464 1656 1960 1050 1051 1054 1100 +hsync +vsync
Option "dpms"
EndSection

Section "Monitor"
Identifier "Display 2"
VendorName "ViewSonic, Inc."
ModelName "G90fb"
HorizSync 30.0 - 97.0
VertRefresh 50.0 - 180.0
ModeLine "1400x1050" 129.0 1400 1464 1656 1960 1050 1051 1054 1100 +hsync +vsync
ModeLine "1400x1050" 151.0 1400 1464 1656 1960 1050 1051 1054 1100 +hsync +vsync
ModeLine "1400x1050" 162.0 1400 1464 1656 1960 1050 1051 1054 1100 +hsync +vsync
ModeLine "1400x1050" 184.0 1400 1464 1656 1960 1050 1051 1054 1100 +hsync +vsync
Option "dpms"
EndSection

Section "Monitor"
Identifier "Display Merged"
VendorName "ViewSonic, Inc."
ModelName "G90fb"
HorizSync 30.0 - 97.0
VertRefresh 50.0 - 180.0
ModeLine "1400x1050" 129.0 1400 1464 1656 1960 1050 1051 1054 1100 +hsync +vsync
ModeLine "1400x1050" 151.0 1400 1464 1656 1960 1050 1051 1054 1100 +hsync +vsync
ModeLine "1400x1050" 162.0 1400 1464 1656 1960 1050 1051 1054 1100 +hsync +vsync
ModeLine "1400x1050" 184.0 1400 1464 1656 1960 1050 1051 1054 1100 +hsync +vsync
EndSection

Section "Device"
Identifier "MATROX CARD 1"
Driver "mga"
VendorName "Matrox Graphics, Inc."
BoardName "MGA G550 AGP"
Option "hw cursor" "off"
BusID "PCI:1:0:0"
Screen 1
EndSection

Section "Device"
Identifier "MATROX CARD 2"
Driver "mga"
VendorName "Matrox Graphics, Inc."
BoardName "MGA G550 AGP"
Option "hw cursor" "off"
BusID "PCI:1:0:0"
Screen 2
EndSection

Section "Screen"
Identifier "Display 1"
Device "MATROX CARD 1"
Monitor "Display 1"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x1024" "1024x768"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768"
EndSubSection
EndSection

Section "Screen"
Identifier "Display 2"
Device "MATROX CARD 2"
Monitor "Display 2"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x1024" "1024x768"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768"
EndSubSection
EndSection

Section "Screen"
Identifier "Display Merged"
Device "MATROX CARD 1"
Monitor "Display Merged"
DefaultDepth 24
Option "Monitor2Position" "RightOf"
Option "MetaModes" "1280x1024-640x480 1024x768-640x480 "
Option "Monitor2HSync" "30.0-97.0 "
Option "Monitor2VRefresh" "50.0-180.0 "
Option "MergedFB"
SubSection "Display"
Virtual 1920 1024
Depth 24
Modes "1280x1024" "1024x768" "640x480"
EndSubSection
EndSection

Section "DRI"
Mode 0666
EndSection


You might want to download Matrox's PowerDesk app for Linux, as it does quite a bit of the "dirty-work" for you.
If you aren't comfortable with editing the /etc/X11/XF86Config-4 file, that is.

knute
02-25-2004, 05:20 PM
The kernel has support for the Matrox G400 dual heads. I'm not sure if that's compiled by default or not. So you may need to recompile your kernel and enable that option to have it.

I mean, I used to have a matrox card, and recompiled several times. There was explicit support for it, and the framebuffer as well, but it didn't come on by default.

HTH

craig the webguy
02-26-2004, 10:22 AM
It was the BusID thing. I didn't include that when I edited the Devices section.

Thanks to all for the help.

EnigmaOne
02-26-2004, 11:49 AM
Glad that worked out for you.

Matrox does have several resources for Linux-based systems (a universal hardware abstraction library, the PowerDesk app, and so on), in addition to user forums, which may be of assistance to you in the future.

You'll probably find that--despite the initial 'strangeness'--dual monitors will prove to be very convenient, and you'll come to rely on the merged desktop space they provide you. (More than two monitors can be done as well.)

If your budget will allow for it, plan on buying a pair of high-quality, 19"+ LCD monitors. They're easier on your eyes for session lengths that stretch into hours, and they put out far less heat than their CRT counterparts. (At 43, my eyes have the final say in the monitor technology debate.)