In Linux, how do I correctly configure display geometry with multiple monitors on multiple GPUs (Intel and nVidia)?

7

1

I want a triple monitor setup to work correctly.

My setup is as follows:

  • Linux Mint 16 x64
  • Intel Core i5-2500k
  • GeForce GTX 560 Ti Cu II
  • A monitor on the far right connected to the motherboard (integrated graphics on the i5)
  • A central monitor connected to the graphics card
  • A monitor on the far left connected to the graphics card

I'm using the following 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

Which has the following effect:

  • The far right monitor doesn't work
  • The central and left monitors work as expected

A little bit more info:

  • I'm on kernel 3.11.0-12-generic
  • I'm using nvidia proprietary driver version 331.67

ell

Posted 2012-11-25T12:47:16.433

Reputation: 3 836

Have you tried using /usr/bin/nvidia-settings for X server configuration? – djhurio – 2012-11-25T19:33:58.447

Do you have the appropriate Kernel module installed for the Intel integrated graphics? @djhurio, nvidia-settings will only work with the nvidia card AFAIK. – Julian Knight – 2013-03-02T21:03:13.163

1@JulianKnight, GeForce GTX 560 Ti Cu II is nVidia card, isn't it? – djhurio – 2013-03-03T06:33:33.357

2@djhurio yes it is but what about the Intel (onboard) graphics. You need a Kernel module for that as well if you want to make use of it under X server. – Julian Knight – 2013-03-03T14:41:23.033

Unfortunately I no longer have a third monitor and so I can't test anything out. The problem was still not solved. What should I do with this question in this case? Leave it open? – ell – 2013-03-03T19:17:54.957

@JulianKnight, you are right. Did not read the question carefully, my fault. – djhurio – 2013-03-04T04:18:51.447

@JulianKnight Does xorg have a mechanism for loading support for more than one video driver at the same time? I thought it could only handle one video driver at a time. – killermist – 2013-03-05T03:48:46.427

1Xorg can handle multiple cards. Simply define a DEVICE section for each card. But you have to have loaded the appropriate Kernel modules. – Julian Knight – 2013-03-05T08:43:38.937

Answers

2

When I was learning the ropes on Slackware, there was this excellent newbie guide to installing, configuring and maintaining the distro. It has changed somewhat over the years, may not seem relevant to Debian & Co., but I still think that the SlackBook is a good piece of introductory material.

Not to pass any (imho due) judgement, but people seem to ignore the xorg manuals entirely. Maybe it's because they are made to believe that Xorg will "configure itself" as one may be accustomed with in Windows. This is not always the case and there is plenty of information out there on how to set up a dual monitor. I've answered at least two similar questions on this site about a very similar problem.

To the point then;

man xorg.conf

SERVERLAYOUT SECTION
(...)
Screen  screen-num "screen-id" position-information
(...)

The details are in the man page. What you want looks something like:

Section "ServerLayout"
    Identifier      "Three monitors"
    Screen  0       "Screen0" 0 0
    Screen  1       "Screen1" RightOf "Screen0"
    Screen  2       "Screen2" RightOf "Screen1"
EndSection

Checklist:

  • Screens use correct device and monitor identifiers
  • Screen has at least on Display sub section with a resolution and depth
  • Drivers are loaded for the used devices

Notes:

Dual-head video cards (device section) may need special options such as bus and display mode. ATI cards used to "copy" the output to both heads in the past. This was preventable by passing certain options in the device section. Use the manual page of the xorg driver.

With recent versions of Xorg, xrandr can be used to configure and enable several monitors and to position them relative to each other. Having an xorg.config that configures several monitors is not really necessary, but may be more convenient.

Ярослав Рахматуллин

Posted 2012-11-25T12:47:16.433

Reputation: 9 076