Bug 29821 - eDP screen "flashes" on and off after boot.
Summary: eDP screen "flashes" on and off after boot.
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Jesse Barnes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-26 08:03 UTC by Jim Gettys
Modified: 2017-07-24 23:07 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg from last working kernel (129.04 KB, application/octet-stream)
2010-08-26 09:33 UTC, Jim Gettys
no flags Details
dmesg from jbarnes kernel (123.81 KB, application/octet-stream)
2010-08-26 09:33 UTC, Jim Gettys
no flags Details
intel_reg_dump from last working kernel (7.14 KB, application/octet-stream)
2010-08-26 09:34 UTC, Jim Gettys
no flags Details
intel_reg_dump from jbarnes kernel (7.14 KB, application/octet-stream)
2010-08-26 09:35 UTC, Jim Gettys
no flags Details
vbios from last working kernel (64.00 KB, application/octet-stream)
2010-08-26 09:36 UTC, Jim Gettys
no flags Details
vbios again... I presume it shouldn't have changed ;-) (64.00 KB, application/octet-stream)
2010-08-26 09:37 UTC, Jim Gettys
no flags Details
Xorg log file from last working kernel boot (27.17 KB, text/plain)
2010-08-26 09:38 UTC, Jim Gettys
no flags Details
Xorg log file from jbarnes kernel (27.24 KB, text/plain)
2010-08-26 09:38 UTC, Jim Gettys
no flags Details
xrandr from last working kernel (2.55 KB, application/octet-stream)
2010-08-26 09:39 UTC, Jim Gettys
no flags Details
xrandr from jbarnes kernel (2.55 KB, application/octet-stream)
2010-08-26 09:40 UTC, Jim Gettys
no flags Details
perf-top from a "flashing" kernel (24.69 KB, text/plain)
2010-09-01 14:54 UTC, Jim Gettys
no flags Details
split mask & idle bits (1.32 KB, patch)
2010-10-11 12:24 UTC, Jesse Barnes
no flags Details | Splinter Review

Description Jim Gettys 2010-08-26 08:03:54 UTC
I have a HP EliteBook 2540P.  I believe it is one of these:
http://h10010.www1.hp.com/wwpc/us/en/sm/WF06b/321957-321957-64295-3740645-3955549-4138624-4138627-4156284.html

The screen "flashes" on and off, with dismaying, non-periodic behavior, of 1-2HZ making it unusable.  The flashing starts right after boot, long before X is running.

The latest kernel I've found that drives the panel correctly is:
2.6.35-020635rc6

Everything I've tried after that, including jbarnes' drm-intel tree from git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-intel.git
as of commit: 78b40858edc6bd41cbc8cdb094d05d59d2feea4f Wed Aug 18 13:20:54 2010 
has this "flashing" behavior.

I also notice when I boot this kernel that the Ubuntu background graphic shows excessive banding (it uses a pretty gradual gradient): something is clearly not right in video land.
           - Jim
Comment 1 Jim Gettys 2010-08-26 09:33:10 UTC
Created attachment 38183 [details]
dmesg from last working kernel
Comment 2 Jim Gettys 2010-08-26 09:33:57 UTC
Created attachment 38184 [details]
dmesg from jbarnes kernel
Comment 3 Jim Gettys 2010-08-26 09:34:47 UTC
Created attachment 38185 [details]
intel_reg_dump from last working kernel
Comment 4 Jim Gettys 2010-08-26 09:35:37 UTC
Created attachment 38186 [details]
intel_reg_dump from jbarnes kernel
Comment 5 Jim Gettys 2010-08-26 09:36:19 UTC
Created attachment 38187 [details]
vbios from last working kernel
Comment 6 Jim Gettys 2010-08-26 09:37:30 UTC
Created attachment 38188 [details]
vbios again...  I presume it shouldn't have changed ;-)

Consistency is the hobgoblins of this small mind.
Comment 7 Jim Gettys 2010-08-26 09:38:11 UTC
Created attachment 38189 [details]
Xorg log file from last working kernel boot
Comment 8 Jim Gettys 2010-08-26 09:38:52 UTC
Created attachment 38190 [details]
Xorg log file from jbarnes kernel
Comment 9 Jim Gettys 2010-08-26 09:39:52 UTC
Created attachment 38191 [details]
xrandr from last working kernel
Comment 10 Jim Gettys 2010-08-26 09:40:34 UTC
Created attachment 38192 [details]
xrandr from jbarnes kernel
Comment 11 Jim Gettys 2010-08-26 09:52:34 UTC
System environment: 
-- chipset: Arrandale 
-- system architecture: x86_64
-- xf86-video-intel: 2:2.12.0-1ubuntu3
-- xserver: 2:1.9.0-0ubuntu1
-- mesa: 7.8.2-2ubuntu2
-- libdrm: 2.4.21-1ubuntu2
-- kernel: jbarnes kernel
-- Linux distribution: Ubuntu Maverick
-- Machine or mobo model: HP 2540p
-- Display connector: Internal

Reproducing steps:

Boot the system.  It starts flashing the screen almost immediately, long before X is running. (by flashing I mean the video seems to be turned on and off).  The flashing is non-periodic, around 1-2hz

Additional info:
The Ubuntu gradient background shows problems as well; it is not smooth, so something is pretty broken in video land.
Comment 12 Jim Gettys 2010-08-31 06:02:38 UTC
Interestingly, a kernel I built yesterday with PREEMPT set does not flash.  It does show the other video problem (limited color depth resolution).
Comment 13 Jesse Barnes 2010-09-01 09:31:39 UTC
Yeah I've noticed something strange with the panel dithering on my system as well.

The fact that PREEMPT makes the flashing go away could indicate we're spending a lot of time blocked in the kernel somewhere.  Can you collect a profile or look at 'perf top' while the flashing is occurring?  It might give us a clue about where we're spending time.
Comment 14 Jim Gettys 2010-09-01 14:54:54 UTC
Created attachment 38369 [details]
perf-top from a "flashing" kernel

OK, I loaded one of the N kernels I have that "flashes", and did a perf top on it.

File is attached.
Comment 15 Daniel Schmitt 2010-09-02 00:24:16 UTC
I have the same problem with 2540P. I use Debian AMD64 Squeeze Version. I tried 2.6.35-trunk kernel from debian experimental. It flashes at bootup. Bot for me it seems that it only flashes in X. If I do suspend to ram and awake, flashing is nearly gone.
For me flashing means display on/off 2Hz for 2 seconds and then there could be a time period of 15-30 minutes where the display is OK.
I tried vanilla 2.6.35.3 kernel, flashing is there. I tried this kernel with PREEMPT, it does not bootup :(
TOday I tried 2.6.36 rc3 PREEMPT. It bootup. But flashes again.
Should I generate outputs?
Comment 16 Jesse Barnes 2010-09-10 13:25:51 UTC
Can you try the drm-ickle-next branch from
git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-intel.git?

It has a couple more eDP related fixes and also includes a patch to disable self-refresh which prevents a lot of bad behavior.
Comment 17 Jim Gettys 2010-09-11 08:12:01 UTC
(In reply to comment #16)
> Can you try the drm-ickle-next branch from
> git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-intel.git?
> 
> It has a couple more eDP related fixes and also includes a patch to disable
> self-refresh which prevents a lot of bad behavior.

No luck; same flashing symptoms.  I think you did fix the dithering problem though...
Comment 18 Daniel Schmitt 2010-09-13 22:18:35 UTC
I'm using Gnome. I did already mention that after resume from "suspend to ram" the flashing is gone. But if I wait for the screensaver/ display power off because of inactivity the display again flashes after pressing any key.
Comment 19 madbiologist 2010-09-18 09:20:32 UTC
From looking at the date, the following commit seems to have been pulled into the kernel after 2.6.35-rc6.  Could it be the source of the flashing problem?

commit 5620ae29f1eabe655f44335231b580a78c8364ea
Author: Jesse Barnes
Date:   Mon Jul 26 13:51:22 2010 -0700

    drm/i915: make sure we shut off the panel in eDP configs
    
    Fix error from the last pull request.  Making sure we shut the panel off
    is more correct and saves power.
    
    Signed-off-by: Jesse Barnes
    Signed-off-by: Linus Torvalds
Comment 20 Fredrik Ellborg 2010-09-22 23:05:30 UTC
I would really like to help anyone working on this bug. Is there anything I can do? 

I still have this problem on a fully updated maverick on a HP Elitebook 2540p. I've tried all different kind of kernels, but the only one working (i.e., that does not have the flashing issue) for me, so far, is linux-image-2.6.35-020635rc6.

Thanks for doing all the hard work for us "ordinary" users!
Comment 21 Jim Gettys 2010-09-23 10:23:49 UTC
(In reply to comment #20)
> I would really like to help anyone working on this bug. Is there anything I can
> do? 
> 

If you are up to building kernels from git, then join the #intel-gfx channel and help by testing.  Jesse Barnes (jbarnes) and Chris Wilson have a kernel that needs testing; I've not been feeling very well this week and have been busy on other things with the energy I have remaining, so haven't had a chance to test the kernel Jesse thinks might fix it.

There is stuff in the ubuntu wiki about building and testing such kernels; it's not terribly hard.
Comment 22 Jim Gettys 2010-10-08 02:50:15 UTC
(In reply to comment #21)
> (In reply to comment #20)
> > I would really like to help anyone working on this bug. Is there anything I can
> > do? 
> > 
> 
> If you are up to building kernels from git, then join the #intel-gfx channel
> and help by testing.  Jesse Barnes (jbarnes) and Chris Wilson have a kernel
> that needs testing; I've not been feeling very well this week and have been
> busy on other things with the energy I have remaining, so haven't had a chance
> to test the kernel Jesse thinks might fix it.
> 
> There is stuff in the ubuntu wiki about building and testing such kernels; it's
> not terribly hard.

Jesse's latest patches in his git discussed in the thread "[Intel-gfx] PCH eDP fixes" worked for me, at least to give me a stable display.

Suspend does not work, however (of course, it didn't work on the much older kernel that ran, so we're still in better shape than we were...).
Comment 23 Jesse Barnes 2010-10-08 10:22:14 UTC
Great, thanks for confirming Jim.
Comment 24 Jim Gettys 2010-10-09 11:59:02 UTC
OK, as you know, suspend and resume still doesn't work.

It also takes about five seconds from touching a key while the panel is turned off before it turns on.

dmesg is also telling me:

[16900.450801] [drm:ironlake_edp_panel_on] *ERROR* panel on wait timed out: 0xc0000008
Comment 25 Jesse Barnes 2010-10-11 12:20:28 UTC
Oops, my panel on timeout check isn't quite correct.  In your case the panel is ready as expected and the mask check isn't accounting for that.  Bitwise anding the idle_on_mask before checking for equality is probably the best fix.  That should get rid of your timeouts and speed up the DPMS on path for you.
Comment 26 Jesse Barnes 2010-10-11 12:24:48 UTC
Created attachment 39349 [details] [review]
split mask & idle bits

Even better to split the mask and bit check into separate vars.
Comment 27 Jim Gettys 2010-10-11 19:43:11 UTC
Looks like you committed locally, but didn't push to kernel.org, either by mistake or by intention.  I'll test Monday in either case...
           - Jim


(In reply to comment #26)
> Created an attachment (id=39349) [details]
> split mask & idle bits
> 
> Even better to split the mask and bit check into separate vars.
Comment 28 Jesse Barnes 2010-10-12 08:59:47 UTC
I actually wasn't going to update the tree, but since you mentioned it, I went ahead and rebased to ickle's latest bits and pushed this patch (along with a couple of others).
Comment 29 Jim Gettys 2010-10-12 19:32:21 UTC
OK, xset dpms force off causes the screen to go off immediately, pressing a key gets the panel on in about 1 second (much much faster than before, but not as fast as I'd expect.

Dmesg says:

[  271.381859] hda-intel: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.

Same suspend problem as before.


It comes back now
(In reply to comment #28)
> I actually wasn't going to update the tree, but since you mentioned it, I went
> ahead and rebased to ickle's latest bits and pushed this patch (along with a
> couple of others).
Comment 30 Jim Gettys 2010-10-15 20:13:35 UTC
Interesting; the laptop will suspend/resume properly if I 
 echo -n mem > /sys/power/state


But if I use the system->shutdown menu entry, I get the hang.

I wonder whats the difference?
Comment 31 Jim Gettys 2010-10-16 08:34:00 UTC
Well, I did some more experiments: suspend is just plain flaky, no matter how invoked.

When it fails to suspend, the fan starts to run faster in the machine, and the panel remains lit (with just a "-" character on the screen).  I suspect the driver caught in a loop someplace, hoping the display will respond, FWIW.  I'd be less suspicious of the display driver if the display came back on promptly after being turned off; the current driver takes about a second to get the panel lit up on this machine.

(In reply to comment #30)
> Interesting; the laptop will suspend/resume properly if I 
>  echo -n mem > /sys/power/state
> 
> 
> But if I use the system->shutdown menu entry, I get the hang.
> 
> I wonder whats the difference?
Comment 32 Jim Gettys 2010-10-18 05:26:32 UTC
Here's additional information:

Suspend/resume is "flaky"; suspend fails of order 1/2 the time.

Xrandr reports a (null):

root@jg:~/Videos# xrandr
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 8192 x 8192
(null)1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 260mm x 160mm
   1280x800       60.0*+   40.3  
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)

If  I've resumed, and tell the flash player to go full screen, it does, but playback frame rate is glacial and broken. (maybe 1fps).  Works fine on first boot before the suspend/resume cycle.

                - Jim
Comment 33 madbiologist 2010-11-26 18:24:21 UTC
Re comment 22 - does this relate to comment 16?

Do you happen to know in which kernel RC this fix was introduced?


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.