How to set up triple monitors in 14.04 with NVIDIA GTX980M

6,896

For some weird reason it seems that as long as I plug in the external monitors after I log in, I can run arandr to configure the screens into displaying extended desktop totally fine (from mirrored screens). If I leave them already connected before I start up the laptop, it doesn't work and the internal display is always blank (not all blank actually, since there's light and it's obviously "on", but just black and displaying nothing. It's different than when I deactivate the screen in arandr.) Not sure what's the explanation for that but will go with it for now.

Share:
6,896

Related videos on Youtube

xji
Author by

xji

Updated on September 18, 2022

Comments

  • xji
    xji almost 2 years

    I'm used to working with three monitors at the same time (laptop monitor + two external monitors). However, I don't seem to be able to get it working on my Ubuntu 14.04 with a GTX980M + Intel configuration which has three video outputs (One HDMI + two DisplayPort). It works perfectly on Windows so I guess it's more likely a Ubuntu configuration issue. The model is Clevo P650 (known as Sager 8658 in the US or 神舟 战神 Z8-KL7S2 in China). I have installed the NVIDIA proprietary driver version 355. Strangely, on the login screen, all three screens display Ubuntu background correctly, as shown here.

    However, once I log in, only two screens can coexist at the same time: If I leave out a cable, whether at HDMI or DisplayPort, the laptop monitor displays normally with the one remaining external monitor. However, if I keep both cables plugged in, then the laptop monitor goes dark and only two external monitors are displayed.

    I tried running sudo nvidia-settings, however only two displays are shown there, as can be seen in the photo. I tried to create multiple X screens in the configuration, but strangely, the settings that I wrote each time via "Save to X Configuration File" seem to get lost whenever I login again, as xorg.conf gets reset to its initial state. It seems that the settings written are invalid. I Googled a while, but the questions seem to be dealing with older versions of Ubuntu/NVIDIA drivers. I couldn't find where I might be able to configure TwinView. I'm currently at a loss as of what to do next. Should I try to manually write a xorg.conf? Any help would be appreciated. Thanks!


    EDIT: The situation with nouveau is even worse. Although lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA seems to show that both the NVIDIA and the Intel cards are working, no external monitor seems to be recognized at all.

    The xorg.conf written by nvidia-settings by default (without attempting to create multiple X screens) seems to be this one. The strange thing is that it seems only one monitor (on HDMI) gets recognized although I connected two, not to mention the internal monitor on the laptop:

    # nvidia-settings: X configuration file generated by nvidia-settings
    # nvidia-settings:  version 358.16  (buildd@lcy01-29)  Sat Nov 21 02:54:29 UTC 2015
    
    # nvidia-xconfig: X configuration file generated by nvidia-xconfig
    # nvidia-xconfig:  version 355.11  (buildmeister@swio-display-x86-rhel47-07)  Wed Aug 26 17:15:49 PDT 2015
    
    Section "ServerLayout"
        Identifier     "layout"
        Screen      0  "Screen0" 0 0
        Inactive       "intel"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"
        Option         "Xinerama" "0"
    EndSection
    
    
    Section "InputDevice"
    
        # generated from default
        Identifier     "Keyboard0"
        Driver         "keyboard"
    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 "Monitor"
        Identifier     "Monitor0"
        VendorName     "Unknown"
        ModelName      "Samsung S27D590"
        HorizSync       30.0 - 81.0
        VertRefresh     50.0 - 75.0
        Option         "DPMS"
    EndSection
    
    Section "Device"
        Identifier     "intel"
        Driver         "intel"
        Option         "AccelMethod" "SNA"
        BusID          "PCI:0@0:2:0"
    EndSection
    
    Section "Device"
        Identifier     "nvidia"
        Driver         "nvidia"
        BusID          "PCI:1@0:0:0"
    EndSection
    
    Section "Device"
        Identifier     "Device0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "GeForce GTX 980M"
    EndSection
    
    Section "Screen"
        Identifier     "intel"
        Device         "intel"
        Monitor        "Monitor0"
    EndSection
    
    Section "Screen"
        Identifier     "nvidia"
        Device         "nvidia"
        Monitor        "Monitor0"
        DefaultDepth    24
        Option         "AllowEmptyInitialConfiguration" "on"
        Option         "IgnoreDisplayDevices" "CRT"
        Option         "ConstrainCursor" "off"
        SubSection     "Display"
            Depth       24
            Modes      "nvidia-auto-select"
        EndSubSection
    EndSection
    
    Section "Screen"
        Identifier     "Screen0"
        Device         "Device0"
    
        DefaultDepth    24
        Option         "Stereo" "0"
        Option         "metamodes" "HDMI-0: nvidia-auto-select +1920+0, DP-2: nvidia-auto-select +0+0"
        Option         "SLI" "Off"
        Option         "MultiGPU" "Off"
        Option         "BaseMosaic" "off"
        SubSection     "Display"
            Depth       24
        EndSubSection
    EndSection
    

    EDIT2: Now I realized I can't actually run the internal monitor together with just one external monitor either. When I try it, the monitors get mirrored and get very weird resolution. When I try to demirror them, I can't even click on the "keep current configuration" button to confirm the change. Actually, the display on three screens at startup was also probably just because of mirroring effect.

    • Admin
      Admin over 8 years
      Suggestion: Include your laptop brand and model. This is because some manufacturers may have noted that some of their models don't support using multiple display ports at the same time. Just one of the possibilities.
    • xji
      xji over 8 years
      @clearkimura Sure, the thing is that the triple monitor setup works perfectly well on Windows, so I think it's more likely to be a Ubuntu configuration issue. My model is Clevo P650 (known as Sager 8658 in the US or 神舟 战神 Z8-KL7S2 in China)
    • xji
      xji over 8 years
      Now the built-in monitor occasionally works... it seems that the active configuration file under Unity is actually the user-specific file ~/.config/monitors.xml, and once it's configured correctly, all three displays can function simultaneously. Still need more testing to confirm this.
    • Fabby
      Fabby over 8 years
      Could you post your monitors.xml to paste.ubuntu.com and then leave a comment @Fabby?
    • xji
      xji over 8 years
      @Fabby Thanks for the suggestions. But it seems to me that there's just absolutely no difference in both the contents of monitors.xml as well as the information displayed by xrandr in both scenarios. It's just that in the bad case the internal display is all black (not blank actually, since there's light and it's obviously on, but just black. It's different than when it's not activated), and in the good case it display normally. That seems to be all of the difference I can see.
    • xji
      xji over 8 years
      @JacobVlijm Now I always run arandr or the display utility from mirrored screens to change to extended desktop. Sometimes it fails and the screens are reverted to mirrored state. And sometimes it just directly crashes and logs me out, and I could only restart to fix the issue. Not sure if I can find the output and error log of such failed commands somewhere.
    • Jacob Vlijm
      Jacob Vlijm over 8 years
      @XiangJi Not sure what you are trying to say with your comment. Still would like the requested info, but it's up to you.
  • Marilou
    Marilou over 8 years
    it is going to happen on several machines after last update of Xubuntu 14.04 and X.Org NVidia drivers. Did you try to update to different NVidia driver? Please come back if you find a solution.
  • xji
    xji over 8 years
    @Dee You mean it's observed on some other machines also? I'm using nvidia-355 as the driver
  • Marilou
    Marilou over 8 years
    @Yiang Ji, yes, I experienced that too... means, it looks like it is not about the NVidia driver, but about what the Ubuntu is doing after boot (this could be possibly daily-build-kernel made). I will put there some investigation power, because if no success, re-installation is needed. I'll be back if I will find something.