Bug 71173 - [hsw] Display stutters after resume
Summary: [hsw] Display stutters after resume
Status: RESOLVED NOTOURBUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-02 22:34 UTC by Lyude Paul
Modified: 2014-04-05 16:56 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log after 3 suspends (45.38 KB, text/plain)
2013-11-03 03:59 UTC, Lyude Paul
no flags Details
dmesg after 3 suspends (134.42 KB, text/plain)
2013-11-03 04:00 UTC, Lyude Paul
no flags Details

Description Lyude Paul 2013-11-02 22:34:44 UTC
Occasionally when my ThinkPad Helix enters sleep mode, after resuming the display will begin to stutter very badly. Every few seconds the entire display freezes for a split second, then resumes like nothing happened. The GPU activity doesn't seem to be abnormal, and I can't find any relevant errors in any logs.
This behavior is seen on Gnome 3.8, using xf86-video-intel version 2.21.13 on Gentoo. The graphics card on this machine is a Intel HD 4000.
Comment 1 Chris Wilson 2013-11-02 22:50:10 UTC
Can you please attach your Xorg.0.log and dmesg after a resume?
Comment 2 Lyude Paul 2013-11-03 03:59:29 UTC
Created attachment 88544 [details]
Xorg.0.log after 3 suspends

I didn't notice this until now, but it seems it takes two or three suspends before the stuttering actually becomes noticeable.
Also ignore all the errors about wacom, that's an issue with one of the files in xorg.conf.d that I forgot to fix prior to posting this.
Comment 3 Lyude Paul 2013-11-03 04:00:27 UTC
Created attachment 88545 [details]
dmesg after 3 suspends
Comment 4 Lyude Paul 2013-11-04 14:09:46 UTC
So it appears this bug might not just be limited to suspend mode. I noticed recently I can reproduce it by locking and unlocking the screen in gnome a few times. So it may not be an issue with xf86-video-intel, but that's for you to decide I guess. Ether way I would really appreciate it if you knew what I could to to remedy this issue.
Comment 5 Jay Little 2013-11-12 11:11:28 UTC
Chandler,

In the latest git versions of the driver I've been experiencing some stuttering myself, but I almost never suspend my laptop.  The easiest way to replicate the behavior I've been seeing has been to simply load up a large webpage in Chromium and start scrolling through it, up and down.  Within a few seconds, the chromium window will freeze only to unfreeze and "catch up" in a second or two.

The behavior is quite annoying but I haven't filed a bug report yet because I don't have any kind of log output that seems to correlate with the behavior.  Could you load up a large webpage and Chromium and see if you can replicate this behavior?  And if so, could you confirm whether or not it resembles the stuttering that you are complaining about here?

Jay

Note: This behavior is seen with both SNA and Tearfree enabled (haven't tried disabling Tearfree though I'm positive that turning off SNA and turning on UXA will resolve the issue, but that's not a road I'm willing to go down.  Also my laptop contains an Intel HD 4600.
Comment 6 Jay Little 2013-11-12 11:23:50 UTC
If I turn off Tearfree, my issue seems to go away.  I wonder if what I'm seeing isn't actually more similar to this:

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

In any event, I'm not getting the kernel log entry, but perhaps I need to enable some more detailed drm logging.
Comment 7 Lyude Paul 2013-11-16 14:13:40 UTC
(In reply to comment #5)
> Chandler,
> 
> In the latest git versions of the driver I've been experiencing some
> stuttering myself, but I almost never suspend my laptop.  The easiest way to
> replicate the behavior I've been seeing has been to simply load up a large
> webpage in Chromium and start scrolling through it, up and down.  Within a
> few seconds, the chromium window will freeze only to unfreeze and "catch up"
> in a second or two.
> 
> The behavior is quite annoying but I haven't filed a bug report yet because
> I don't have any kind of log output that seems to correlate with the
> behavior.  Could you load up a large webpage and Chromium and see if you can
> replicate this behavior?  And if so, could you confirm whether or not it
> resembles the stuttering that you are complaining about here?
> 
> Jay
> 
> Note: This behavior is seen with both SNA and Tearfree enabled (haven't
> tried disabling Tearfree though I'm positive that turning off SNA and
> turning on UXA will resolve the issue, but that's not a road I'm willing to
> go down.  Also my laptop contains an Intel HD 4600.

I've tried disabling tearfree. The behavior has changed, however it's not completely gone. Instead of multiple quick distinct stutters it's now a very consistent single stutter every few seconds that lasts longer.
I think this does have to do with the gnome-shell though, because restarting the shell makes everything go back to normal.
Comment 8 Chris Wilson 2014-01-10 19:21:24 UTC
What does free report during the stuttering period? Perhaps top or sudo perf top. And similarly "cat /sys/kernel/debug/dri/0/i915_gem_objects"?
Comment 9 Lyude Paul 2014-01-13 22:53:14 UTC
(In reply to comment #8)
> What does free report during the stuttering period? Perhaps top or sudo perf
> top. And similarly "cat /sys/kernel/debug/dri/0/i915_gem_objects"?

Okay, hopefully I did this in an acceptable manner.
I tried watching the output of watch -n .1 cat /sys/kernel/debug/dri/0/i915_gem_objects to see if there was any unusual changes during the stuttering period, but there didn't appear to be any. When doing the same with with free -m however, I think I might have seen one extra megabyte allocated every time the screen updated after the stuttering that seemed to be freed the next time watch updated it's output. If you want me to give a try checking the output via ssh as opposed to using the same machine let me know.
Comment 10 Chris Wilson 2014-01-14 12:49:59 UTC
That's a fairly good indicator that we are not allocating new objects at least - but doesn't really help explain the stutters. Another issue might be RPS, in which case 3.13 should be more interesting.
Comment 11 Lyude Paul 2014-02-01 18:55:05 UTC
Hi, I just noticed this got marked as "NEEDINFO", what kind of information do you need me to provide?
Comment 12 Chris Wilson 2014-02-01 19:00:53 UTC
I want you to test the 3.13 kernel to see if this is an RPS effect. Though now I wonder if the BIOS is completely upsetting the RPS/rc6 code... Let's start with 3.13 any how.
Comment 13 Chris Wilson 2014-02-03 10:38:37 UTC
The other thing to test would be whether the effect shows up in micro-benchmarks such as x11perf (-shmput500, -copywinwin500, -compwinwin500, -aa10text, would be reasonable choices to stress memory-bound performance).
Comment 14 Lyude Paul 2014-02-03 16:17:33 UTC
(In reply to comment #12)
> I want you to test the 3.13 kernel to see if this is an RPS effect. Though
> now I wonder if the BIOS is completely upsetting the RPS/rc6 code... Let's
> start with 3.13 any how.

What do you mean by RPS?
Comment 15 Chris Wilson 2014-02-03 16:25:22 UTC
RPS = render power states (otherwise known as GPU turbo). Basically the GPU goes to sleep when idle and tries to run at the lowest power settings (frequency i.e. speed) when busy.
Comment 16 Lyude Paul 2014-04-05 16:56:53 UTC
I've been busy recently with other stuff so I just got the chance to put up an update on this. As it turns out it was an issue with GNOME and not with the video drivers. After updating from 3.8 to 3.10 the issue went away completely.


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.