Linux上玩了一下双显示器
发布时间:2007-08-18 00:07:13来源:红联作者:nchronous
昨天突然心血来潮,想在Linux上玩弄一下双显示器。我的NVIDIA显卡带DVI+VGA+S三个接口,其中VGA接口已被占用,不得买了一个DVI->VGA转换器来链接另外一台CRT显示器了。
操作系统:Everest Linux 0.3
显示器为:PHILIPS 170S LCD & AOC的CRT显示器(型号未知,ddcprobe出的ID是@HA0101)
显卡:NVIDIA 6600首先安装了最新的NVIDIA-Linux-x86-1.0-9755-pkg1.run驱动。在网上查找了不少帖子,据说用NVIDIA X Server Setting开启TwinView功能就能实现双屏显示。结果试用了一下,发现这个功能仅仅是将屏幕水平延伸,即如果把某个程序最大化后,将分割扩展到两个显示器上。这不是我要实现的将两个屏幕设置成显示不同的桌面。后来发现在NVIDIA X Server Setting中还有一个选项Separate X screen选项,试了一下,重启X后,确实实现了我想要的效果。不过当我点击鼠标右键,或者进行其他的操作的时候,X会莫名的重启。郁闷不已,只能动手修改xorg.conf配置文件了。下面就是我修改后的xorg.conf的内容了。我将其中修改过的部分Highlight出来。
Xorg.conf:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder3) Wed Nov 1 19:47:17 PST 2006
#Section "InputDevice"
# Identifier "TouchPad"
# Driver "synaptics"
# Option "Device" "/dev/input/mice"
# Option "Protocol" "auto-dev"
# Option "LeftEdge" "1700"
# Option "RightEdge" "5300"
# Option "TopEdge" "1700"
# Option "BottomEdge" "4200"
# Option "FingerLow" "25"
# Option "FingerHigh" "30"
# Option "MaxTapTime" "180"
# Option "MaxTapMove" "220"
# Option "VertScrollDelta" "100"
# Option "MinSpeed" "0.09"
# Option "MaxSpeed" "0.18"
# Option "AccelFactor" "0.0015"
# Option "SHMConfig" "on"
# Option "AlwaysCore"
#EndSection
Section "ServerLayout"
# InputDevice "TouchPad"
Identifier "X configuration"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" LeftOf "Screen0"
InputDevice "Keyboard"
InputDevice "Mouse"
Option "Xinerama" "on"
Option "Clone" "off"
EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules/extensions/nvidia"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/X11/fonts/misc"
FontPath "/usr/local/share/fonts"
EndSection
Section "Module"
# Load "synaptics"
Load "dbe"
Load "freetype"
Load "extmod"
Load "record"
Load "v4l"
Load "type1"
Load "glx"
EndSection
Section "InputDevice"
Identifier "Keyboard"
Driver "kbd"
Option "XkbLayout" "us"
Option "CoreKeyboard"
EndSection
Section "InputDevice"
Identifier "Mouse"
Driver "mouse"
Option "Protocol" "Auto"
Option "ZAxisMapping" "4 5"
Option "CorePointer"
Option "Device" "/dev/input/mice"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Philips 170S"
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 76.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor1"
VendorName "Unknown"
ModelName "@HA"
HorizSync 37.9 - 80.0
VertRefresh 60.0 - 75.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 6600"
BusID "PCI:5:0:0"
Screen 0
EndSection
Section "Device"
Identifier "Videocard1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 6600"
BusID "PCI:5:0:0"
Screen 1
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
Option "metamodes" "DFP: 1024x768 +0+0"
SubSection "Display"
Depth 24
Modes "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Videocard1"
Monitor "Monitor1"
DefaultDepth 24
Option "metamodes" "CRT: 1024x768 +0+0"
SubSection "Display"
Depth 24
Modes "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
重启X启动后成功!