我使用专有的 Nvidia 驱动程序设置了双显示器。操作系统启动时似乎使用了正确的设置(登录提示时似乎一切正常),但当我登录时,我的双显示器的设置被重置,并且第二个显示器的位置不正确(它应该设置在主显示器的右侧)。
我从 /etc/X11 目录中删除了 xorg.conf,据我所知,系统上唯一的一个位于 /usr/share/X11/xorg.conf.d/12-xorg.conf(我检查了 /var/log/Xorg.0.log 并且它说它正在使用 /usr/share/X11/xorg.conf.d/)
设置如下:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 310.14 (buildd@aatxe) Tue Oct 16 22:21:09 UTC 2012
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
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"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "DELL U2311H"
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 76.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 8800 GTS 512"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-0"
Option "MetaModeOrientation" "CRT-1 RightOf DFP-0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
系统信息:
- Xubuntu 12.04
- Nvidia 专有驱动程序版本 310.14
- X.Org X 服务器 1.11.3
答案1
以下内容修复了该问题:
- 我手动将 NVIDIA 驱动程序升级到 319.32(可能没有必要)
我将 xorg 配置文件 MetaModeOrientation 选项修改为以下内容:
Option "MetaModeOrientation" "CRT RightOf DFP"
答案2
以 root 身份运行 nvidia-settings,使用以下命令:
gksu nvidia-settings
按照您想要的方式设置双显示器(克隆或扩展),然后使用 /etc/X11/xorg.conf 中的“将 X 配置保存到文件”保存配置
如果您不确定,请在编辑该文件之前先对其进行如下备份:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
在最坏的情况下,您可以通过终端执行以下操作从备份中恢复:
sudo cp /etc/X11/xorg.conf_backup /etc/X11/xorg.conf
祝你好运!