移除外接显示器后,TwinView 可保持桌面延伸

移除外接显示器后,TwinView 可保持桌面延伸

我有一台带 nVidia 卡的 HP 笔记本电脑,我正在使用 Ubuntu 11.04(稳定版)。我已经使用 nVidia X 服务器设置应用程序设置了 TwinView。如果我在未插入辅助显示器的情况下启动,桌面就会被拉伸并且分辨率不正确。Unity 和主面板工作正常,看起来也正常,但我运行的任何应用程序也会被拉伸并且分辨率不正确,这几乎使它们无法使用。当我在插入辅助显示器的情况下启动时(通过 HDMI),一切都正常工作。

我已经深入研究了 xorg.conf 文件。如果我删除该文件并重新启动,主显示器可以正常工作,但我需要配置 nVidia 以再次使用 TwinView。对于我经常在单显示器和多显示器之间切换的笔记本电脑来说,这很烦人……

所以基本上我的问题是:我是否可以设置 Ubuntu,当只插入 1 个显示器时,双显示器设置会被忽略?这在 10.10 中运行良好(顺便说一句,我仍然有那个 xorg.conf 文件,它会导致同样的问题)。

这是我当前的 xorg.conf 文件:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 270.29  (buildd@allspice)  Fri Feb 25 14:42:07 UTC 2011

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      "Seiko/Epson"
    HorizSync       30.0 - 75.0
    VertRefresh     60.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 230M"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "1"
    Option         "metamodes" "DFP-0: nvidia-auto-select +1920+0, DFP-1: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

答案1

如果这是混合显卡笔记本电脑,请尝试安装 bumblebee 以使 Intel 和 Nvidia 卡同时工作,并使用 gnome-display-properties 进行多屏配置,这比现在的 nvidia twinview 更好: https://launchpad.net/~hybrid-graphics-linux

sudo apt-get 安装 git
# 输入密码
git 克隆 http://github.com/MrMEEE/bumblebee.git
cd 大黄蜂/
sudo./install.sh 复制代码
optirun glxgears
# 检查速度并与运行情况进行比较:
韓國
# 如果您安装了 google-chrome,您可以尝试使用/不使用 optirun,并在邮件列表上报告 FPS 值:
选择运行 google-chrome http://webglsamples.googlecode.com/hg/aquarium/aquarium.html

答案2

我的第一个建议是不要使用 xorg.conf,因为它往往会导致比它解决的更多的问题。

我的建议是分散 可以在启动时运行,如果未检测到显示器,则不会切换分辨率。如果您有更复杂的设置,您可以创建一个具有不同分散设置的脚本,就像我在这个答案中所做的那样 - 如何使用笔记本电脑底座自动切换显示器

答案3

我也解决了这个问题。目前对我有用的文件在最后。

保持事物符合规格的主要设置是:

Option "TwinViewXineramaInfoOrder" "CRT-0"
Option "metamodes" "CRT: nvidia-auto-select, DFP: nvidia-auto-select"
Option "TwinViewOrientation" "RightOf"

这也允许我使用一系列不同的显示器(在启动时连接),而不必担心它们的分辨率。

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "DELL SE198WFP"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 8400M GS"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "1"
    Option         "TwinViewXineramaInfoOrder" "CRT-0"
    Option         "metamodes" "CRT: nvidia-auto-select, DFP: nvidia-auto-select"
    Option          "TwinViewOrientation" "RightOf"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

相关内容