Choong Ng 作
Lunix 译
前段时间,Matrox 显示卡为高端用户在游戏或兼容图形工作站中提供高质量的图形图象。虽然G系列在3D显示卡市场大战中有些落后而使Matrox 在游戏市场中失去了一部分用户,但Matrox 在显示卡市场中仍有相当高的声誉,同时G系列的显示卡其兼容性、稳定行、高画质输出和优秀的Linux驱动都是有目共睹的。我测试过Matrox G450 双头显示卡如何有效的提供高性能的双显示器支持,所用的平台是P III 560MHz,440BX芯片组的主机板、384M的RAM,Linux平台为Mandrake 8.0 (kernel 2.4.4 and XFree86 4.0.3),我用的显示卡当然几是Matrox咯,一个RAMDAC 360MHz,一个RAMDAC 230MHz、32MB的DDR RAM及双头输出。
如果你还在使用以前的XFree86版本的话,先下一个新的版本过来,这会让你的工作变得更简单。我很惊讶地发现Mandrake自带的XFree86驱动我的显示卡时只有一个小错误,她把我的G450认成了G400,当然,它们两者在结构上是非常相似的。在我把G450接到我的主机板后,我到Matrox的站点上逛了逛,下载了一个Matrox专用的显示驱动(close-source binary version),安装在/usr/X11/lib/modules/drivers下。然后修改X的配置文件,我认为也是很简单的。
首先,加进去一个或两个显示器(Monitor)条目(当然,你要有才行,而且应该仔细查看显示器的说明),格式如下:
Section "Monitor"
Identifier "monitor"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 31.5-57.0
VertRefresh 50-90
EndSection
再来为每个输出端口加进去两个G450设备(Device)条目
Section "Device"
Identifier "G450_1"
VendorName ""
BoardName ""
Driver "mga"
# Clock lines
# Uncomment following option if you see a big white block
# instead of the cursor!
# Option "sw_cursor"
Option "DPMS"
BusID "PCI:1:0:0"
Screen 0
EndSection
Section "Device"
Identifier "G450_2"
VendorName ""
BoardName ""
Driver "mga"
# Clock lines
# Uncomment following option if you see a big white block
# instead of the cursor!
# Option "sw_cursor"
Option "DPMS"
BusID "PCI:1:0:0"
Screen 1
EndSection
然后就轮到为显示屏(Screen)输出端加进去两个条目
Section "Screen"
Identifier "screen1"
Device "G450_1"
Monitor "Generic|High Frequency SVGA, 1024x768 at 70 Hz"
DefaultColorDepth 24
Subsection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 15
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 32
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
EndSection
Section "Screen"
Identifier "screen2"
Device "G450_2"
Monitor "Generic|High Frequency SVGA, 1024x768 at 70 Hz"
DefaultColorDepth 24
Subsection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 15
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 32
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
EndSection
最后,告诉X你如何去组织这些条目为你提供显示服务(ServerLayout)。很多人可能希望拥有一个整体水平的版面显示,那你就告诉X如何把两台显示器显示输出一个整体的虚拟桌面来。我的方案是提供一个2048x768 pixels的整体虚拟桌面。如下:
Section "ServerLayout"
Identifier "layout1"
Screen "screen1" LeftOf "screen2"
Screen "screen2"
#This is fairly self-explanatory. Matrox's
#documentation explains how to do more
#complicated layouts should you need to.
Option "Xinerama"
#Xinerama mode joins the screens into one
#desktop.
InputDevice "Mouse1" "CorePointer"
InputDevice "Mouse2" "SendCoreEvents"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
好啦,把配置文件写到您的磁盘上就是了。重新开启X你会发现你成功了。
下面是我的XF86Config,大家可以参考一下。
# File generated by XFdrake.
# **********************************************************************
# Refer to the XF86Config(4/5) man page for details about the format of
# this file.
# **********************************************************************
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
# 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
# **********************************************************************
# Server flags section.
# **********************************************************************
Section "ServerFlags"
# Uncomment this to cause a core dump at the spot where a signal is
# received. This may leave the console in an unusable state, but
# may
# provide a better stack trace in the core dump to aid in debugging
#NoTrapSignals
# Uncomment this to disable the server abort
# sequence
# This allows clients to receive this key event.
#DontZap
# Uncomment this to disable the / mode
# switching
# sequences. This allows clients to receive these key events.
#DontZoom
# This allows the server to start up even if the
# mouse device can't be opened/initialised.
AllowMouseOpenFail
EndSection
# **********************************************************************
# Input devices
# **********************************************************************
# **********************************************************************
# Keyboard section
# **********************************************************************
Section "InputDevice"
Identifier "Keyboard1"
Driver "Keyboard"
Option "AutoRepeat" "250 30"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
# **********************************************************************
# Pointer section
# **********************************************************************
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "PS/2"
Option "Device" "/dev/usbmouse"
Option "Emulate3Buttons"
Option "Emulate3Timeout" "50"
# ChordMiddle is an option for some 3-button Logitech mice
# Option "ChordMiddle"
EndSection
Section "InputDevice"
Identifier "Mouse2"
Driver "mouse"
Option "Protocol" "PS/2"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons"
Option "Emulate3Timeout" "50"
# ChordMiddle is an option for some 3-button Logitech mice
# Option "ChordMiddle"
EndSection
Section "Module"
# This loads the DBE extension module.
Load "dbe"
# This loads the miscellaneous extensions module, and disables
# initialisation of the XFree86-DGA extension within that module.
SubSection "extmod"
#Option "omit xfree86-dga"
EndSubSection
# This loads the Type1 and FreeType font modules
Load "type1"
Load "freetype"
EndSection
# **********************************************************************
# Monitor section
# **********************************************************************
# Any number of monitor sections may be present
Section "Monitor"
Identifier "Generic|High Frequency SVGA, 1024x768 at 70 Hz"
VendorName "Unknown"
ModelName "Unknown"
# HorizSync is in kHz unless units are specified.
# HorizSync may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.
HorizSync 31.5-57.0
# VertRefresh is in Hz unless units are specified.
# VertRefresh may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.
VertRefresh 50-90
EndSection
# **********************************************************************
# Graphics device section
# **********************************************************************
Section "Device"
Identifier "Generic VGA"
Driver "vga"
EndSection
Section "Device"
Identifier "G450_1"
VendorName ""
BoardName ""
Driver "mga"
# Clock lines
# Uncomment following option if you see a big white block
# instead of the cursor!
# Option "sw_cursor"
Option "DPMS"
BusID "PCI:1:0:0"
Screen 0
EndSection
Section "Device"
Identifier "G450_2"
VendorName ""
BoardName ""
Driver "mga"
# Clock lines
# Uncomment following option if you see a big white block
# instead of the cursor!
# Option "sw_cursor"
Option "DPMS"
BusID "PCI:1:0:0"
Screen 1
EndSection
# **********************************************************************
# Screen sections
# **********************************************************************
Section "Screen"
Identifier "screen1"
Device "G450_1"
Monitor "Generic|High Frequency SVGA, 1024x768 at 70 Hz"
DefaultColorDepth 24
Subsection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 15
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 32