Bug 79015 - Custom Modelines are being ignored in xf86-video-intel-git
Summary: Custom Modelines are being ignored in xf86-video-intel-git
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-21 12:22 UTC by Jay Little
Modified: 2014-05-21 20:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
XOrg Log using current git intel driver (4.64 KB, text/plain)
2014-05-21 18:47 UTC, Jay Little
no flags Details
XOrg Log using previous dev release intel driver (4.89 KB, text/plain)
2014-05-21 18:48 UTC, Jay Little
no flags Details
XOrg Conf (with Monitor config) (3.94 KB, text/plain)
2014-05-21 18:48 UTC, Jay Little
no flags Details

Description Jay Little 2014-05-21 12:22:34 UTC
Within my /etc/X11/xorg.conf file, I have several custom modelines specified for my laptop monitor.  For example the monitor runs at 1920x1080 natively and I have a custom modeline added for 1600x900.  In any event when I switch to the git version of the driver from the last release, the modeline is seemingly being ignored though XOrg.0.log seems to show it as being picked up.  In any event it's not showing up in the xrandr list of available resolutions, though I am able to add the resolution as an option later using the xrandr tools.

This worked fine in the previous development release for the driver.  There are no logged errors in the /var/log/XOrg.0.log file so I have nothing helpful to offer when it comes to tracking down the issue.  The log file indicates that the output eDP1 is using the section Monitor0 in my XOrg.0.log file, which is correct.

Anyway I've got a client meeting to go to so I've got to run.  I'll upload the XOrg.0.log file in a bit.
Comment 1 Jay Little 2014-05-21 18:47:54 UTC
Created attachment 99527 [details]
XOrg Log using current git intel driver
Comment 2 Jay Little 2014-05-21 18:48:24 UTC
Created attachment 99528 [details]
XOrg Log using previous dev release intel driver
Comment 3 Jay Little 2014-05-21 18:48:55 UTC
Created attachment 99529 [details]
XOrg Conf (with Monitor config)
Comment 4 Jay Little 2014-05-21 18:52:09 UTC
Okay - so first thing's first.  My initial feedback was wrong.  Apparently Arch has switched to dumping all XOrg log output into systemd so I was looking at an old log file.  Using journalctl I have pulled the log entries that are generated for the XOrg intel driver using both the previous dev release driver and the current git version.  In the previous dev release I get this item logged:

Output eDP1 using monitor section Monitor0

Whereas with the git version I get this instead:

Output eDP1 has no monitor section

That would appear to be the root cause.  Any idea why my Monitor section is being ignored in the current version of the driver?  Do I need to add something to my xorg.conf to force it to work?  Or is this no longer supported?
Comment 5 Chris Wilson 2014-05-21 18:56:09 UTC
No, it should still be supported. I guess I broke something preparing things for MST support.

I would say the erroneous commit is 

commit add84cd8a8dc6d285912d0ea3a3a3e7faa9e0942
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri May 2 13:21:02 2014 +0100

    sna: Perform dynamic connector discovery
    
    One of the side-effects of MST is that we need to support dynamic
    attachment and removal of displays as the branch hierachy changes.

that would be useful to confirm.
Comment 6 Jay Little 2014-05-21 19:00:17 UTC
Okay so I'm reviewed the xorg docs and determined that adding the following line to my device section might work around the issue:

Option      "Monitor-eDP1"              "Monitor0"

Sure enough, that did the trick.  So while my immediate issue has been resolved I guess the question is:  Is this actually a bug that needs to be fixed?
Comment 7 Chris Wilson 2014-05-21 19:00:26 UTC
Ah,

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index f1cb08d..1132330 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -3023,8 +3023,8 @@ sna_output_add(struct sna *sna, int id, int serial)
        output->name = (char *)(output + 1);
        memcpy(output->name, name, len + 1);
 
-       output->use_screen_monitor = config->num_output;
-       xf86OutputUseScreenMonitor(output, !config->num_output);
+       output->use_screen_monitor = config->num_output != 1;
+       xf86OutputUseScreenMonitor(output, !output->use_screen_monitor);
 
 reset:
        sna_output->id = compat_conn.conn.connector_id;
Comment 8 Jay Little 2014-05-21 19:01:45 UTC
Nevermind, I see that you've already commented on it.  Well thanks for the feedback.  If you need anything else from me, please do not hesitate to ask!  Again thank you for all of your great work!
Comment 9 Chris Wilson 2014-05-21 19:06:12 UTC
Sure, if you could care to test the diff pasted, that would be useful. :)
Comment 10 Jay Little 2014-05-21 19:26:20 UTC
I had to redo the patch as it's failed to apply.  I presume the position is different as you are probably working on something else in the same file.  Long story short: It appeared to do the trick.
Comment 11 Chris Wilson 2014-05-21 20:08:54 UTC
commit 00d9396f6bf0bbbdfca7cdb1cbdbde8f0b2ad59c
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed May 21 20:00:56 2014 +0100

    sna: Fix attachment of the default monitor to the first output
    
    Broke during code motion in
    
    commit add84cd8a8dc6d285912d0ea3a3a3e7faa9e0942
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Fri May 2 13:21:02 2014 +0100
    
        sna: Perform dynamic connector discovery
    
    Reported-and-tested-by: Jay Little <jaylittle@jaylittle.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79015
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.