1

How to set up dual monitors for dual GTX on Ubuntu

I'm setting up PC with a pair of GeForce GTX 1070 (Both ASUS TURBO 1070) cards and a Philips 246E FHD monitors connected to each via DP(GPU-0) and HDMI(GPU-1).

PC config
DELL WorkStation Precision T7500 (2009 or 2010 made)
CPU : X5690 * 2
mem : 16GB * 12 (=192GB)
GPU : ASUS TURBO GTX 1070 * 2 (not use SLI cable)
Ubuntu display manager : gdm3

When install Ubuntu 20.04, I checked
・normal installation
・Download updates while installing Ubuntu
・installing third-party software for graphics and wifi hardware...

Picture : install Ubuntu Checked settings ------Picture : install Ubuntu Checked settings------

I installed Ubuntu 20.04,then rebooted,second monitor (connected to GPU-1) doesn't work.

enter image description here

------Picture : second Philips monitor doesn't work------

So I set up "NVIDIA X SERVER SETTINGS" like followings.

enter image description here ------Picture : X SERVER SETTINGS for first monitor------

enter image description here ------Picture : X SERVER SETTINGS for second monitor------

Picture : X SERVER SETTINGS for second monitor

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 440.82

Section "ServerLayout"

# Removed Option "Xinerama" "0"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" 1920 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
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      "Philips PHL 246E7"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Philips PHL 246E7"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 76.0
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1070"
    BusID          "PCI:3:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1070"
    BusID          "PCI:4:0:0"
EndSection

Section "Screen"

# Removed Option "metamodes" "GPU-bb9972e4-0457-d2b7-c62f-9aa988ef66e4.GPU-0.DP-3: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, GPU-850dc788-8ca1-f53b-5edd-54c338e6fed5.GPU-1.HDMI-1: nvidia-auto-select +1920+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
# Removed Option "BaseMosaic" "on"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-6"
    Option         "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-2"
    Option         "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On, AllowGSYNC=Off}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

After rebooting, I still get GNOME on the one monitor. The other monitor, however, is a black screen with just the default X cursor (the glow on the right is just reflections on the monitor):

enter image description here

------Picture : X cursor on second monitor------

This is my nvidia-smi info.

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100      Driver Version: 440.100      CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1070    Off  | 00000000:03:00.0  On |                  N/A |
| 34%   64C    P0    41W / 151W |    436MiB /  8118MiB |      2%      Default |
+-------------------------------+----------------------+----------------------+
|   1  GeForce GTX 1070    Off  | 00000000:04:00.0  On |                  N/A |
| 24%   44C    P8     7W / 151W |     53MiB /  8119MiB |     11%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1103      G   /usr/lib/xorg/Xorg                            35MiB |
|    0      1707      G   /usr/lib/xorg/Xorg                           170MiB |
|    0      1917      G   /usr/bin/gnome-shell                         125MiB |
|    0      3201      G   /usr/lib/firefox/firefox                       2MiB |
|    0      3278      G   /usr/lib/firefox/firefox                       2MiB |
|    0      5499      G   ...094687058528,131072 --disable-features=    36MiB |
|    0      5731      G   /usr/lib/firefox/firefox                       2MiB |
|    0      5774      G   /usr/lib/firefox/firefox                       2MiB |
|    0      5830      G   /usr/lib/firefox/firefox                       2MiB |
|    0      7789      G   /usr/lib/firefox/firefox                      12MiB |
|    0      7826      G   /usr/lib/firefox/firefox                       2MiB |
|    1      1103      G   /usr/lib/xorg/Xorg                            14MiB |
|    1      1707      G   /usr/lib/xorg/Xorg                            15MiB |
+-----------------------------------------------------------------------------+

I cehcked these WEB site as a reference.
https://askubuntu.com/questions/1194621/gnome-ignoring-second-monitor-ubuntu-19-10
4 monitors, 2 NVIDIA video cards - ubuntu not working
https://collaboradev.com/2016/09/30/arch-linux-hydra-build/

  • I think you should swich on "Xinerama". You have Option "Xinerama" "0" in your config file. Try to switch it on with Nvidia XServer Settings or change it directly in xorg.conf. – nobody Aug 12 at 21:25
  • Thank you reply ! I set up xorg.conf "Xinerama" : "1" , then reboot. However both monitor doesn't work (only cursor appeared) and press Ctrl + Alt + F2 , the error(?) dev/sda1: clean ... appeared. So, now I revice "xinerama" : "0" (using Ubuntu install media then revice xorg.conf then rebooted) and wrote this comment. – Yoshio Nishimitsu Aug 13 at 14:04
  • That is strange. From what I see, your desktop (I think it is Gnome) uses only one screen. With Xinerama active it should use both screens, but it didn't use any. That is why you saw only cursor. Try to run DISPLAY=:0 xterm &, and DISPLAY=:1 xterm & from your terminal. Windows should be open on both screens. You should configure your gnome to use DISPLAYS :0, and :1, or enable Xinerama and configure your gnome to use combined DISPLAY. What does command ls -l /tmp/.X11-unix display? – nobody Aug 14 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.