Bug 22248 - [945GM Macbook] MiniDVI gets non-preferred mode if (non-existed) VGA configured as Ignore
Summary: [945GM Macbook] MiniDVI gets non-preferred mode if (non-existed) VGA configur...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: 7.4 (2008.09)
Hardware: Other All
: medium minor
Assignee: ykzhao
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-06-12 00:44 UTC by Jacob Hart
Modified: 2009-09-09 22:51 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
xorg.conf (1.27 KB, text/plain)
2009-06-12 00:44 UTC, Jacob Hart
no flags Details
Logfile with VGA output enabled (23.67 KB, text/x-log)
2009-06-12 00:46 UTC, Jacob Hart
no flags Details
Logfile with VGA output disabled with Option "Ignore" (23.78 KB, text/plain)
2009-06-12 00:46 UTC, Jacob Hart
no flags Details
Logfile with VGA, TV ignored, ModeDebug enabled (70.08 KB, text/plain)
2009-06-14 19:12 UTC, Jacob Hart
no flags Details
Logfile, git sources, ModeDebug enabled (112.26 KB, text/plain)
2009-06-16 06:12 UTC, Jacob Hart
no flags Details
please try the debug patch on your machine against latest driver, thanks (1.96 KB, application/octet-stream)
2009-06-16 20:28 UTC, MaLing
no flags Details
Logfile with debug patch applied (working) (108.53 KB, text/plain)
2009-06-17 18:28 UTC, Jacob Hart
no flags Details
Logfile, debug patch applied, VGA & TV enabled (128.07 KB, text/plain)
2009-06-18 01:35 UTC, Jacob Hart
no flags Details
pleaset try the patch on your machine in KMS mode, thanks. (2.62 KB, patch)
2009-07-14 20:41 UTC, MaLing
no flags Details | Splinter Review
Logfile, KMS mode, patch applied. (38.10 KB, text/plain)
2009-08-16 22:01 UTC, Jacob Hart
no flags Details
dmesg, KMS mode (89.24 KB, text/plain)
2009-08-17 03:41 UTC, Jacob Hart
no flags Details

Description Jacob Hart 2009-06-12 00:44:55 UTC
Created attachment 26700 [details]
xorg.conf

Hi,

I've noticed some odd behavior while trying to configure a Macbook to operate using only the external MiniDVI output.  My goal is to disable the Macbook's built-in LCD and operate the laptop with the lid closed, using an external LCD, mouse and keyboard.

The Macbook doesn't have an external VGA connector or a TV connector, so I decided to disable these outputs in xorg.conf.  Disabling the TV output works as expected.  Disabling the VGA output causes incorrect detection of the external monitor.  On starting X the external monitor (Benq G2400WD) is set to 1360x768 instead of 1920x1200 as specified in xorg.conf.

It appears with VGA output enabled the EDID info is picked up from the external monitor correctly:

(II) intel(0): EDID vendor "APP", prod id 40031
(II) intel(0): I2C device "SDVOB DDC Bus:E-EDID segment register" registered at address 0x60.
(II) intel(0): I2C device "SDVOB DDC Bus:ddc2" registered at address 0xA0.
(II) intel(0): I2C device "CRTDDC_A:E-EDID segment register" registered at address 0x60.
(II) intel(0): I2C device "CRTDDC_A:ddc2" registered at address 0xA0.
(II) intel(0): EDID vendor "BNQ", prod id 30730
(II) intel(0): Output VGA disconnected
(II) intel(0): Output LVDS connected
(II) intel(0): Output TMDS-1 connected
(II) intel(0): Using user preference for initial modes
(II) intel(0): Output LVDS using initial mode 1280x800
(II) intel(0): Output TMDS-1 using initial mode 1920x1200


With VGA output disabled the EDID info is picked up from the built-in LCD (vendor "APP") twice, causing incorrect setup of the external monitor:

(II) intel(0): EDID vendor "APP", prod id 40031
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   71.00  1280 1328 1360 1440  800 803 809 823 -hsync -vsync (49.3 kHz)
(II) intel(0): EDID vendor "APP", prod id 40031
(II) intel(0): I2C device "SDVOB DDC Bus:E-EDID segment register" registered at address 0x60.
(II) intel(0): I2C device "SDVOB DDC Bus:ddc2" registered at address 0xA0.
(II) intel(0): Output LVDS connected
(II) intel(0): Output TMDS-1 connected
(II) intel(0): Using sloppy heuristic for initial modes
(II) intel(0): Output LVDS using initial mode 1280x800
(II) intel(0): Output TMDS-1 using initial mode 1360x768


The two logs were obtained with a one-line change in xorg.conf (with and without the "Ignore" line below).

Section "Monitor"
	Identifier	"VGA"
	#Option		"Ignore"		"true"
EndSection


Please let me know if there's any further information I can provide.
Comment 1 Jacob Hart 2009-06-12 00:46:02 UTC
Created attachment 26701 [details]
Logfile with VGA output enabled
Comment 2 Jacob Hart 2009-06-12 00:46:55 UTC
Created attachment 26703 [details]
Logfile with VGA output disabled with Option "Ignore"
Comment 3 MaLing 2009-06-13 07:52:52 UTC
Section "Monitor"
	Identifier	"TMDS-1"
	Option		"DPMS"
	Option		"PreferredMode"		"1920x1200"
EndSection
Section "Device"
       ...
       option "ModeDebug" "true"
       ...
EndSection

Please modify your xorg.conf as above, meanwhile ignore VGA and TV in xorg.conf,
then upload your xorg.log.

Thanks
Ma Ling

Comment 4 Jacob Hart 2009-06-14 19:12:35 UTC
Created attachment 26789 [details]
Logfile with VGA, TV ignored, ModeDebug enabled

Requested logfile attached.
Comment 5 MaLing 2009-06-15 05:58:41 UTC
(In reply to comment #4)
> Created an attachment (id=26789) [details]
> Logfile with VGA, TV ignored, ModeDebug enabled
> Requested logfile attached.

From log fine, we can see EDID not is feteched,  version 2.4.1 is too old for us, so could please update your driver from master tree.

Thanks
Ma Ling
Comment 6 Jacob Hart 2009-06-16 06:11:16 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Created an attachment (id=26789) [details] [details]
> > Logfile with VGA, TV ignored, ModeDebug enabled
> > Requested logfile attached.
> 
> From log fine, we can see EDID not is feteched,  version 2.4.1 is too old for
> us, so could please update your driver from master tree.
> 

I tried today with everything built from git sources.  Same problem as described with the 2.4.1 driver, I'll attach the log as well.
Comment 7 Jacob Hart 2009-06-16 06:12:38 UTC
Created attachment 26847 [details]
Logfile, git sources, ModeDebug enabled
Comment 8 MaLing 2009-06-16 20:28:26 UTC
Created attachment 26873 [details]
please try the debug patch on your machine against latest driver, thanks

The patch should resolve the issue: Before we hack Mac only when VGA output was constructed and disconnected,when ignoring VGA, original code is not effective.

Thanks
Ma Ling
Comment 9 Jacob Hart 2009-06-17 18:28:32 UTC
Created attachment 26900 [details]
Logfile with debug patch applied (working)
Comment 10 Jacob Hart 2009-06-17 18:29:41 UTC
(In reply to comment #8)
> Created an attachment (id=26873) [details]
> please try the debug patch on your machine against latest driver, thanks
> 
> The patch should resolve the issue: Before we hack Mac only when VGA output was
> constructed and disconnected,when ignoring VGA, original code is not effective.
> 
> Thanks
> Ma Ling
> 

I'm pleased to report the patch worked :)  xrandr shows that outputs TV and VGA are both disabled and all the modes are now correctly detected from the external monitor on TMDS-1.

Comment 11 Michael Fu 2009-06-17 20:26:00 UTC
Jacob, with the latest driver you've tested, would you please help us to verify if you do _not_ ignore VGA, could it be detected correctly as "disconnected" as well? thanks.
Comment 12 Jacob Hart 2009-06-17 23:09:06 UTC
(In reply to comment #11)
> Jacob, with the latest driver you've tested, would you please help us to verify
> if you do _not_ ignore VGA, could it be detected correctly as "disconnected" as
> well? thanks.
> 

I can confirm this works as expected.  With the ignore lines in xorg.conf removed for VGA and TV, xrandr -q reports:

Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 2048 x 2048
VGA disconnected (normal left inverted right x axis y axis)          
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 286mm x 179mm                                                                            
   1280x800       59.9*+                                                        
   1024x768       85.0     75.0     70.1     60.0
   832x624        74.6
   800x600        85.1     72.2     75.0     60.3     56.2
   640x480        85.0     72.8     75.0     59.9
   720x400        85.0
   640x400        85.1
   640x350        85.1
TMDS-1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 519mmx 324mm
   1920x1200      60.0*+
   1600x1200      60.0
   1680x1050      59.9
   1280x1024      75.0     60.0
   1440x900       59.9
   1280x800       59.9
   1152x864       75.0
   1152x720       60.0
   1024x768       75.0     60.0
   832x624        74.6
   800x600        75.0     60.3
   640x480        75.0     59.9
   720x400        70.1
TV disconnected (normal left inverted right x axis y axis)

Comment 13 Michael Fu 2009-06-17 23:23:54 UTC
thanks. would you please attach the log?
Comment 14 Jacob Hart 2009-06-18 01:35:58 UTC
Created attachment 26910 [details]
Logfile, debug patch applied, VGA & TV enabled

Logfile attached as requested.
Comment 15 MaLing 2009-07-14 20:41:41 UTC
Created attachment 27705 [details] [review]
pleaset try the patch on your machine in KMS mode, thanks.

Jacob Hart, the patch is for KMS mode, because we have no Mac device, could you pleaes try it on your machine, then upload dmesg and xorg.log with modedebug option on.

Thanks for your help
Ma Ling
Comment 16 ykzhao 2009-08-12 18:51:46 UTC
(In reply to comment #14)
> Created an attachment (id=26910) [details]
> Logfile, debug patch applied, VGA & TV enabled
> 
> Logfile attached as requested.
>
Any test result about the patch?
ping?
thanks.

Comment 17 Jacob Hart 2009-08-16 22:01:57 UTC
Created attachment 28689 [details]
Logfile, KMS mode, patch applied.

I had some time to try a new kernel + patch over the weekend.  The attached logfile was collected with ModeDebug enabled.  All other options are from the original xorg.conf, except the names of each output were changed to map to the new KMS names (TMDS-1 --> DVI1, etc.)

The performance is excellent compared to non KMS mode; so good, in fact, that I can leave desktop effects on for the first time since the switch to UXA.

I can no longer use the console, however, since switching to KMS.  The console goes blank at boot-up and returns only after X is started for the gdm login.  Likewise, switching VTs doesn't work and I get a corrupted display until I switch back to X.
Comment 18 Jacob Hart 2009-08-17 03:41:53 UTC
Created attachment 28701 [details]
dmesg, KMS mode
Comment 19 ykzhao 2009-09-09 22:51:17 UTC
(In reply to comment #18)
> Created an attachment (id=28701) [details]
> dmesg, KMS mode
Thanks for the test.
From the test it seems that it can get about 18 modes for mini-DVI after applying the patch in comment #15.

As the following commit is already shipped in Eric's drm-intel-next tree, this bug will be marked as the resolved.

commit 57cdaf90f5f607eb029356074fefb66c9b1c0659
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Sep 4 13:07:54 2009 +0800

    drm/I915: Use the CRT DDC to get the EDID for DVI-connector on Mac.

Thanks.
> 




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.