我有一台配备 GeForce GTX 560M 的笔记本电脑,并且我在 Ubuntu 11.10 上使用 nvidia 驱动程序来支持带有 twinview 的第二台显示器,效果很好。
当我运行 nvidia-settings 并连接我的第三台显示器(包括笔记本电脑显示器)时,如果我选择将其用作双屏显示,nvidia-settings 会无限期冻结。如果我选择将其显示为单独的 X 屏幕,保存设置并重新启动,则该设置永远不会应用。这是 nvidia 在保存时创建的 Xorg.conf:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 285.05.09 (buildd@allspice) Wed Nov 16 15:25:12 UTC 2011
# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
#Section "InputDevice"
#
# # generated from default
# Identifier "Mouse0"
# Driver "mouse"
# Option "Protocol" "auto"
# Option "Device" "/dev/psaux"
# Option "Emulate3Buttons" "no"
# Option "ZAxisMapping" "4 5"
#EndSection
# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
#Section "InputDevice"
#
# # generated from default
# Identifier "Keyboard0"
# Driver "kbd"
#EndSection
Section "ServerLayout"
# Keyboard settings are now read from /etc/default/console-setup
# InputDevice "Keyboard0" "CoreKeyboard"
# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
# InputDevice "Mouse0" "CorePointer"
# Removed Option "Xinerama" "0"
# Removed Option "Xinerama" "1"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
# commented out by update-manager, HAL is now used and auto-detects devices
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "LEN"
HorizSync 56.5 - 67.8
VertRefresh 40.0 - 60.0
Option "DPMS"
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Unknown"
ModelName "Samsung SyncMaster"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 75.0
Option "DPMS"
# HorizSync source: edid, VertRefresh source: edid
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 560M"
Option "NoLogo" "True"
BusID "PCI:1:0:0"
Screen 0
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 560M"
BusID "PCI:1:0:0"
Screen 1
EndSection
Section "Screen"
# Removed Option "metamodes" "DFP-0: nvidia-auto-select +0+0"
# Removed Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-2: nvidia-auto-select +1920+0"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "DFP-0"
Option "metamodes" "DFP-0: 1920x1080 +0+0, DFP-2: 1680x1050 +1920+0; DFP-0: 1920x1080 +0+0, DFP-2: NULL"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
# Removed Option "metamodes" "DFP-2: nvidia-auto-select +0+0"
# Removed Option "metamodes" "DFP-1: nvidia-auto-select +0+0"
# Removed Option "metamodes" "DFP-1: 1680x1050 +0+0"
# Removed Option "metamodes" "DFP-1: nvidia-auto-select +0+0"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "TwinView" "0"
Option "metamodes" "DFP-1: 1680x1050_60 +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Extensions"
Option "Composite" "Disable"
EndSection
我不太熟悉 X 配置。我做错了什么吗?
答案1
根据我的经验,GUI 工具无法很好地支持 2 个以上的显示器。可以在 xorg.conf 中手动配置第三个显示器,但不会有出色的即插即用行为。您需要一个额外的设备、屏幕和显示器部分来启用第三个显示器,然后将屏幕添加到 ServerLayout 部分。以下是我的四屏工作示例xorg.conf
:
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen1" 0 0
Screen 1 "Screen2" LeftOf "Screen1"
Screen 2 "Screen3" LeftOf "Screen2"
Screen 3 "Screen4" LeftOf "Screen3"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "1"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Samsung"
ModelName "Samsung ??"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 60.0
EndSection
Section "Monitor"
Identifier "Monitor2"
VendorName "Unknown"
ModelName "Samsung SyncMaster"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 75.0
EndSection
Section "Monitor"
Identifier "Monitor3"
VendorName "Unknown"
ModelName "Samsung SyncMaster"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 60.0
Option "DPMS"
EndSection
Section "Monitor"
Identifier "Monitor4"
VendorName "Unknown"
ModelName "WestingHouse"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 60.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:1:0:0"
Screen 0
EndSection
Section "Device"
Identifier "Device2"
Driver "nvidia"
VendorName "NVIDIA Corporation"
#BoardName "GeForce 8800 GTS"
BusID "PCI:1:0:0"
Screen 1
EndSection
Section "Device"
Identifier "Device3"
Driver "nvidia"
VendorName "NVIDIA Corporation"
#BoardName "GeForce 9500 GT"
BusID "PCI:2:0:0"
Screen 0
EndSection
Section "Device"
Identifier "Device4"
Driver "nvidia"
VendorName "NVIDIA Corporation"
#BoardName "GeForce 9500 GT"
BusID "PCI:2:0:0"
Screen 1
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
EndSection
Section "Screen"
Identifier "Screen2"
Device "Device2"
Monitor "Monitor2"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen3"
Device "Device3"
Monitor "Monitor3"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen4"
Device "Device4"
Monitor "Monitor4"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
答案2
我无法在您的 xorg.conf 文件中看到任何第三台显示器,也许可以尝试添加它?(在执行任何操作之前,请复制您的 xorg.conf 文件
sudo cp xorg.conf xorg.conf.old)
粘贴此:
“监控”部分 标识符“Monitor2” 供应商名称“未知” 型号名称“Samsung SyncMaster” 水平同步 30.0 - 81.0 垂直刷新 56.0 - 75.0 选项“DPMS” # HorizSync 源:edid,VertRefresh 源:edid 结束部分 “屏幕”部分 标识符“Screen2” 设备“Device0”或“Device1”取决于所连接的显示器 监视器“监视器2” 默认深度 24 选项“TwinView”“1” 选项“TwinViewXineramaInfoOrder”“DFP-0” 选项“metamodes”“DFP-0:1920x1080 +0+0,DFP-2:1680x1050 +1920+0;DFP-0:1920x1080 +0+0,DFP-2:NULL” “显示”子部分 深度 24 结束子节 结束部分
并更改您的服务器布局部分:
Section "ServerLayout"
# Keyboard settings are now read from /etc/default/console-setup
# InputDevice "Keyboard0" "CoreKeyboard"
# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
# InputDevice "Mouse0" "CorePointer"
# Removed Option "Xinerama" "0"
# Removed Option "Xinerama" "1"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
Screen 2 "Screen2" RightOf "Screen1" #only this line is edited
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
# commented out by update-manager, HAL is now used and auto-detects devices
EndSection
记住您的 xorg.conf 文件的位置,如果重启后出现问题,请用旧文件替换已编辑的文件。(
sudo mv xorg.conf.old xorg.conf)