Bug 28858

Summary: [Arrandale] external monitor flicker
Product: xorg Reporter: thiagoc <root>
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED DUPLICATE QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: highest CC: maxime81, paul
Version: 7.5 (2009.10)   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg log
none
Dmesg with drm debug enabled (kernel 2.6.34-45)
none
Xorg.log (Fedora 13 and kernel 2.6.34-45)
none
Set transcoder sync polarity for DP based on actual mode
none
Dmesg with drm.debug=0xe (kernel 2.6.36-rc1 branch overlay) none

Description thiagoc 2010-06-30 12:16:59 UTC
I have purchased a Dell Vostro 3300 with Intel 4500MHD graphic card.

Here is my lspci:

00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 12)

The problem is that when I put a external monitor in the VGA input, the screen on monitor flickers and is blurred.

I'm using Archlinux with everything updated. I'm tried the latest intel driver (2.12.0), but the problem is still here.

If you need some more information, please tell me.

Thanks.
Comment 1 Chris Wilson 2010-06-30 14:49:38 UTC
The starting point would be your Xorg.log and the output of xrandr --verbose. (The xrandr *should* just be a summary of what is contained in the log file...)
Comment 2 thiagoc 2010-06-30 18:15:38 UTC
Created attachment 36649 [details]
Xorg log
Comment 3 thiagoc 2010-06-30 18:18:49 UTC
$ xrandr --verbose
Screen 0: minimum 320 x 200, current 2390 x 768, maximum 8192 x 8192
VGA1 connected 1024x768+1366+0 (0xb8) normal (normal left inverted right x axis y axis) 312mm x 234mm
	Identifier: 0x41
	Timestamp:  982881
	Subpixel:   unknown
	Clones:    
	CRTC:       0
	CRTCs:      0 1
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	EDID:
		00ffffffffffff004c2d17013731424c
		160f0103681f17782eee91a3544c9926
		0f5054bfee806159455931598180714f
		010101010101ea240060410028303060
		130038ea1000001e000000fd0032a01e
		470b000a202020202020000000fc0053
		796e634d61737465720a2020000000ff
		00485841593630323135310a20200004
  1024x768 (0xb8)   94.5MHz +HSync +VSync *current +preferred
        h: width  1024 start 1072 end 1168 total 1376 skew    0 clock   68.7KHz
        v: height  768 start  769 end  772 total  808           clock   85.0Hz
  1280x1024 (0xb9)  108.0MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock   64.0KHz
        v: height 1024 start 1025 end 1028 total 1066           clock   60.0Hz
  1152x864 (0xba)  108.0MHz +HSync +VSync
        h: width  1152 start 1216 end 1344 total 1600 skew    0 clock   67.5KHz
        v: height  864 start  865 end  868 total  900           clock   75.0Hz
  1024x768 (0xbb)   94.5MHz +HSync +VSync
        h: width  1024 start 1072 end 1072 total 1376 skew    0 clock   68.7KHz
        v: height  768 start  769 end  772 total  808           clock   85.0Hz
  1024x768 (0xbc)   78.8MHz +HSync +VSync
        h: width  1024 start 1040 end 1136 total 1312 skew    0 clock   60.1KHz
        v: height  768 start  769 end  772 total  800           clock   75.1Hz
  1024x768 (0xbd)   75.0MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1328 skew    0 clock   56.5KHz
        v: height  768 start  771 end  777 total  806           clock   70.1Hz
  1024x768 (0x45)   65.0MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock   48.4KHz
        v: height  768 start  771 end  777 total  806           clock   60.0Hz
  832x624 (0xbe)   57.3MHz -HSync -VSync
        h: width   832 start  864 end  928 total 1152 skew    0 clock   49.7KHz
        v: height  624 start  625 end  628 total  667           clock   74.6Hz
  800x600 (0xbf)   56.2MHz +HSync +VSync
        h: width   800 start  832 end  896 total 1048 skew    0 clock   53.7KHz
        v: height  600 start  601 end  604 total  631           clock   85.1Hz
  800x600 (0xc0)   50.0MHz +HSync +VSync
        h: width   800 start  856 end  976 total 1040 skew    0 clock   48.1KHz
        v: height  600 start  637 end  643 total  666           clock   72.2Hz
  800x600 (0xc1)   49.5MHz +HSync +VSync
        h: width   800 start  816 end  896 total 1056 skew    0 clock   46.9KHz
        v: height  600 start  601 end  604 total  625           clock   75.0Hz
  800x600 (0x46)   40.0MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock   37.9KHz
        v: height  600 start  601 end  605 total  628           clock   60.3Hz
  800x600 (0x47)   36.0MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock   35.2KHz
        v: height  600 start  601 end  603 total  625           clock   56.2Hz
  640x480 (0xc2)   36.0MHz -HSync -VSync
        h: width   640 start  696 end  752 total  832 skew    0 clock   43.3KHz
        v: height  480 start  481 end  484 total  509           clock   85.0Hz
  640x480 (0xc3)   31.5MHz -HSync -VSync
        h: width   640 start  664 end  704 total  832 skew    0 clock   37.9KHz
        v: height  480 start  489 end  491 total  520           clock   72.8Hz
  640x480 (0xc4)   31.5MHz -HSync -VSync
        h: width   640 start  656 end  720 total  840 skew    0 clock   37.5KHz
        v: height  480 start  481 end  484 total  500           clock   75.0Hz
  640x480 (0xc5)   30.2MHz -HSync -VSync
        h: width   640 start  704 end  768 total  864 skew    0 clock   35.0KHz
        v: height  480 start  483 end  486 total  525           clock   66.7Hz
  640x480 (0xc6)   25.2MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock   31.5KHz
        v: height  480 start  490 end  492 total  525           clock   60.0Hz
  720x400 (0xc7)   28.3MHz -HSync +VSync
        h: width   720 start  738 end  846 total  900 skew    0 clock   31.5KHz
        v: height  400 start  412 end  414 total  449           clock   70.1Hz
LVDS1 connected 1366x768+0+0 (0x43) normal (normal left inverted right x axis y axis) 293mm x 164mm
	Identifier: 0x42
	Timestamp:  982881
	Subpixel:   horizontal rgb
	Clones:    
	CRTC:       1
	CRTCs:      1
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	EDID:
		00ffffffffffff0006af2c1100000000
		01120103901d10780af9d59555549327
		21505400000001010101010101010101
		010101010101121b565a500019303020
		360025a41000001a0c12565a50001930
		3020360025a41000001a000000fe0058
		58333147804231333358573100000000
		00000000000000000001010a20200076
	BACKLIGHT: 7 (0x00000007)	range:  (0,15)
	Backlight: 7 (0x00000007)	range:  (0,15)
	scaling mode:	Full
		supported: None         Full         Center       Full aspect 
  1366x768 (0x43)   69.3MHz +HSync -VSync *current +preferred
        h: width  1366 start 1414 end 1446 total 1456 skew    0 clock   47.6KHz
        v: height  768 start  771 end  777 total  793           clock   60.0Hz
  1366x768 (0x44)   46.2MHz +HSync -VSync
        h: width  1366 start 1414 end 1446 total 1456 skew    0 clock   31.7KHz
        v: height  768 start  771 end  777 total  793           clock   40.0Hz
  1024x768 (0x45)   65.0MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock   48.4KHz
        v: height  768 start  771 end  777 total  806           clock   60.0Hz
  800x600 (0x46)   40.0MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock   37.9KHz
        v: height  600 start  601 end  605 total  628           clock   60.3Hz
  800x600 (0x47)   36.0MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock   35.2KHz
        v: height  600 start  601 end  603 total  625           clock   56.2Hz
  640x480 (0x48)   25.2MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock   31.5KHz
        v: height  480 start  490 end  492 total  525           clock   59.9Hz
Comment 4 Paul Ezvan 2010-07-09 06:14:15 UTC
Same problem here on the same laptop, on Fedora 13.

In fact the graphic chipset is an Arrandale one.

I'll attach my xorg.log and dmesg with drm debugging enabled.
Comment 5 Paul Ezvan 2010-07-09 06:15:04 UTC
Created attachment 36917 [details]
Dmesg with drm debug enabled (kernel 2.6.34-45)
Comment 6 Paul Ezvan 2010-07-09 06:17:21 UTC
Created attachment 36918 [details]
Xorg.log (Fedora 13 and kernel 2.6.34-45)
Comment 7 Maxime C 2010-07-19 03:59:56 UTC
Is it the same problem than me ?
https://bugs.freedesktop.org/show_bug.cgi?id=28306

(Vostro 3300 with Intel core i5)
Comment 8 Chris Wilson 2010-07-19 04:07:37 UTC
Created attachment 37176 [details] [review]
Set transcoder sync polarity for DP based on actual mode 

Possibly, and they both may be related to this patch. Or any of the other umpteen patches for Arrandale recently.
Comment 9 Marc 2010-07-22 06:57:12 UTC
(In reply to comment #7)
> Is it the same problem than me ?
> https://bugs.freedesktop.org/show_bug.cgi?id=28306
> 
> (Vostro 3300 with Intel core i5)

Seems we all have the same issue.
My company purchased several Vostros 3300 and all have this problem.
Comment 10 Chris Wilson 2010-08-06 00:36:50 UTC
There have been a number of patches for VGA on Arrandale that are now upstream in drm-core-next, and should now be in Linus's tree.

Can you please try one of those trees to check if this is not an old bug? Thanks.

Is this monitor specific? If you attach a different monitor with a similar resolution, do you see the same issue? Is this connector specific, if you attach the same monitor using DVI/DP/HDMI, do you see the same issue?
Comment 11 Maxime C 2010-08-06 02:14:50 UTC
It seems that I have the same bug so :

(In reply to comment #10)
> There have been a number of patches for VGA on Arrandale that are now upstream
> in drm-core-next, and should now be in Linus's tree.
> 

I've seen your commits, thanks for that.

> Can you please try one of those trees to check if this is not an old bug?
> Thanks.

I don't have much time and I'm not at home until end of september but i'll try to find a monitor to test. Can you be more specific on what we should recompile ? What versions do we need ?

> 
> Is this monitor specific? If you attach a different monitor with a similar
> resolution, do you see the same issue? Is this connector specific, if you
> attach the same monitor using DVI/DP/HDMI, do you see the same issue?

2 month ago, I tried with several monitors, with different native resolutions, and I saw the same issue (even tried with a videoprojector). I also tried to lower the resolution and this is the same problem.
On this laptop we (sadly) only have a vga output.

Thanks Chris, you are my hope :). It is so annoying to change our computer and don't be able to use our external screen anymore :/.
Comment 12 Chris Wilson 2010-08-06 02:39:36 UTC
It's a bit difficult to recommend any particular version at the moment, but a good base would be Dave Airlie's drm-core-next [96576a9e1a0cdb8a43d3af5846be0948f52b4460] as that should be fairly stable. You can try Linus's tree since he has pulled from drm-core-next, but then you may find some non-i915 regressions. Another week or so and 2.6.36-rc1 will be out and the tree should then become more stable.

Flickering is typically either Frame Buffer Compression, Self Refresh or an incorrect mode. Upstream we have some modesetting fixes for Arrandale, and we think that those correct most of the issues. I've just found a SR issue on my Arrandale system, bug 28969 and bug 29173, and there is a reasonable chance that it is affecting these systems as well. Another cause could be we are misprogramming an encoder/connector, hence why switching between VGA/DVI/HDMI/DP might have given some clues as to where the bug is.

As you can tell with so many open bugs on Arrandale, you may be suffering from multiple bugs with a unique twist. :(
Comment 13 Paul Ezvan 2010-08-16 01:32:29 UTC
The problem is not fixed with a kernel from drm-next branch (commit 96576a9e1a0cdb8a43d3af5846be0948f52b4460).
Comment 14 Chris Wilson 2010-08-16 01:48:47 UTC
Try this hack to confirm if this is the same self-refresh issue that I'm hitting:

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_d
index 402dc42..b828a21 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3352,7 +3352,7 @@ static void ironlake_update_wm(struct drm_device *dev,  in
         * Calculate and update the self-refresh watermark only when one
         * display plane is used.
         */
-       if (!planea_clock || !planeb_clock) {
+       if (0) {
                /* Read the self-refresh latency. The unit is 0.5us */
                int ilk_sr_latency = I915_READ(MLTR_ILK) & ILK_SRLT_MASK;
                int tlb_overhead = 32*1024 - 8 * sr_hdisplay * pixel_size;
Comment 15 Chris Wilson 2010-08-16 01:50:34 UTC
Also for extra fun, you can try using http://cgit.freedesktop.org/~ickle/linux-2.6/log/?h=overlay which [currently] has additional patches beyond drm-intel-next.
Comment 16 Maxime C 2010-08-16 10:50:25 UTC
(In reply to comment #14)
> Try this hack to confirm if this is the same self-refresh issue that I'm
> hitting:
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_d
> index 402dc42..b828a21 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3352,7 +3352,7 @@ static void ironlake_update_wm(struct drm_device *dev, 
> in
>          * Calculate and update the self-refresh watermark only when one
>          * display plane is used.
>          */
> -       if (!planea_clock || !planeb_clock) {
> +       if (0) {
>                 /* Read the self-refresh latency. The unit is 0.5us */
>                 int ilk_sr_latency = I915_READ(MLTR_ILK) & ILK_SRLT_MASK;
>                 int tlb_overhead = 32*1024 - 8 * sr_hdisplay * pixel_size;

Didn't help (unless i've made something wrong, so if someone else can confirm..).

(and about the ickle version, the compilation failed here... but not on the gpu part.)
Comment 17 Chris Wilson 2010-08-18 02:56:36 UTC
Rebased the branch on top of 2.6.36-rc1, so hopefully the extraneous compile failures have been fixed. Whilst you confirmed that it is not a self-refresh issue, can you still try the branch as that contains all the outstanding fixes [at least the ones that I know about! ;-].
Comment 18 Maxime C 2010-08-18 09:23:43 UTC
(In reply to comment #17)
> Rebased the branch on top of 2.6.36-rc1, so hopefully the extraneous compile
> failures have been fixed. Whilst you confirmed that it is not a self-refresh
> issue, can you still try the branch as that contains all the outstanding fixes
> [at least the ones that I know about! ;-].

The problem is still not solved with http://cgit.freedesktop.org/~ickle/linux-2.6/log/?h=overlay  (0d7d74f1f7855d0627280c9d29a6d40a75e32261 I think (my computer is not switch on))
Comment 19 Chris Wilson 2010-08-18 09:29:25 UTC
* Sigh. Can you grab a drm.debug=0xe dmesg from that branch booting?
Comment 20 Maxime C 2010-08-18 09:51:30 UTC
Created attachment 37957 [details]
 Dmesg with drm.debug=0xe (kernel 2.6.36-rc1 branch overlay)
Comment 21 Maxime C 2010-08-18 09:56:42 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > Rebased the branch on top of 2.6.36-rc1, so hopefully the extraneous compile
> > failures have been fixed. Whilst you confirmed that it is not a self-refresh
> > issue, can you still try the branch as that contains all the outstanding fixes
> > [at least the ones that I know about! ;-].
> 
> The problem is still not solved with
> http://cgit.freedesktop.org/~ickle/linux-2.6/log/?h=overlay 
> (0d7d74f1f7855d0627280c9d29a6d40a75e32261 I think (my computer is not switch
> on))

ahah. I don't know what happened but the screen of my laptop has just displayed vertical black and white lines. No freezing but not usable.
That's not the same issue but that doesn't look good :).
Comment 22 Chris Wilson 2010-08-18 10:10:58 UTC
(In reply to comment #21) 
> ahah. I don't know what happened but the screen of my laptop has just displayed
> vertical black and white lines. No freezing but not usable.
> That's not the same issue but that doesn't look good :).

That is FBC going horribly wrong. Fix in progress. ;-)
Comment 23 Chris Wilson 2010-09-10 02:56:47 UTC
Hmm, the stripy screen is probably FBC, though we know that self-refresh is extremely buggy.

http://git.kernel.org/?p=linux/kernel/git/ickle/drm-intel.git;a=commit;h=71c831d2cce539e0ee8e3b3fadae49355867efc2

from

 http://git.kernel.org/?p=linux/kernel/git/ickle/drm-intel.git drm-intel-staging

disables self-refresh whilst we try and fix it correctly.
Comment 24 Chris Wilson 2010-09-10 16:12:59 UTC
We've disabled self-refresh [bug 30125].
Comment 25 Maxime C 2010-09-12 17:07:02 UTC
I will try this week and let you know whether the problem is fixed for me.
Comment 26 Maxime C 2010-09-13 12:30:45 UTC
(In reply to comment #25)
> I will try this week and let you know whether the problem is fixed for me.

Does not work with http://git.kernel.org/?p=linux/kernel/git/ickle/drm-intel.git drm-intel-fixes (with dd8849c8f59ec1cee4809a0c5e603e045abe860e and 897493504addc5609f04a2c4f73c37ab972c29b2).
Comment 27 Chris Wilson 2010-09-13 12:36:50 UTC
Can you grab a photo or a short video showing the effect? We are at least gradually ruling out the possibilities of what it might be!
Comment 28 Maxime C 2010-09-13 12:50:24 UTC
Let's start over :

I have the same laptop and same symptoms than thiagoc who reported this first : Dell Vostro 3300 with Intel 4500MHD graphic card and "when I put a external monitor in the VGA input, the screen on monitor flickers and is blurred."

This bug is the same than https://bugs.freedesktop.org/show_bug.cgi?id=28306 and Marc confirmed it was the same problem.

In this bug report you will find a picture and a video.
Comment 29 Chris Wilson 2010-09-13 12:56:53 UTC
Ok, lets continue this in bug 28306.

*** This bug has been marked as a duplicate of bug 28306 ***
Comment 30 Michael Fu 2010-09-17 18:39:09 UTC
Err... GMA4500MHD(aka Cantiga) is not Arrandale(aka Ironlake) though
Comment 31 Maxime C 2010-09-17 18:57:17 UTC
(In reply to comment #30)
> Err... GMA4500MHD(aka Cantiga) is not Arrandale(aka Ironlake) though

00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 12)
is HD Graphics (this laptop runs an Intel Core i5). Probably a mistake from the bug reporter.

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.