Announcement

Collapse
No announcement yet.

Linux multi head: success with 8 monitors in 1 X screen without Xinerama

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Linux multi head: success with 8 monitors in 1 X screen without Xinerama

    Hello,

    After a multi year journey experimenting with multi display on Linux, I finally personally reached a very important milestone today:

    I am running successfuly a single X screen with 8 monitors over two GPUs:
    • without Xinerama
    • with OpenGL working
    • with XFCE working
    • windows can be moved from one display to another, maximizing a window only maximizes over one monitor.


    My journey started a few years ago when I started playing with mutli head. Back in 2010, I had no problems running a Ubuntu with two monitors using a single Nvidia GPU (with two ports).

    Then in 2012 I got hired in a job when I got a 4 monitor workstation with an Nvidia quadro . I thought it was not going to be an issue but after a few hours, I realized it was not going to work. There was multiple problems at the time: not sure if it was due to the advancement of the nvidia driver or of the xrandr spec, or X's, but single screen with multiple GPUs was just not possible at the time without Xinerama. Xinerama was out of the question as I am using OpenGL GIS tools in my work, and it is not an option.

    Fast forward another year (early 2013), and I got a new job, this time with an 8 monitors workstation and 2 nvidia quadro GPUs. Although it works flawlessly on Windows, the Linux story is something else. Note that I work in the financial industry and that "front office" people using Linux is a rarity (in other words: no local guru to help me, I am on my own!),

    After extensive research, I realized that single X screen with multi GPU was still not possible at the time and that the best solution was to find one GPU with as much display ports as possible. I settled on AMD/ATI cards which could handle up to 6 screens with one GPU thanks to a technology called Eyefinity. In a nutshell: it worked very well with the ATI/AMD proprietary driver. There was definitely some minor issues there and there, mostly at the windows manager and display manager levels. I got to work on that configuration for about 18 months.

    Now, I finally decided to try to reach the next level: 8 screens. Unfortunately, there is no such thing as an AMD/ATI 8 screens Eyefinity card. And Nvidia does not have a card with more than 4 display ports per GPU. I decided last night to read extensively about that issue as I knew there had been some advances in the Nvidia proprietary driver in regards to the implementation of xrandr. Finally, I read about this Nvidia thing called "Mosaic" (base and SLI) and found it interesting. I read about two persons being able to run a single X screen with two Nvidia GPUs and suddenly got super excited. This was a breakthrough to me as I always assumed I would have to wait for Wayland to be able to do such a thing...

    I tried today the following: Ubuntu 14.04, 2 x Quadro NVS 510 GPU, ubuntu's nvidia binary driver 331. XFCE 4.10.1... and got it to work without even myself writing a single line of xorg.conf! Just using the nvidia-settings graphical tool, I have been able to setting my 8 screens successfully.



    A few info about my config:

    Code:
    $ lspci | grep NVI
    01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [NVS 510] (rev a1)
    01:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)
    05:00.0 VGA compatible controller: NVIDIA Corporation GK107 [NVS 510] (rev a1)
    05:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)
    Code:
    $ dpkg -l | grep nvidia
    ii  nvidia-331-updates                                    331.38-0ubuntu7.1                                   amd64        NVIDIA binary driver - version 331.38
    ii  nvidia-libopencl1-331-updates                         331.38-0ubuntu7.1                                   amd64        NVIDIA OpenCL Driver and ICD Loader library
    ii  nvidia-opencl-icd-331-updates                         331.38-0ubuntu7.1                                   amd64        NVIDIA OpenCL ICD
    ii  nvidia-prime                                          0.6.2                                               amd64        Tools to enable NVIDIA's Prime
    ii  nvidia-settings                                       331.20-0ubuntu8                                     amd64        Tool for configuring the NVIDIA graphics driver
    Code:
    $ xrandr --listproviders
    Providers: number : 1
    Provider 0: id: 0x279 cap: 0x1, Source Output crtcs: 8 outputs: 16 associated providers: 0 name:NVIDIA-0
    Code:
    $ cat /etc/X11/xorg.conf
    # nvidia-settings: X configuration file generated by nvidia-settings
    # nvidia-settings:  version 331.20  ([email protected])  Mon Feb  3 15:07:22 UTC 2014
    
    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 2007FP"
        HorizSync       30.0 - 83.0
        VertRefresh     56.0 - 76.0
        Option         "DPMS"
    EndSection
    
    Section "Device"
        Identifier     "Device0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "NVS 510"
        BusID          "PCI:1:0:0"
    EndSection
    
    Section "Screen"
        Identifier     "Screen0"
        Device         "Device0"
        Monitor        "Monitor0"
        DefaultDepth    24
        Option         "Stereo" "0"
        Option         "nvidiaXineramaInfoOrder" "DFP-0"
        Option         "metamodes" "GPU-2ef18435-f821-f3ba-1c65-58dcdefd9b08.GPU-0.DP-0: nvidia-auto-select +1600+1200, GPU-2ef18435-f821-f3ba-1c65-58dcdefd9b08.GPU-0.DP-1: nvidia-auto-select +0+1200, GPU-2ef18435-f821-f3ba-1c65-58dcdefd9b08.GPU-0.DP-2: nvidia-auto-select +0+0, GPU-2ef18435-f821-f3ba-1c65-58dcdefd9b08.GPU-0.DP-3: nvidia-auto-select +1600+0, GPU-0e544f43-5572-f4de-e44d-c25cb7eff87a.GPU-1.DP-4: nvidia-auto-select +3200+1200, GPU-0e544f43-5572-f4de-e44d-c25cb7eff87a.GPU-1.DP-5: nvidia-auto-select +4800+1200, GPU-0e544f43-5572-f4de-e44d-c25cb7eff87a.GPU-1.DP-6: nvidia-auto-select +4800+0, GPU-0e544f43-5572-f4de-e44d-c25cb7eff87a.GPU-1.DP-7: nvidia-auto-select +3200+0"
        Option         "MultiGPU" "Off"
        Option         "SLI" "off"
        Option         "BaseMosaic" "on"
        SubSection     "Display"
            Depth       24
        EndSubSection
    EndSection
    I think the key insights are (and my reading could be wrong):
    • You need to enable the base mosaic mode (I did not mess with SLI, which was disabled).
    • Xorg and xrandr only sees one GPU (I suspect the base mosaic mode combines the two GPUs with 4 screens each into one abstract 8 screens GPU).


    In conclusion:

    Even though the quadro GPUs are not cheap, the good news is that it is technically possible to have so many monitors with only one X screen.

    There are still a few glitches: for instance, lightdm's cursor (and then XFCE's) is messed up if your monitor layout has two floors (fix: install gdm).

    The sole reason for me to write such a post on Phoronix is that it would help the few people out there that are looking for a stable/just-spend-a-few-hundread-bucks 6 to 8 monitor solution with Linux. There are not that many people using more than 2 screens out there on Linux, not to mention with weird layouts and resolutions... but the more we are, the better support we will get for multi-monitors in WMs and DMs!

    Some outstanding questions:
    • Could I increase the monitor count to 12 if I add another quadro?
    • Would one X screen with multiple GPUs work if the GPUs are not exactly the same model?




    SR

  • #2
    Note that with DP chaining / DP MST hub you would be able to use more than six screens with an eyefinity card. There are some limits to the chaining though.

    Comment


    • #3
      Originally posted by sr91 View Post
      Some outstanding questions:
      • Could I increase the monitor count to 12 if I add another quadro?
      • Would one X screen with multiple GPUs work if the GPUs are not exactly the same model?
      WRT that second question, I think the answer is no. I've been trying to have an old 8600 GT have output at the same time as a 780 Ti and I'm having a hell of a time getting anywhere (even though they should both use the same driver). I think they have to be the same, or be Quadro cards (source?)

      Comment


      • #4
        I think not.

        Originally posted by sr91 View Post
        Some outstanding questions:
        • Could I increase the monitor count to 12 if I add another quadro?
        • Would one X screen with multiple GPUs work if the GPUs are not exactly the same model?
        WRT the second question, I think the answer is no. I've been trying to have output on both my old 8600 GT and my 780 Ti, and no mater what I try, I cannot get output on the 8600 (even though they're supposed to use the same driver). I think the cards need to either be the same or be Quadro cards (source?).

        Comment


        • #5
          That is a limitation of the proprietary NVidia driver. With the free drivers and xrandr/PRIME there should be no such limitation.

          This thread has more information.

          Comment


          • #6
            Originally posted by curaga View Post
            Note that with DP chaining / DP MST hub you would be able to use more than six screens with an eyefinity card. There are some limits to the chaining though.
            The limit is still 6 displays. DP MST just allows you to drive multiple displays from a single connector.

            Comment


            • #7
              Oh, how come? DP was supposed to remove that limitation, allowing infinite chaining (up until the bandwidth limit :P).

              Comment


              • #8
                Originally posted by sr91 View Post
                I decided last night to read extensively about that issue as I knew there had been some advances in the Nvidia proprietary driver in regards to the implementation of xrandr. Finally, I read about this Nvidia thing called "Mosaic" (base and SLI) and found it interesting. I read about two persons being able to run a single X screen with two Nvidia GPUs and suddenly got super excited. This was a breakthrough to me as I always assumed I would have to wait for Wayland to be able to do such a thing...
                I'm a bit confused. I thought open source drivers have supported this with xrandr --setprovideroutputsource since the release of randr 1.4 in early 2013. Of course there were some bugs, but... does this not work?

                Comment


                • #9
                  Originally posted by chithanh View Post
                  That is a limitation of the proprietary NVidia driver. With the free drivers and xrandr/PRIME there should be no such limitation.

                  This thread has more information.
                  I'll look into this further when I get a chance later.

                  Also sorry for the double post...

                  Comment


                  • #10
                    It is actually possible to use more than 6 displays on one AMD card through adapters that make two monitors behave like one to the graphics card.

                    Zotac DP2HD/MDP2HD or Matrox DualHead2Go/TripleHead2Go are examples. The combined resolution of the connected monitors is limited to 3840x1080 per adapter however. And you will need to specify custom Xinerama information (e.g. through fakexinerama library or NVidia's XineramaInfoOverride) to make applications and window managers behave correctly when opening windows, maximizing, etc.

                    Comment

                    Working...
                    X