在 Linux 中,如何使用多个 GPU(Intel 和 nVidia)上的多个显示器正确配置显示几何?

ell*_*ell 7 linux multiple-monitors xorg.conf intel-graphics nvidia-graphics-card

我希望三重显示器设置能够正常工作。

我的设置如下:

  • Linux Mint 16 x64
  • 英特尔酷睿 i5-2500k
  • GeForce GTX 560 Ti Cu II
  • 最右侧的显示器连接到主板(i5 上的集成显卡)
  • 连接到显卡的中央显示器
  • 最左边的显示器连接到显卡

我正在使用以下 xorg.config

Section "ServerFlags"
    Option "DefaultServerLayout" "PrimaryLayout"
    Option "Xinerama" "off"
EndSection

Section "Module"
    Load "glx"
EndSection

Section "InputDevice"
    Identifier     "Mouse"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier     "Keyboard"
    Driver         "kbd"
EndSection

Section "Device"
    Identifier "Intel HD Graphics 3000"
    Driver     "intel"
EndSection

Section "Device"
    Identifier     "Geforce GTX 560 Ti"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Screen 0
EndSection

Section "Monitor"
    Identifier "AOC"
    Option "Primary" "true"
EndSection

Section "Monitor"
    Identifier "Samsung"
EndSection

Section "Monitor"
    Identifier "ViewSonic"
EndSection

Section "Screen"
    Identifier "Samsung"
    Device "Intel HD Graphics 3000"
    Monitor "Samsung"
    SubSection "Display"
        Depth 24
    EndSubSection
EndSection

Section "Screen"
    Identifier "AOC"
    Device "Geforce GTX 560 Ti"
    Monitor "AOC"
    SubSection "Display"
        Depth 24
    EndSubSection
EndSection

Section "Screen"
    Identifier "ViewSonic"
    Device "Geforce GTX 560 Ti"
    Monitor "ViewSonic"
    SubSection "Display"
        Depth 24
    EndSubSection
EndSection

Section "ServerLayout"
    Identifier    "PrimaryLayout"
    Screen        "AOC" 0 0 
    Screen        "ViewSonic" LeftOf "AOC"
    Screen        "Samsung" RightOf "AOC"
    InputDevice   "Keyboard" "CoreKeyboard"
    InputDevice   "Mouse" "CorePointer"
EndSection

Section "ServerLayout"
    Identifier "SingleLayout"
    Screen "AOC" 0 0
    InputDevice "Keyboard" "CoreKeyboard"
    InputDevice "Mouse" "CorePointer"
EndSection
Run Code Online (Sandbox Code Playgroud)

这具有以下效果:

  • 最右边的显示器不工作
  • 中央和左侧监视器按预期工作

多一点信息:

  • 我在内核上 3.11.0-12-generic
  • 我正在使用 nvidia 专有驱动程序版本 331.67

Яро*_*лин 2

当我学习 Slackware 的诀窍时,有一个关于安装、配置和维护发行版的优秀新手指南。这些年来它发生了一些变化,可能看起来与 Debian & Co. 无关,但我仍然认为 SlackBook一个很好的介绍材料。

不做任何(恕我直言)的判断,但人们似乎完全忽略了 xorg 手册。也许是因为他们相信 Xorg 会像 Windows 中习惯的那样“自行配置”。情况并非总是如此,有大量关于如何设置双显示器的信息。我在这个网站上回答了至少两个类似的问题,涉及一个非常相似的问题。

到此为止;

man xorg.conf

SERVERLAYOUT SECTION
(...)
Screen  screen-num "screen-id" position-information
(...)
Run Code Online (Sandbox Code Playgroud)

详细信息在手册页中。你想要的看起来像这样:

Section "ServerLayout"
    Identifier      "Three monitors"
    Screen  0       "Screen0" 0 0
    Screen  1       "Screen1" RightOf "Screen0"
    Screen  2       "Screen2" RightOf "Screen1"
EndSection
Run Code Online (Sandbox Code Playgroud)

清单:

  • 屏幕使用正确的设备和显示器标识符
  • 屏幕至少有一个具有分辨率和深度的显示子部分
  • 为所使用的设备加载驱动程序

笔记:

双头显卡(设备部分)可能需要特殊选项,例如总线和显示模式。过去,ATI 卡通常将输出“复制”到两个磁头。通过在设备部分传递某些选项可以防止这种情况。使用 xorg 驱动程序的手册页。

使用最新版本的 Xorg,xrandr可用于配置和启用多个监视器并将它们相对定位。拥有一个配置多个监视器的 xorg.config 并不是真正必要的,但可能更方便。