Bug 21210

Summary: [G43 KMS] VGA wrongly detected as connected (actually disconnected)
Product: xorg Reporter: Mila Kuchta <mila.kuchta>
Component: Driver/intelAssignee: MaLing <ling.ma>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: jian.j.zhao, michael.fu, sa
Version: gitKeywords: NEEDINFO
Hardware: x86 (IA32)   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
xorg log file
none
Xorg.log produced on kernel 2.6.29.1 using intel driver version 2.7.0
none
please try the debug patch in kms, thanks. none

Description Mila Kuchta 2009-04-15 13:32:08 UTC
X starts in non-native resolution using latest Fedora-11 with Kernel Mode Setting enabled. X starts in 1024x768 even though kernel set the native resolution (1680x1050) right. From the log it looks like driver is asking EDID for VGA1 connector which is not really connected. Also it looks like the driver is asking EDID multiple times in a row. Is it right the driver asks for EDID if it's supposed to be modesetting-less driver (because of KMS)?
Comment 1 Mila Kuchta 2009-04-15 13:32:56 UTC
Created attachment 24828 [details]
xorg log file
Comment 2 Gordon Jin 2009-04-15 20:44:32 UTC
It sounds like VGA is wrongly detected.

Is there actually a VGA (D-sub) port on your board, and you just not connecting it? Or there's no VGA port but just a DVI-I port?
Comment 3 Mila Kuchta 2009-04-16 01:49:35 UTC
There is a D-Sub port on the board (DG43NB) but not actually connected to any monitor. Just the DVI is connected to LG L226WTQ monitor.
Comment 4 Gordon Jin 2009-04-16 02:15:58 UTC
(In reply to comment #3)
> There is a D-Sub port on the board (DG43NB) but not actually connected to any
> monitor. 

We have the same model. Jian, can you reproduce it with upstream driver? 

Comment 5 Michael Fu 2009-04-17 06:13:26 UTC
what if you revert commit 5ca58282089b11f64b911618036ee7676f12735b? thanks.
Comment 6 Mila Kuchta 2009-04-17 06:42:39 UTC
That may be the thing cause it has worked for a moment until new update arrived (very early) to Fedora-Beta that broke it again.
Comment 7 zhao jian 2009-04-22 05:08:45 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > There is a D-Sub port on the board (DG43NB) but not actually connected to any
> > monitor. 
> We have the same model. Jian, can you reproduce it with upstream driver? 

I have tried with kernel 2.6.29.1-KMS and the newest code on our DG43NB using DVI connecting the screen and the X start in 1920x1200 mode. As following shows: 
[root@x-g43 opt]# xrandr -q
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
DVI1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200      60.0*+
   1280x1024      75.0
   1024x768       75.1     60.0
   800x600        75.0     60.3
   640x480        75.0     60.0
   720x400        70.1
Libdrm:         (master)  a1e3ab9e55047c08a4006ec389c1a99b72bc672c
Mesa:           (mesa_7_4_branch)  e8807a14a61a0b9389aa2f2a113da24ab22a364d
Xserver:        (server-1.6-branch)  11db545a86c8933c638a0bc1fcd4f2c65279f617
Xf86_video_intel:     (2.7)  296a986e5258e2fd13ec494071b7063bd639cd68
Comment 8 Michael Fu 2009-04-22 06:27:22 UTC
Hmm..sounds like a WORKFORME bug..Mila Kuchta, are you able to verify this on 2.6.29.1?
Comment 9 Mila Kuchta 2009-04-22 12:18:20 UTC
The bug *is* reported on 2.6.29.1. It is still valid even on newer Fedora build and stable driver version 2.7.0.
Comment 10 Mila Kuchta 2009-04-22 12:19:42 UTC
Created attachment 25039 [details]
Xorg.log produced on kernel 2.6.29.1 using intel driver version 2.7.0
Comment 11 zhao jian 2009-04-23 19:01:58 UTC
I tested with the "F11 Beta 2009/04/29", it has the same issue on our platform. No matter which output I use(VGA or DVI), it will detect two connections with xrandr, so its actual resolution will set to the smaller one. But in dmesg I can see kernel set the native resolution right. 

Comment 12 Andrew McNabb 2009-04-24 07:58:14 UTC
This bug is a duplicate of 21120, isn't it?
Comment 13 Michael Fu 2009-04-30 18:35:05 UTC
(In reply to comment #5)
> what if you revert commit 5ca58282089b11f64b911618036ee7676f12735b? thanks.
> 

still, mila, are you able to revert the patch and see if it's the cause?
Comment 14 MaLing 2009-05-05 23:52:06 UTC
(In reply to comment #13)
> (In reply to comment #5)
> > what if you revert commit 5ca58282089b11f64b911618036ee7676f12735b? thanks.
> > 
> still, mila, are you able to revert the patch and see if it's the cause?

ping ~

thanks
Ma Ling
Comment 15 Mila Kuchta 2009-05-06 04:09:35 UTC
I'm really sorry being so late. I'm in process of changing apartment and currently w/o internet connectivity. I'll be able to revert the patch in a week or so. Hope it won't be so late.

Regards

Mila
Comment 16 Sven Arvidsson 2009-05-08 11:16:24 UTC
I'm having the same problem on my G45. Asus P5Q-EM with three outputs, DVI, VGA and HDMI. Only DVI is used at the moment.

Reverting 5ca58282089b11f64b911618036ee7676f12735b does indeed fix this problem.
Comment 17 MaLing 2009-05-11 23:45:13 UTC
Created attachment 25785 [details]
please try the debug patch in kms, thanks.

I have tested the patch on my g45 machine successfully.
The bug is because hdmi and vga both can not detect correctly.
For VGA hotplug detection we should use CRT_HOTPLUG_ACTIVATION_PERIOD_64 for all 4 series. For HDMI we should specify current HDMI port during detection process, instead of all ports-HDMIB/C/D.

Thanks
Ma Ling
Comment 18 Sven Arvidsson 2009-05-12 14:15:01 UTC
Hi,

I tried the patch on my G45, and it seems to work fine!
Comment 19 MaLing 2009-05-17 18:10:16 UTC
The root cause is from wrong VGA and HDMI hotplug detection.
They have be fixed by
commit e92597cffffabe9a9a85db462045330970c498d0
Author: Ma Ling <ling.ma@intel.com>
Date:   Wed May 13 14:46:12 2009 +0800

    drm/i915: Use the GM45 VGA hotplug workaround on G45 as well.
and
commit 9d2949a4cdb77b9b5c243c79be6489d34d770c7c
Author: Ma Ling <ling.ma@intel.com>
Date:   Mon May 11 11:33:22 2009 +0800

    drm/i915: Set HDMI hot plug interrupt enable for only the output in
question.
respectively


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.