Bug 22002

Summary: [i945G] Monitors on VGA output not detected (no screens)
Product: xorg Reporter: Geir Ove Myhr <gomyhr>
Component: Driver/intelAssignee: ykzhao <yakui.zhao>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: major    
Priority: medium CC: eallaud, jordi.puigsegur, michael.fu
Version: gitKeywords: NEEDINFO
Hardware: x86 (IA32)   
OS: Linux (All)   
URL: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/379157
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
xorg.conf
none
Xorg.0.log with ModeDebug using the 2.7.1 driver
none
Xorg.0.log from driver version 2.2.1
none
please try the patch on your machine. thanks
none
xorg.0.log with ModeDebug using 2.7.1 driver with patch provided
none
test with 2.4.1 with the path (fails)
none
test with 2.4.1 without the patch (works!!)
none
please try the debug patch on your machine against lastest 2D driver, thanks.
none
please try the debug patch
none
disable VGA plane before doing CRT hotplug
none
Xorg.0.log with the patch in comment #31
none
disable VGA plane before doing CRT hotplug detect
none
xorg.1.log file after testing last patch none

Description Geir Ove Myhr 2009-05-30 06:22:31 UTC
Created attachment 26303 [details]
xorg.conf

I'm forwarding a bug from an ubuntu user:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/379157

Bug description:

On a Asus Mini Barebone (Pundit P3-PH4C SK775 DDR2) with 945G chipset, the monitor connected on the VGA port is not detected and the X server therefore exits with "Fatal server error: no screens found". Normally a Samsung TV (LE27S7) is connected via a VGA cable, but also when an Eizo CRT was connected, it is not detected. Both get-edid and ddcprobe is able to read the EDID of the monitor. When using the vesa driver it works normally.

It used to work in ubuntu 8.04 (which has intel driver 2.2.1), but stopped working in 8.10 (with driver version 2.4.1). It has been tested and found not to work in 2.7.1. While the default AccelMethod for ubuntu packages (including 2.7.1) is EXA, it has also been tested with UXA without working.

System environment:
-- chipset: 945G
-- system architecture: 32-bit
-- xf86-video-intel: 2.7.1
-- xserver: 1.6.0-0ubuntu14
-- mesa: 7.4-0ubuntu3
-- libdrm: 2.4.5-0ubuntu4
-- kernel: 2.6.28-11-generic
-- Linux distribution: Ubuntu 9.04 (Jaunty)
-- Machine or mobo model: ASUS PUNDIT P3-PH4C SK775 DDR2
-- Display connector: VGA

[lspci]
00:00.0 Host bridge [0600]: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub [8086:2770] (rev 02)
 Subsystem: ASUSTeK Computer Inc. Device [1043:817a]
00:02.0 VGA compatible controller [0300]: Intel Corporation 82945G/GZ Integrated Graphics Controller [8086:2772] (rev 02)
 Subsystem: ASUSTeK Computer Inc. Device [1043:817a]

Reproducing steps:
start computer
Comment 1 Geir Ove Myhr 2009-05-30 06:23:42 UTC
Created attachment 26304 [details]
Xorg.0.log with ModeDebug using the 2.7.1 driver
Comment 2 Geir Ove Myhr 2009-05-30 06:24:22 UTC
Created attachment 26305 [details]
Xorg.0.log from driver version 2.2.1
Comment 3 Jordi Puigsegur 2009-05-31 11:00:33 UTC
I'm the original user who submitted the bug in launchpad. I'll be glad to test anything you might need to test. I plan to re-format the machine, but still will wait several weeks. 
Comment 4 MaLing 2009-06-01 19:22:20 UTC
Created attachment 26346 [details] [review]
please try the patch on your machine. thanks
Comment 5 Michael Fu 2009-06-01 21:59:44 UTC
It's surprising to know that 2.2.1 works for you but 2.4.1 doesn't . git diff shows that there is really no difference on the crt detection code between these two releases. hmm..
Comment 6 Michael Fu 2009-06-01 22:23:07 UTC
I speak too fast..seems that Ubuntu has cherry picked more patches against upstream..

https://launchpad.net/ubuntu/+source/xserver-xorg-video-intel

Maybe 7b6f4d22211d71480caf6335a3eacaacff369371 cause this?
Comment 7 Jordi Puigsegur 2009-06-02 00:17:23 UTC
How do I have to proceed to try the patch?

Thanks,
Jordi.
Comment 8 Geir Ove Myhr 2009-06-02 02:36:08 UTC
Jordi, we will figure out the details about how to add the patch in the dowstream report (to keep noise down here). 

Ling, can we try the patch against 2.7.1, or do we have to get git-master to test?
Comment 9 MaLing 2009-06-02 06:06:24 UTC
(In reply to comment #8)
> Jordi, we will figure out the details about how to add the patch in the
> dowstream report (to keep noise down here). 
> Ling, can we try the patch against 2.7.1, or do we have to get git-master to
> test?

yes, you can try the patch against 2.7.1. 

I also can not find any differnece between 2.2.1 and 2.4.1.
Because we have no hardware, would you please like to do git bisec to find which patch caused the regression between two versions

Michael mentioned 7b6f4d22211d71480caf6335a3eacaacff369371 ?

Thanks for your help.
Ma Ling

Comment 10 Michael Fu 2009-06-02 07:56:21 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Jordi, we will figure out the details about how to add the patch in the
> > dowstream report (to keep noise down here). 
> > Ling, can we try the patch against 2.7.1, or do we have to get git-master to
> > test?
> 
> yes, you can try the patch against 2.7.1. 
> 
> I also can not find any differnece between 2.2.1 and 2.4.1.
> Because we have no hardware, would you please like to do git bisec to find
> which patch caused the regression between two versions
> 
> Michael mentioned 7b6f4d22211d71480caf6335a3eacaacff369371 ?
> 
> Thanks for your help.
> Ma Ling
> 

yes, Ubuntu didn't just take our original 2.4.1 release, but cheery picked more in post-2.4.1 master, such as the commit 7b6f.. I think. check out the link I posted in comment# 6... 

Comment 11 Michael Fu 2009-06-02 07:59:13 UTC
(In reply to comment #7)
> How do I have to proceed to try the patch?
> 
> Thanks,
> Jordi.
> 

Jordi, could you try to check out 2.4.1 from freedesktop upstream repository and see if it works for your system? this may help us narrow the issue down because from upstream change log, 2.2.1 and 2.4.1 really makes no different on CRT detection. if upstream 2.4.1 works for you, then it should be the patch cherry picked by Ubuntu from our post-2.4 release.
Comment 12 Jordi Puigsegur 2009-06-03 13:39:50 UTC
Created attachment 26407 [details]
xorg.0.log with ModeDebug using 2.7.1 driver with patch provided
Comment 13 Jordi Puigsegur 2009-06-03 13:42:25 UTC
Just tried the patch provided (comment #4) and it doesn't work. I attached the Xorg.0.log file with debug option activated. Now we are working on checking 2.4.1 from freedesktop upstream repository.

Thanks, Jordi.

Comment 14 Geir Ove Myhr 2009-06-04 19:52:01 UTC
The 2.4.1 driver from git (well, really from http://xorg.freedesktop.org/archive/individual/driver/xf86-video-intel-2.4.1.tar.gz) but I guess that would be the same) didn't compile properly on Ubuntu 9.04 (Jaunty). Instead I took the ubuntu package from https://launchpad.net/~siretart/+archive/ppa which is the same as the Intrepid (8.10) package but with a couple of extra patches to make it compile on Jaunty. I then disabled the patch 22_no_pipe_for_hotplug_detection.patch which is exactly the 7b6f... commit mentioned above. I hope that provides an equally good test case as your unpatched 2.4.1 would. If the deb-package with the patch disabled works for Jordi, it should be clear that 7b6f... is the problem.
Comment 15 Jordi Puigsegur 2009-06-07 14:38:22 UTC
Created attachment 26518 [details]
test with 2.4.1 with the path (fails)
Comment 16 Jordi Puigsegur 2009-06-07 14:40:19 UTC
Created attachment 26519 [details]
test with 2.4.1 without the patch (works!!)

We've done the suggested tests and 2.4.1 without the patch works properly. I've attached both xorg.0.log with mode debug activated.
Comment 17 Geir Ove Myhr 2009-06-07 15:58:31 UTC
The patch in question (22_no_pipe_for_hotplug_detection.patch) was added to ubuntu for fixing this bug: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/256142 . But from the comments, it seems it did not actually fix it (but it stopped Timo's mouse pointer from jumping during monitor probing).
Comment 18 Michael Fu 2009-06-07 17:32:51 UTC
(In reply to comment #17)
> The patch in question (22_no_pipe_for_hotplug_detection.patch) was added to
> ubuntu for fixing this bug:
> https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/256142
> . But from the comments, it seems it did not actually fix it (but it stopped
> Timo's mouse pointer from jumping during monitor probing).
> 

you're right, the patch will help to reduce flicking. Until this bug, we didn't run into any issue about doing so..
Comment 19 MaLing 2009-06-10 07:00:12 UTC
Created attachment 26636 [details] [review]
please try the debug patch on your machine against lastest 2D driver, thanks.
Comment 20 MaLing 2009-06-22 06:32:51 UTC
(In reply to comment #19)
> Created an attachment (id=26636) [details]
> please try the debug patch on your machine against lastest 2D driver, thanks.

ping ~
Comment 21 Geir Ove Myhr 2009-06-22 22:51:23 UTC
Jordi reports downstream that when using the deb-package that I built with the patch, X does not even start and is not producing an Xorg.0.log. I didn't get more details or verification that the deb-package that I built without the patch worked normally (I like to build packages in pairs with and without patches so that I know that different behavior is not due to my build environment). Is there any specific information you want from the non-starting X-session?

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/379157/comments/34
Comment 22 Jordi Puigsegur 2009-06-23 00:47:54 UTC
When I reported this problem Geir, he asked me to do more tests, but I haven't had time to do it. I'll try to find some time and do it ASAP.

Thanks, Jordi.
Comment 23 MaLing 2009-06-28 20:19:07 UTC
(In reply to comment #22)
> When I reported this problem Geir, he asked me to do more tests, but I haven't
> had time to do it. I'll try to find some time and do it ASAP.
> Thanks, Jordi.

ping ~
Comment 24 Geir Ove Myhr 2009-06-29 17:24:48 UTC
The problems Jordi reported earlier with the patched version went away after a reboot (just installing the driver and restarting X was problematic). The patch in comment #19 didn't make any difference. The logs created with and without the patch are as equal as they can be (only the timestamp and a memory address in the backtrace differ).

Xorg.0.log with git-master without patch:
http://launchpadlibrarian.net/28523825/Xorg.0.log.ubuntu0sarvatt

Xorg.0.log with git-master with patch:
http://launchpadlibrarian.net/28523877/Xorg.0.log.ubuntu2gomyhr
Comment 25 MaLing 2009-07-27 01:52:11 UTC
Created attachment 28033 [details]
please try the debug patch

In this patch against latest 2D driver I move load detect sequence to match environment of your successful detection, meanwhile dump register before and after load detect function. Please try it then upload your xorg file.


Thanks
Ma Ling
Comment 26 MaLing 2009-07-28 18:40:55 UTC
ping ~
Comment 27 Michael Fu 2009-08-04 19:49:32 UTC
ping~
Comment 28 Michael Fu 2009-08-17 00:21:49 UTC
Geir Ove Myhr , would you please help to ping Jordi to provide log after patch in comment# 25? thanks.
Comment 29 Jordi Puigsegur 2009-08-25 01:56:44 UTC
Hi,

First of all my apologies for the delay. I am quite busy during summer and haven't had time to check on that.

I tested the driver with the patch and it works. You can find the xorg.1.log file (it is 1 because somehow session number 0 got stuck and the new driver opened the session in number 1) at http://launchpadlibrarian.net/30765627/Xorg.1.log 

And as I said, the patch works: It detects the screen correctly and gets the right resolution.

Jordi.


Comment 30 Michael Fu 2009-08-25 07:11:56 UTC
we've known that i830GetLoadDetectPipe is the key to this bug - without invoke it, hotplug detection fails. comparing the regdump before and after the call shows that disabling VGA (VGACNTRL register) might be the root-cause.
Comment 31 ykzhao 2009-08-30 20:26:18 UTC
Created attachment 29031 [details] [review]
disable VGA plane before doing CRT hotplug

Will you please try the debug patch on the latest graphics driver and see whether the issue still exists?
Please try it on UMS mode.
Thanks.
Comment 32 Michael Fu 2009-09-09 04:09:57 UTC
ping~ Jordi
Comment 33 Geir Ove Myhr 2009-09-09 04:16:20 UTC
(In reply to comment #32)
> ping~ Jordi

Jordi reported downstream that he is on holiday 10 days from Sept. 2.

Comment 34 Geir Ove Myhr 2009-09-13 23:12:09 UTC
Created attachment 29504 [details]
Xorg.0.log with the patch in comment #31

Here is the Xorg.0.log from Jordi downstream. He doesn't say whether it fixes the issue or not, but maybe it is obvious from the log or he can comment here.
Comment 35 Michael Fu 2009-09-14 00:43:08 UTC
(In reply to comment #34)
> Created an attachment (id=29504) [details]
> Xorg.0.log with the patch in comment #31
> 
> Here is the Xorg.0.log from Jordi downstream. He doesn't say whether it fixes
> the issue or not, but maybe it is obvious from the log or he can comment here.
> 

looks it's fixed...
Comment 36 Jordi Puigsegur 2009-09-14 02:07:52 UTC
(In reply to comment #35)
> (In reply to comment #34)
> > Created an attachment (id=29504) [details] [details]
> > Xorg.0.log with the patch in comment #31
> > 
> > Here is the Xorg.0.log from Jordi downstream. He doesn't say whether it fixes
> > the issue or not, but maybe it is obvious from the log or he can comment here.
> > 
> 
> looks it's fixed...
> 

No, it's not. I was in a rush and forgot to write it down. The screen went black (on power save).
Comment 37 ykzhao 2009-09-17 22:30:05 UTC
Created attachment 29654 [details] [review]
disable VGA plane before doing CRT hotplug detect

Will you please try the updated debug patch and see whether the issue still exists?
Thanks.
Comment 38 Michael Fu 2009-09-26 20:11:11 UTC
Ping ~ Jordi 
Comment 39 Jordi Puigsegur 2009-09-27 05:18:40 UTC
Created attachment 29883 [details]
xorg.1.log file after testing last patch

I tried the patch and didn't work. I get the "Ubuntu is running in low graphics mode" message. I attach the xorg log file.
Comment 40 manu-972 2009-11-10 17:28:47 UTC
I would like to add my own experience here:I have a g33 based MB with the same problem on Karmic: actually it does not even boot correctly with KMS as it cannot find a screen as it thinks VGA is disconnected. All details (with a patch that forces ddc probing instead of hotplug detection) are here:https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/467841

Let me know if I can post some more logs to help.
Comment 41 Michael Fu 2009-11-10 19:36:22 UTC
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index 212e227..e505144 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -262,8 +262,8 @@ static bool intel_crt_detect_hotplug(struct drm_connector *connector)
 		} while (time_after(timeout, jiffies));
 	}
 
-	if ((I915_READ(PORT_HOTPLUG_STAT) & CRT_HOTPLUG_MONITOR_MASK) ==
-	    CRT_HOTPLUG_MONITOR_COLOR)
+	if ((I915_READ(PORT_HOTPLUG_STAT) & CRT_HOTPLUG_MONITOR_MASK) !=
+	    CRT_HOTPLUG_MONITOR_NONE)
 		return true;
 
 	return false;


I post zhenyu's patch here that works for manu. Jordi, would you please have a try?

Note this is a patch against KMS driver, i.e. kernel.
Comment 42 Jordi Puigsegur 2009-11-16 11:12:12 UTC
I've been told that it is not possible to test a kernel patch using a live CD. The computer is now being used with a Ubuntu Hardy and I cannot format it. If there is no other way to test it I am afraid it won't be possible.
Comment 43 Jesse Barnes 2010-07-15 10:36:22 UTC
If we can't get testing, I guess we can't fix this one.  Hopefully it got fixed anyway.
Comment 44 Jordi Puigsegur 2010-07-16 02:04:13 UTC
I just tested a new Ubuntu 10.04 live CD and seems to work perfectly. So after all it seems it got solved. 

Thanks,
Jordi.

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.