Bug 38750 - [Arrandale] Intel Core i3 External Monitor Wavy Output
[Arrandale] Intel Core i3 External Monitor Wavy Output
Status: RESOLVED FIXED
Product: DRI
Classification: Unclassified
Component: DRM/Intel
unspecified
x86 (IA32) Linux (All)
: medium normal
Assigned To: Chris Wilson
https://bugzilla.kernel.org/show_bug....
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-28 08:54 UTC by Seth Forshee
Modified: 2012-09-05 08:19 UTC (History)
20 users (show)

See Also:


Attachments
A patch which turns off SSC for all outputs. (4.09 KB, patch)
2011-07-25 02:31 UTC, ben.brewer
no flags Details | Splinter Review
A patch which turns off SSC for all outputs (kernel 3.0). (4.03 KB, patch)
2011-07-25 13:55 UTC, Maxime C
no flags Details | Splinter Review
A patch which optionally turns off SSC for all outputs based on a parameter. (5.44 KB, patch)
2011-07-26 09:22 UTC, ben.brewer
no flags Details | Splinter Review
patch 1 (4.60 KB, patch)
2011-08-03 12:50 UTC, Jesse Barnes
no flags Details | Splinter Review
patch 2 (4.90 KB, patch)
2011-08-03 12:51 UTC, Jesse Barnes
no flags Details | Splinter Review
drm-intel-next patch in kernel 3.1 (fix waves) (114.84 KB, patch)
2011-10-28 13:52 UTC, Tomasz C.
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Seth Forshee 2011-06-28 08:54:59 UTC
Forwarding this bug from Ubuntu reporter Alan Lord:
http://bugs.launchpad.net/bugs/614238

[Problem]
Output on external screen with VGA is described as having waves that makes it unusable. The problem has been observed with kernels up through and including 3.0 release candidates. This problem was also discussed on https://bugs.freedesktop.org/show_bug.cgi?id=28306, and a patch that helped was provided there (commit 633f2ea "drm/i915: Disable SSC for outputs other than LVDS or DP") but was later reverted (commit fc9a222), so the issue is still outstanding. It was requested that a new bug be opened as a result of confusion from unrelated issues.

[Original Description]
A similar problem with Lucid was reported mainly by users of ATi Radeon graphics hardware. I also experienced the "wavy" output in Lucid, although the graphics h/w is the integrated intel that comes with the Core i3 processors.

It is easy to reproduce. Just plug in an external monitor or projector. The output is not stable/solid and has waves that make it unusable.

I tried the Maverick Alpha3 to see if it had been addressed in the 2.6.35 kernel but the problem is still apparent.

The LCD display of the Laptop is rock solid and sharp. This only affects the external VGA from what I can tell. I do not have any hdmi devices to test with so cannot confirm if the symptoms are just VGA or any external monitor connection.

Similar bug reports from Lucid include: 537640, 541501, 557814, 562138 although these all seem to relate to the ATI chipsets, the description of the problem sounds the same.

I am happy to try upstream kernels and build/patch/compile if necessary.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: linux-image-2.6.35-14-generic 2.6.35-14.19
Regression: No
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.35-14.19-generic 2.6.35
Uname: Linux 2.6.35-14-generic i686
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC269 Analog [ALC269 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: alord 1578 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfc700000 irq 46'
   Mixer name	: 'Intel IbexPeak HDMI'
   Components	: 'HDA:10ec0269,144dc06a,00100004 HDA:80862804,80860101,00100000'
   Controls : 19
   Simple ctrls : 9
Date: Fri Aug 6 07:47:00 2010
HibernationDevice: RESUME=UUID=bc66e046-4afc-4cb6-aa3e-d0f114e960e3
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100803.1)
Lsusb:
 Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 003: ID 1210:25f4 DigiTech
 Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: SAMSUNG ELECTRONICS CO., LTD. R530/R730
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.35-14-generic root=UUID=3364d8e7-11e8-4000-a32e-8bfca4cac5aa ro quiet splash
ProcEnviron:
 LANG=en_GB.utf8
 SHELL=/bin/bash
RelatedPackageVersions: linux-firmware 1.37
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
dmi.bios.date: 03/12/2010
dmi.bios.vendor: Phoenix Technologies Ltd.
dmi.bios.version: 03JV.M011.20100312.hkk
dmi.board.asset.tag: Tag 12345
dmi.board.name: R530/R730
dmi.board.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 9
dmi.chassis.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLtd.:bvr03JV.M011.20100312.hkk:bd03/12/2010:svnSAMSUNGELECTRONICSCO.,LTD.:pnR530/R730:pvrNotApplicable:rvnSAMSUNGELECTRONICSCO.,LTD.:rnR530/R730:rvrNotApplicable:cvnSAMSUNGELECTRONICSCO.,LTD.:ct9:cvrN/A:
dmi.product.name: R530/R730
dmi.product.version: Not Applicable
dmi.sys.vendor: SAMSUNG ELECTRONICS CO., LTD.
Comment 1 Maxime C 2011-06-28 09:43:47 UTC
Also affects Core i5 and other distributions than Ubuntu.

lspci:
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated
Graphics Controller (rev 12)
Comment 3 Maxime C 2011-06-29 13:25:08 UTC
I tested a kernel patched with Chris' patch: https://bugs.freedesktop.org/attachment.cgi?id=46702

The external screen is now working properly but the laptop screen remains black.

The kernel: http://people.canonical.com/~sforshee/lp614238/linux-2.6.39-020639rc7.201105192014~lp614238/linux-image-2.6.39-020639rc7-generic_2.6.39-020639rc7.201105192014~lp614238_amd64.deb

(thanks Seth for the deb)
Comment 4 Maxime C 2011-06-29 13:29:34 UTC
> The external screen is now working properly but the laptop screen remains
> black.

Sorry, it remains blacks when the external screen is plugged in. Otherwise the laptop screen works well after restarting the X server. (I think that's improvement for most people)
Comment 5 Tom 2011-07-03 03:49:50 UTC
(In reply to comment #4)
> > The external screen is now working properly but the laptop screen remains
> > black.
> 
> Sorry, it remains blacks when the external screen is plugged in. Otherwise the
> laptop screen works well after restarting the X server. (I think that's
> improvement for most people)

Using vostro 3300 with i3 encountered the same problem and applied the described patch.

Laptop's screen remains black when external screen is connected. The external screen works well though.

Unplugging the cable to the external screen brings back the display to the laptop's screen.

However, after 2-3 times that you do that, the system hangs. Can't switch to any display, both screens are black, ctrl+alt F1 through F12 doesn't help. Only hard reboot works.

I've noticed the following appearing in my logs:

         :[  175.787969] [drm:intel_disable_transcoder] *ERROR* failed to disable transcoder

Happy to help in any testing. This issue is really a painful one for me. Can't use my laptop with an external display at work (well - you have to plug/unplug at least once a day. Rebooting every 2-3 days is not an option...)
Comment 6 Jarede Silva 2011-07-03 10:49:30 UTC
I have the same, identical, equal, problem of Tom.
Comment 7 Raphael 2011-07-03 18:22:10 UTC
I also have this issue with my Dell Vostro 3300, this bug is really REALLY annoying and it's unbelievable that's not fixed yet! Just adding some info: Fedora have the same problem (https://bugzilla.redhat.com/show_bug.cgi?id=608316).
Comment 8 Alexander Sidorov 2011-07-21 13:33:46 UTC
I tried the patch above and got the same result as Maxime C. Only one monitor works. I use Samsung QX410 (Core i5) with Debian distribution.
Comment 9 ben.brewer 2011-07-25 02:31:56 UTC
Created attachment 49493 [details] [review]
A patch which turns off SSC for all outputs.

I've created a version of Chris Wilsons patch which disables SSC for all outputs without checking. I've tested it so far without issues, both VGA and the internal LVDS are operating fine.
Since SSC is just a hack to get around some strict FCC EMI rules (according to the great wikipedia) I can't see this causing any issues.

--Ben Brewer (CodeThink)
Comment 10 Maxime C 2011-07-25 09:08:00 UTC
(In reply to comment #9)
> Created an attachment (id=49493) [details]
> A patch which turns off SSC for all outputs.
> 
> I've created a version of Chris Wilsons patch which disables SSC for all
> outputs without checking. I've tested it so far without issues, both VGA and
> the internal LVDS are operating fine.
> Since SSC is just a hack to get around some strict FCC EMI rules (according to
> the great wikipedia) I can't see this causing any issues.
> 
> --Ben Brewer (CodeThink)

Hi Ben!

Thanks a lot for your patch. I've just applied it on the kernel 3.0 (with minor modifications because your patch is for 2.6.38) and both screens are now working. I will share the ubuntu package soon.
Comment 11 james 2011-07-25 13:20:45 UTC
(In reply to comment #10)
> Hi Ben!
> 
> Thanks a lot for your patch. I've just applied it on the kernel 3.0 (with minor
> modifications because your patch is for 2.6.38) and both screens are now
> working. I will share the ubuntu package soon.

Could you please post the patch for 3.0 kernel?
Comment 12 Maxime C 2011-07-25 13:55:05 UTC
Created attachment 49537 [details] [review]
A patch which turns off SSC for all outputs (kernel 3.0).
Comment 13 Tom 2011-07-25 15:25:28 UTC
(In reply to comment #9)
> Created an attachment (id=49493) [details]
> A patch which turns off SSC for all outputs.
> 
> I've created a version of Chris Wilsons patch which disables SSC for all
> outputs without checking. I've tested it so far without issues, both VGA and
> the internal LVDS are operating fine.
> Since SSC is just a hack to get around some strict FCC EMI rules (according to
> the great wikipedia) I can't see this causing any issues.
> 
> --Ben Brewer (CodeThink)

Thanks Ben!

I can confirm the patch works well on my Dell Vostro 3300 with i3.

Plugging and unplugging the external display now works as expected and the display is stable.
Comment 14 james 2011-07-25 15:28:16 UTC
Hello, the 3.0 patch works for me. I have a core i5, VGA monitor at 1366x768 and a HDMI monitor at 1600x900.
Comment 15 ben.brewer 2011-07-26 09:22:18 UTC
Created attachment 49582 [details] [review]
A patch which optionally turns off SSC for all outputs based on a parameter.

I've modified my patch to use a module parameter to disable SSC for all outputs, this should lay any legal issues or worries about modified behaviour to rest.

--Ben Brewer (CodeThink)
Comment 16 Tianchun 2011-07-28 20:24:41 UTC
(In reply to comment #14)
> Hello, the 3.0 patch works for me. I have a core i5, VGA monitor at 1366x768
> and a HDMI monitor at 1600x900.

Hi James, I am glad that there is a solution to the long standing issue which I have followed for half a year. I have core i5 too. Do I need to compile the kernel with this patch?
Comment 17 M K 2011-07-28 23:23:17 UTC
Is it going to get implemented into Fedora soon? Because I have this problem, but I don't know how to use this fix.
Comment 18 Filipe Giusti 2011-07-30 15:25:16 UTC
Thanks Ben.

With a small tweak on intel_bios.c for kernel version 2.6.39.3, it works on

vendor_id	: GenuineIntel
cpu family	: 6
model		: 37
model name	: Intel(R) Core(TM) i3 CPU       M 380  @ 2.53GHz
stepping	: 5

Also besides providing this solution you pushed me to learn how to compile the linux kernel, so thanks again.

--
Filipe Giusti
Comment 19 Jesse Barnes 2011-08-03 12:50:03 UTC
Created attachment 49887 [details] [review]
patch 1

First in series to modify SSC values
Comment 20 Jesse Barnes 2011-08-03 12:51:16 UTC
Created attachment 49888 [details] [review]
patch 2

Can you try these patches (apply patch 1 first, then patch 2)?  I may need to tweak #2 a bit more to avoid enabling SSC at all when switching from one to two outputs...
Comment 21 Seth Forshee 2011-08-03 13:08:43 UTC
(In reply to comment #20)
> Can you try these patches (apply patch 1 first, then patch 2)?  I may need to
> tweak #2 a bit more to avoid enabling SSC at all when switching from one to two
> outputs...

Sure thing, I'll make a build and post it to the launchpad bug for testing. There should be a bunch of willing testers, at least based on the number of people who have been complaining :)

Thanks Jesse. If these work they'll make a lot of people happy.
Comment 22 Seth Forshee 2011-08-03 13:29:47 UTC
Review of attachment 49888 [details] [review]:

Jesse, there's a build error in intel_display.c, noted below.

You also have a repeated "work" in the commit message.

::: drivers/gpu/drm/i915/intel_display.c
@@ +5122,3 @@
+		if (has_edp_encoder &&
+		    !intel_encoder_is_pch_edp(&has_edp_encoder->base) &&
+	if (num_connectors) {

typo here, should be intel_panel_use_ssc
Comment 23 Seth Forshee 2011-08-03 13:31:32 UTC
(In reply to comment #22)

> ::: drivers/gpu/drm/i915/intel_display.c
> @@ +5122,3 @@
> +        if (has_edp_encoder &&
> +            !intel_encoder_is_pch_edp(&has_edp_encoder->base) &&
> +    if (num_connectors) {
> 
> typo here, should be intel_panel_use_ssc

Oops, somehow it quoted the wrong section of the patch. Currently it has intel_panel_use(ssc.
Comment 24 Jesse Barnes 2011-08-03 13:32:54 UTC
Oops sorry, last minute change before I sent it out.  I thought I had built but obviously not... anyway yeah the change is just to fix the ( into a _
Comment 25 Maxime C 2011-08-04 01:17:56 UTC
(In reply to comment #21)
> (In reply to comment #20)
> > Can you try these patches (apply patch 1 first, then patch 2)?  I may need to
> > tweak #2 a bit more to avoid enabling SSC at all when switching from one to two
> > outputs...
> 
> Sure thing, I'll make a build and post it to the launchpad bug for testing.
> There should be a bunch of willing testers, at least based on the number of
> people who have been complaining :)
> 
> Thanks Jesse. If these work they'll make a lot of people happy.

It's working for me: only one VGA output.
Comment 26 Seth Forshee 2011-08-05 09:56:00 UTC
Jesse,

I've received about 9 reports so far that this is working. Most of these were tested with my backport to 2.6.38; if you'd like to validate that the backport is equivalent the patches are available at

http://people.canonical.com/~sforshee/lp614238/linux-2.6.38-11.48~lp614238v201108032108/
Comment 27 Seth Forshee 2011-08-16 12:11:51 UTC
Jesse,

I was just checking up on the status of these patches. Looks like the first one made it to Linus's tree, but Keith backed out the second because it causes a regression:

https://bugs.freedesktop.org/show_bug.cgi?id=40031

Any idea on what needs to be done to address this?

Thanks,
Seth
Comment 28 Tomasz C. 2011-09-30 15:49:58 UTC
Does this bug will be fixed in kernel 3.1?

I recall that it was first reported over a year ago, only as the old report was closed and opened new, it always looks better error for two months than in over a year.

Tomasz
Comment 29 Maxime C 2011-10-01 01:04:41 UTC
(In reply to comment #27)
> Jesse,
> 
> I was just checking up on the status of these patches. Looks like the first one
> made it to Linus's tree, but Keith backed out the second because it causes a
> regression:
> 

Is the regression more important than this bug ? I mean, with the patch my computer is working perfectly.
Comment 30 Tomasz C. 2011-10-20 09:07:37 UTC
Chris, whether this patch will be submitted in merge window kernel 3.2 ?
Comment 31 Paulo Zanoni 2011-10-20 09:54:31 UTC
Sorry, I forgot to tell you.

This issue was discussed in intel-gfx recently. Keith wrote a series of 9 patches on the code that is used by this bug.

I believe the patches landed here:
http://cgit.freedesktop.org/~jbarnes/linux?h=fix-pch-refclk

And the one that solves our problem is:
http://cgit.freedesktop.org/~jbarnes/linux/commit/?h=fix-pch-refclk&id=99eb6a01e5ac6cf28aadc64e6ff346939874dfd2

The root-cause is that on our machines we need to use DREF_NONSPREAD_CK505_ENABLE instead of DREF_NONSPREAD_SOURCE_ENABLE when setting the PCH_DREF_CONTROL register.

I don't think this will come for 3.1, but at least now distros can try to backport something :)
Comment 32 Paulo Zanoni 2011-10-20 10:22:14 UTC
More information to help:

If we're going to do a "minimal" backport we need:

- this patch: http://lists.freedesktop.org/archives/intel-gfx/2011-September/012172.html
- follow the comments here: http://lists.freedesktop.org/archives/intel-gfx/2011-September/012198.html

The first link on this comment is the patch that "caused" Keith's rewrite. If you want to fully understand the problem, I recommend you to read all messages on that thread and also all replies to Keith's patch series (sent a few days after the discussion).
Comment 33 Tomasz C. 2011-10-20 10:55:41 UTC
Thank you very much for answer :)
I'm currently using the patch from comment #12 this discussion and it works well, but every now and then I have to recompile kernel on ArchLinux (7 times, v3.0.7 :), so I want to know if the amendment shall enter into a stable kernel release, in version 3.1 is probably not possible, but maybe in version 3.2?
The bug has been over a year, whether he is a chance that once it goes into the stable kernel relase, it was not necessary to create backports?
Comment 34 Louis 2011-10-25 02:24:02 UTC
Hi,

I am trying to get use the 3.0 patch. I have downloaded the patch above to my home directory, downloaded the 3.0.0 source using apt-get. i've also have libncurses5-dev and gcc installed and updated and upgraded everything with apt-get. I can't get the patch to work though. I unbzipped /untarred the source then entered the linux-source-3.0.0 directory then ran

louis@louis-laptop:/usr/src/linux-source-3.0.0/linux-source-3.0.0$ sudo cat /home/louis/patch.diff | patch -p1
patching file drivers/gpu/drm/i915/i915_drv.c
patch: **** Can't rename file /tmp/pobVaNe5 to drivers/gpu/drm/i915/i915_drv.c : Permission denied
louis@louis-laptop:/usr/src/linux-source-3.0.0/linux-source-3.0.0$ 

can anybody tell me what i'm doing wrong? I'm sure after i've patched it properly the compiling/installing of the new kernel will be no problem.

Cheers,

Louis
Comment 35 Maxime C 2011-10-25 02:35:41 UTC
When you type :
"sudo cat /home/louis/patch.diff | patch -p1"

You run cat as root and patch as louis. Then the error message should become clear to you. Anyway, you should do everything in your home and avoid touching the files in /usr/src.

Please avoid using this bug report ticket to ask how to apply a patch, you should use a forum for this kind of question.
Comment 36 Tomasz C. 2011-10-26 17:02:45 UTC
Can you share patch for kernel 3.1? I tried the above but do not match.

Is there a chance that the bug is fixed in kernel 3.2?
Comment 37 Paulo Zanoni 2011-10-27 04:11:52 UTC
(In reply to comment #36)
> Can you share patch for kernel 3.1? I tried the above but do not match.
> 
> Is there a chance that the bug is fixed in kernel 3.2?
Yes, a pull was already requested.

See:
http://lists.freedesktop.org/archives/intel-gfx/2011-October/012856.html
http://cgit.freedesktop.org/~keithp/linux/log/?h=drm-intel-next

Please test drm-intel-next. I hope Linus will pull this soon.
Comment 38 Tomasz C. 2011-10-28 13:52:29 UTC
Created attachment 52870 [details] [review]
drm-intel-next patch in kernel 3.1 (fix waves)

Thank you Paulo

Currently I test drm-intel-next and it works perfectly, no waves.
Previously, when switching screens sometimes appear gray screen and had to switch again, now drm-intel-next yet this did not happen.

I created a patch for kernel 3.1 on drm-intel-next, the file in the attachment.

I hope that this can be included in kernel 3.2 :)
Comment 39 Paulo Zanoni 2011-11-01 09:34:19 UTC
Fixed in Linus' 3.2 tree.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=99eb6a01e5ac6cf28aadc64e6ff346939874dfd2

Fixes my machine. Closing bug. Reopen if that doesn't fix your machine.
Comment 40 M K 2011-11-18 14:43:57 UTC
how do I apply this patch. I'm not really good at these things ? I've had this error for ever and I can't get it fixed... can it get merged into update or something ? Thanks
Comment 41 Paul Ezvan 2012-09-05 08:11:04 UTC
Hi,

the problem came back with linux kernel 3.5.3 (using Archlinux with latest intel 2.20.6 drivers).
Comment 42 Paul Ezvan 2012-09-05 08:19:38 UTC
Whoops please ignore my last comment, wrong kernel version.