Bug 1581806

Summary: [RHEL 7.5] mutter ignores multi-monitor layout defined in xorg.conf
Product: Red Hat Enterprise Linux 7 Reporter: Deepu K S <dkochuka>
Component: mutterAssignee: Jonas Ådahl <jadahl>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: urgent    
Version: 7.5CC: alanm, alex.pshenichkin, amike, aubin.guillemette, dereks, dkochuka, fmuellner, jadahl, J.H.Hodrien, jkoten, jwright, mboisver, mclasen, michael.facciani, mkolbas, robin.edser, timmgleason, toneata, tpelka, vchoudha
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: mutter-3.28.3-8.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1690317 1690506 1690760 (view as bug list) Environment:
Last Closed: 2019-08-06 12:37:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1656436, 1690317, 1690760    
Attachments:
Description Flags
Possible replacement for 0001-monitor-config-Consider-external-layout-before-defau.patch none

Description Deepu K S 2018-05-23 16:19:26 UTC
Description of problem:
System ignores multi-monitor layout in xorg.conf

In RHEL7 prior to 7.5, and most versions of RHEL6, we are able to set this up using the metamodes command in xorg.conf.

With RHEL7.5, display settings revert to a side-by-side 1920x1080 configuration after every reboot; additionally, the viewport is cut off oddly (e.g. the top left corner pulldown menu is off-screen). We are able to force the displays into the proper configuration by changing settings using the nvidia-settings application, but saved settings (in xorg.conf) don't persist past reboot.
------------------------------
| 1920x1080 || 1920x1080 |
------------------------------

This seems to be a regression of an old bug fixed in a previous release: https://bugzilla.redhat.com/show_bug.cgi?id=1290448

Tried :
- generate new xorg.conf via nvidia-settings application: no effect
- generate a "generic" monitors.xml by removing serial ids: no effect

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux 7.5
mutter-3.26.2-13.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. In multi-monitor setup, generate new xorg.conf .
2. Or try using a system-wide /etc/xdg/monitors.xml .
3.

Actual results:
Monitor Layout from xorg.conf is not honoured.

In RHEL 7.4, /etc/xdg/monitors.xml was been read.

But with RHEL 7.5, even /etc/xdg/monitors.xml and /etc/gnome-settings-daemon/xrandr/monitors.xml doesn't work.

Only ~/.config/monitors.xml is honoured.

Expected results:
GNOME (mutter) should honour layout defined in xorg.conf and system-wide monitors.xml

Additional info:

Comment 2 Timm Gleason 2018-06-01 19:46:10 UTC
Created attachment 1446790 [details]
Possible replacement for 0001-monitor-config-Consider-external-layout-before-defau.patch

Comment 3 Timm Gleason 2018-06-01 19:46:23 UTC
The patch that was fixing this (as of mutter-3.22.3-12.el7_4.src.rpm) has been renamed and is completely different in content.

mutter-3.22.3-12.el7_4 -> 0001-monitor-config-Consider-external-layout-before-defau.patch
mutter-3.26.2-13.el7 -> 0001-monitor-manager-Consider-external-layout-before-defa.patch

Minor change in name, but massive change in content.

Looking at the patch, the hunk that patches meta-monitor-config-manager.c, ends in a 'return NULL', but the call to this function is expecting something, not NULL. There are several other functions following the patched in function that follow the same code pattern, but they all end with a meaningful return value.

I replaced the 'return NULL' used in the patch with this code the other funcs were using and rebuilt. The expected behaviour returned after removing all existing monitor.xml files.  This may not be the best solution, but it is one that worked for us.

Attaching patch that I replaced 0001-monitor-manager-Consider-external-layout-before-defa.patch with.

Comment 18 Jonas Ådahl 2018-10-04 10:21:08 UTC
So left for this particular bug report are two things then:

1. No system wide monitors.xml
2. Mutter not respecting the "viewportin" part of the metamode

Is this correct?

Comment 19 Deepu K S 2018-10-29 10:29:30 UTC
(In reply to Jonas Ådahl from comment #18)
> So left for this particular bug report are two things then:
> 
> 1. No system wide monitors.xml
> 2. Mutter not respecting the "viewportin" part of the metamode
> 
> Is this correct?

Yes. That's corect.

Comment 20 John Hodrien 2019-02-01 08:57:57 UTC
We're seeing what I'm assuming is the same problem with CentOS 7.6 

System has two 1920x1200 projectors, and two 1920x1080 monitors.  Config in xorg is 1920x1080 on everything, with the projectors mirroring the content of the monitors.

Option         "metamodes" "DP-1: 1920x1080 +0+0, DP-3: 1920x1080 +1920+0, DP-5: 1920x1080 +0+0, DP-7: 1920x1080 +1920+0"

Bringing up X on its own gives the right layout, but starting normally via GDM, it resets the resolution of the projectors to 1920x1200, and creates a horizontal spread of screens.
I could find not way of making it honour a monitors.xml system-wide.

Comment 28 errata-xmlrpc 2019-08-06 12:37:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2044