Dual monitor configuration issue

Sometimes I wish that developers would leave well enough alone. I would probably still be using Windows Nt 4.0 or perhaps CP/M - I bet that would scream on an i7 processor :smiling_imp: But here is the situation…

I have a Dell Studio XPS 8000 PC (ca. 2009). I ran Ubuntu 9.10 initially with two monitors configured as separate X screens. 10.04 did not support two monitors on the system and I moved with considerable effort to CentOS 6. This OS has obsoleted two video cards over the years and I currently have an nVidia Quadro K420 and two Dell Ultrasharp U2412M monitors. It works fine but is getting a little long in the tooth. I have been looking at CentOS7 (with the Mate desktop) and Ubuntu Mate 16.04 - both of which I am running on single monitor machines.

Here is the monitor configuration which I use in CentOS 6 and which I am trying to duplicate in Ubuntu Mate 16.04:

Left monitor - rotated to Portrait 1200 x 1920
Right monitor - Landscape 1920 x 1200

The displays are configured (using Nvidia config) as X Screen 0 and X Screen 1. This provides me with these advantages:

Each monitor has an independent panel - a different collection of launchers on each.

I normally have my email client (Thunderbird) open on the top of the Portrait monitor and a VMWare virtual machine running on the bottom half of the Portrait monitor. The Virtual machine is dedicated to accessing a secure email service in Switzerland.

I frequently call up Firefox on the Portrait monitor as most web pages are tall as opposed to wide. When I close Firefox - which I do often - I again have my email easily accessible.

Occasionally I change the Portrait monitor to a different workspace but not often as I loose access to my email while doing so.

The Landscape monitor is my normal “working” display. I utilize more than one workspace and sometimes 3 or 4 will be in use.

The BIG advantage of using separate X screens as opposed to a single display spanning both monitors is that I can flip between workspaces on the Landscape monitor while NOT changing the workspace displayed on the Portrait monitor. I do not believe that this is possible any other way.

Today I installed Ubuntu Mate 16.04 on a test hard drive. I applied all updates and added the nVidia driver. Using nvidia-config I manipulated the monitors in the same way as I have done on CentOS 6 (and 7). The result so far is:

I have two seemingly independent screens. The Landscape monitor is selected as X screen 0 and contains a “working” Desktop. That I can create files, launchers, folders etc. on this Desktop. If I launch an application from the menu on the Landscape monitor it appears on the Landscape monitor. And all is well - on this monitor.

The Portrait monitor - X screen 1 - is another story.

The Desktop is “dead.” By that I mean it does not have the background image from the other monitor - it is black. Right clicking on the dead Desktop does not produce any result.

The top panel on the Portrait monitor is somewhat grayed out. However, I can add a launcher to the panel and the launcher will invoke the appropriate application EXCEPT that the application displays on the Landscape monitor.

Being separate X screens I can NOT drag an application between the monitors. This is as expected.

Here is the xorg.conf as created by nvidia-config:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 361.42  (buildd@lgw01-18)  Tue Apr  5 14:33:28 UTC 2016

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 1200 0
    Screen      1  "Screen1" 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 U2412M"
    HorizSync       30.0 - 83.0
    VertRefresh     50.0 - 61.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "DELL U2412M"
    HorizSync       30.0 - 83.0
    VertRefresh     50.0 - 61.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro K420"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro K420"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DVI-I-1: nvidia-auto-select +0+0"
    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         "metamodes" "DP-1: nvidia-auto-select +0+0 {rotation=left}; DP-1: 1920x1080 +0+0 {rotation=left}; DP-1: 1680x1050 +0+0 {rotation=left}; DP-1: 1600x1200 +0+0 {rotation=left}; DP-1: 1280x1024 +0+0 {rotation=left}; DP-1: 1280x960 +0+0 {rotation=left}; DP-1: 1024x768 +0+0 {rotation=left}; DP-1: 800x600 +0+0 {rotation=left}; DP-1: 640x480 +0+0 {rotation=left}; DP-1: nvidia-auto-select +0+0 {rotation=left, viewportin=900x1440}; DP-1: nvidia-auto-select +0+0 {rotation=left, viewportin=768x1366, viewportout=1920x1079+0+60}; DP-1: nvidia-auto-select +0+0 {rotation=left, viewportin=800x1280}; DP-1: nvidia-auto-select +0+0 {rotation=left, viewportin=720x1280, viewportout=1920x1080+0+60}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

By way of comparison CentOS 7 works a little better in that an application launched on the panel above the “dead” Desktop will in fact appear on the monitor with the dead Desktop. A comparison of the xorg.conf files show only 5 minor differences:

  1. A slightly newer version:
# nvidia-settings:  version 361.45.11  (buildmeister@swio-display-x86-rhel47-08)  Tue May 17 18:57:21 PDT 2016
  1. Screen 0 is rotated 360 degrees (?)
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 1200 360
  1. A font path is specified
Section "Files"
    FontPath        "/usr/share/fonts/default/Type1"
EndSection
  1. The mouse is specified differently
Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
  1. And finally this Xinerama option in the Screen 0 definition. Xinerama is not enabled so I am not sure if this does anything.
Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"

Using my usual sledgehammer approach I replaced the Ubuntu generated xorg.conf with the working one from CentOS 6. That did not work - no X at all :frowning:

I would sure like to give Ubuntu a try again - especially with the Mate environment. Can anyone give me a had sorting this out?

TIA,

Ken

I’m far from being an expert with X, but I’m curious with this type of setup. I imagine that the second X screen shows the top panel, no desktop, and seems to still have connections with the first X screen.

Do both screens login as the same user, or does it present separate login screens?

As a test, does the file manager show on the second monitor only if you execute this from the first:

env DISPLAY=:1 caja

If it appears, then you may just need to spawn a separate mate-session on the second X screen, similar to how X2Go would start a new virtual X screen. I believe this is the command:

env DISPLAY=:1 mate-session

Say what? Sorry, I am back on CentOS 6 trying to fix a pdf not viewing issue. I have three virtual machines and a connection to a remote PC running and to be honest the monitors are switched on CentOS 6 - the Portrait is 0 and the Landscape 1. Let me get my head back to what I remember from running the Ubuntu setup. Before I retired I got paid for not having to think this hard :grin:

The second monitor (Portrait, X screen 1) displays its own top AND bottom panels. By default they are empty. I added a launcher to Firefox to the empty top panel.

Yes, there is no desktop - it is blank/black.

The only “connection” between the screens is that I can move the mouse between them. When I launched Firefox from the newly created launcher the program appeared on the other monitor (X screen 0). I do not recall if the (what ever it is called - button like thing) for the running Firefox program appeared on the lower panel of the monitor FROM WHICH I launched it (Portrait, X screen 1). I think it did.

Both screens share a common logon. The dialog appears on the Landscape monitor (X screen 0). As a side note… on the CentOS 6 installation the dialog to unlock the screen after the screen saver has locked it may appear on either monitor. Not sure how or why.

Let me boot back into Ubuntu and try your tests. I will post back with my results - provided I do not blow up the PC completely!

Thanks lah7,

Ken

I tried your experiment with these results:

ken@taylor12:~/Desktop$ env DISPLAY=:1 caja
Could not parse arguments: Cannot open display:
ken@taylor12:~/Desktop$ env DISPLAY=:1 mate-session

** (mate-session:3179): WARNING **: Cannot open display:

Interestingly this does not work on my CentOS 6 installation either. If I say DISPLAY=0: the appllication does in fact launch on the monitor with X screen 0. This make me think I have only ONE display even though there are two “Screens”.

I launched Firefox from the top panel on the dead Desktop. As I stated before it started on the monitor with the living desktop. I added a Window Selector to the bottom panel on he dead desktop monitor. When I launch a program from the top panel I briefly see a representation of it on the bottom panel but then the Window Selector “button” appears on the living monitor.

Back to my CentOS 7 setup… not only does a program launched from the top panel of the dead Desktop run on the monitor with the dead Desktop but the Window Selector button displays on the lower panel of that screen (after I added the Window Selector of course).

Ken

Thinking about it, that's probably correct with this set up. Separate X displays would enable having different devices connected to control that one display. I don't really know the terminology to describe this setup... :confused:

I found this thread:

This sounds similar to your set up in that each monitor has a separate workspace. It could be possible that MATE does not support this. Is your CentOS installation using MATE or GNOME 2?


Just throwing another suggestion out there... What could be the culprit is the display manager. CentOS 7 I believe uses GDM (GNOME Display Manager) whereas Ubuntu had switched to LightDM for years.

It's possible to switch, but I don't know if this would make a difference or if it might break things. Take caution.

Otherwise, I'm afraid I won't be much of assistance for the exact solution, but I have a vague idea of what's happening. :frowning:

Thanks again lah7,

The post you point to appears to describe the same situation. I actually have 8 workspaces, 4 on the left and 4 on the right. By alllowing them to be changed independently on the two monitors I actually have 16 possible combinations. I cannot, however, put workspace 2 from the right monitor onto the left monitor.

As to the display manager… I recall looking at this some time back. I never did figure out how to determine what display manager I was actually running. I searched and asked and never did come up with an answer to what seemed a simple question. Do you know? Is there a command or an configuration file to view???

CentOS 6 is running Gnome2
CentOS 7 is running mate-desktop-environment groupinstalled on top of a groupinstall of “X Window system”

I note that ps on CentOS6 tells me:

root 3465 0.0 0.0 134020 2176 ? Ssl 13:52 0:00 /usr/sbin/gdm-binary -nodaemon
root 3495 0.0 0.0 164980 3612 ? Sl 13:52 0:00 /usr/libexec/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1
root 3498 1.4 2.0 261660 165964 tty1 Ss+ 13:52 1:30 /usr/bin/Xorg :0 -br -verbose -audit 4 -auth /var/run/gdm/auth-for-gdm-KXP7tR/database -nolisten tcp vt1
gdm 3583 0.0 0.0 20188 736 ? S 13:52 0:00 /usr/bin/dbus-launch --exit-with-session
root 3637 0.0 0.0 191700 3132 ? Sl 13:52 0:00 pam: gdm-password

So I guess I am running gdm on CentOS 6

A similar request to a CentOS 7 machine seems to indicate that lightdm is running. I am strictly at an experimenting stage now - and my work to date is backed up with Clonezilla - so let me see if I can load gdm onto CentOS 7 (which is closer to what I am trying to do) and if that works I will apply it to the Ubuntu Mate install.

Ken

p.s. I wonder if Ubuntu switched at 10.04? That was when I could no longer run dual monitors on Ubuntu.

The which command will print the executable path. Only one of these should print a path:

which lightdm
which gdm

You could look in /usr/share/ for a lightdm or gdm folder too.

The display managers start the X server, so my thinking is that if it works correctly on CentOS 6 with GDM, then it may be processing things differently to what lightdm (and newer distros) would do. Just speculating there, but it seems like the solution will be found by trial and error.

According to this article, it was Ubuntu 11.10.

It also mentions this... always learning something new: :wink:

While GDM is about 50,000 lines of codes, LightDM has only about 5,000 lines of codes.

And again thanks lah7,

That command does the trick or at least shows what is present. If I get both installed on a CentOS 7 test installation I would have to rely on ps to show me which one is actually executing.

Ken

p.s. As to the lines of code… My pdf reading boondoggle… I installed Acrobat Reader just as a test. The package was 60 MB by itself and the necessary dependencies another 228 MB! No wonder I don’t use it. Atril opens the pdf in question but the old version of Evince on CentOS 6 will not. It is a quarterly report from a financial institution and that has prompted me to look a little more seriously about updating my system. I do have support through November 2020 with CentOS 6 :relaxed:

1 Like

I am running out of SSDs for testing. I may have to resort to using some old mechanical drives. And I had better start labeling them so I remember what I have installed on each! That said… I did determine that CentOS 7 with Gnome 3 uses gdm. I have setup a virtual machine with this OS and am currently adding the Mate desktop environment. I note that it is installing lightdm. I will see if I can run Mate on gdm in the virtual machine.

If that works, I will try adding gdm to my Ubuntu Mate install on the physical machine. I guess I need a physical install of an OS running gdm as well so that I can see if the original dual monitor issue. Mate is installed so let me pop over to that machine and let me if I can get it to run.

Ken

It does not seem to be gdm related. In scrounging for some hardware I came across an unused SSD. It booted into CentOS 7 with Mate. And it worked! Both monitor had living desktops. And then (after making a Clonezilla snapshot) I updated the software. It no longer works correctly. The screen 0 monitor is black - same as I got with a more recent build and similar to what I got with Ubuntu Mate. It appears I made the working install about 6 months ago.

Ken

1 Like

Hi Ken,

I do have an Nvidia GPU but don’t have a dual monitor set-up so I can really only recommend you take a look on the Nvidia forum which might help you?:

https://forums.geforce.com/

Hmm, this’ll get tricky to investigate. It sounds like newer versions of particular pieces of software have broken this.

If there’s a bug report, or one you could re-produce, this would greatly help fix the aging X server for both distros.

However, let’s see what versions are in use for:

  • CentOS 7 with MATE (when working)
  • CentOS 7 with MATE (updated, but broken)
  • Optionally, Ubuntu MATE.

Of the following packages:

  • lightdm
  • Xorg (not at PC right now to get its package name)
  • NVIDIA version.
  • Kernel version (uname -a)
  • Anything else that might be related to X.

Synaptic will be useful in Ubuntu for viewing package versions. I’m afraid I don’t know the equivilant for CentOS.

You may be able to lock and use older versions of the affected packages, while keeping the rest of the system up to date. Kind of like super gluing old parts until (and if) it’s fixed.

You could try Ubuntu MATE 14.04 to see if we can filter down when abouts this issue kicked in. With UM 14.04 being an “unofficial” release at the time, it’s not really supported now that 15.04 onwards became “official” and uses the official infrastructure from Canonical.

Thanks wolfman, I will have a look at the Nvidia forum although I suspect it is not the video card/drivers. The displays “work” it is what is displayed on the displays which does not work.

Thanks again lah7. The bug reports had nothing to do with X - don’t even remember what. The automatic bug reporter icon was showing and I clicked on it just for a look. I then saw a recent bug and 3 old ones listed as 6 months ago which gave me an idea of when I built the installation.

I can pull a package listing with rpm then restore the working CentOS 7 installation, do the same and then compare the lists. I will put that on my to do list. I need to see if I can get my old Brother multifunction color printer, scanner faxer copier gizmo to work on CentOS 7 before I spend too much time on the displays. I also have to make sure my home built 32 bit wine environment will run 3 legacy Windoze programs. I have it on another CentOS 7 machine with one of the programs running. CentOS 7 is 64 bit ONLY.

My biggest concern at the moment is that CentOS (RHEL) tends to be “conservative” (read behind the times) when it comes to updating packages. Ubuntu Mate worked WORSE than the updated CentOS 7 which worked WORSE than the old CentOS 7. I hope this is not a downward trend.

Ken

2 Likes