Bug 22285 - 4500MHD + KMS: Video output freezes upon resume on Thinkpad X301
Summary: 4500MHD + KMS: Video output freezes upon resume on Thinkpad X301
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: Other All
: high major
Assignee: ykzhao
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-14 12:51 UTC by Loïc Minier
Modified: 2009-07-02 07:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
sudo lspci -vvnn output (20.57 KB, text/plain)
2009-06-14 12:52 UTC, Loïc Minier
no flags Details
dmesg (after a couple of suspend/resume/alt-sysrq-k) (71.78 KB, text/plain)
2009-06-14 12:56 UTC, Loïc Minier
no flags Details
Xorg log (28.87 KB, text/x-log)
2009-06-14 12:57 UTC, Loïc Minier
no flags Details
Gzipped GPU dump (80.39 KB, application/x-gzip)
2009-06-15 10:16 UTC, Loïc Minier
no flags Details
GZipped dump of dri/0/i* files in debugfs (84.96 KB, application/x-gzip)
2009-06-15 10:17 UTC, Loïc Minier
no flags Details
restore the modeset for every activated crtc (1.11 KB, patch)
2009-07-02 01:13 UTC, ykzhao
no flags Details | Splinter Review

Description Loïc Minier 2009-06-14 12:51:13 UTC
Hi

The video output on my Thinkpad X301 hangs on suspend / resume when KMS is enabled.

I'm not too interested in researching the non-KMS use case, but in general things seem to work better when I go to console first.

Jesse Barnes did some good debugging on this issue a couple of weeks ago: he has the same chip on a X200s, but doesn't see this issue while running the same (Ubuntu karmic) on the laptops.  Back then I tried 2.6.30 rc5 through rc7, with no luck.

Today, I tried 2.6.30 final with a manually built intel driver from git master.  I still get the issue.  The display is redisplayed upon resume, but no update occurs, caps lock doesn't respond.  Last week, I would SSH into into the box to debug, but killing Xorg would hang the box completely.  Today, I simply Alt-SysRq-K and gdm respawns a Xorg server just fine.

Bye
Comment 1 Loïc Minier 2009-06-14 12:52:10 UTC
Created attachment 26780 [details]
sudo lspci -vvnn output
Comment 2 Loïc Minier 2009-06-14 12:56:39 UTC
Created attachment 26781 [details]
dmesg (after a couple of suspend/resume/alt-sysrq-k)
Comment 3 Loïc Minier 2009-06-14 12:57:12 UTC
Created attachment 26782 [details]
Xorg log
Comment 4 Loïc Minier 2009-06-14 13:03:24 UTC
I tried using metacity in non-composited mode instead of compiz, but it didn't help.

NB: sometimes I get a black screen on resume, and sometimes my desktop; I think it's just gnome-screensaver failing to kick in fast enough, but it could be part of the symptoms of the bug.  In both cases the video output is hung, I don't see a mouse pointer and the caps lock key doesn't work; only alt-sysrq does, not ctrl-alt-fN.
Comment 5 Jesse Barnes 2009-06-15 09:08:10 UTC
If you can ssh in, can you also capture a GPU dump using intel-gpu-tools?  The contents of dri/0/ in debugfs would help too (usually mounted at /sys/kernel/debug with "mount -t debugfs nodev /sys/kernel/debug").

Comment 6 Loïc Minier 2009-06-15 10:14:46 UTC
Trying to cat /sys/kernel/debug/dri/0/* caused cat to hang; I limited to the i* files:
for i in /sys/kernel/debug/dri/0/i*; do echo "== $i =="; sudo cat $i; echo; echo; done > ~lool/dri-0.txt

will attach dumps
Comment 7 Loïc Minier 2009-06-15 10:16:25 UTC
Created attachment 26812 [details]
Gzipped GPU dump
Comment 8 Loïc Minier 2009-06-15 10:17:12 UTC
Created attachment 26813 [details]
GZipped dump of dri/0/i* files in debugfs
Comment 9 Loïc Minier 2009-06-16 03:14:55 UTC
bug #22039 looks very similar.
Comment 10 Loïc Minier 2009-06-23 08:26:37 UTC
NB: The fix from bug #20520 doesn't help.
Comment 11 Jesse Barnes 2009-06-23 16:57:50 UTC
Hopefully this is a dupe of http://bugs.freedesktop.org/show_bug.cgi?id=20520?  Do you still see the issue?  Could also be a dupe of #22383.
Comment 12 Loïc Minier 2009-06-23 17:16:34 UTC
as I said in comment #10, it's sadly not a dupe of bug #20520; I'll check the patch in bug #22383, but it doesn't seem to be a too similar bug.
Comment 13 Jesse Barnes 2009-06-23 17:34:03 UTC
Oh sorry, missed that...  yeah probably a separate issue from the DPMS one too.
Comment 14 ykzhao 2009-07-02 01:13:05 UTC
Created attachment 27320 [details] [review]
restore the modeset for every activated crtc
Comment 15 ykzhao 2009-07-02 01:14:20 UTC
Hi, Loic
    Will you please try the attached patch on the latest linus git tree and see whether the issue still exists?
    Thanks.
Comment 16 Loïc Minier 2009-07-02 07:48:45 UTC
I love you all!  I'm leaving for GUADEC tomorrow with a working suspend/resume now!   :-)


So I built tip of git://git.freedesktop.org/git/xorg/driver/xf86-video-intel (4100abdf5d208bbcbb4ceabad0572c04221443c9) and tip of linux:torvalds/linux-2.6.git (d960eea974f5e500c0dcb95a934239cc1f481cfd) + the patch attached to this bug report (Restore the modeset for every activated CRTC) and:
- that booted
- it seemed to use KMS
- Xorg works and I could suspend resume 3 times in a row

Thanks!

It feels slighly slower for some reason; in the past, I think I would get the Xorg image as soon as I'd pop the screen open (albeit frozen).  The console ttys seem to be using highres and dmesg says:
[    3.450968] [drm] LVDS-8: set mode 1440x900 c
during boot, so I'm pretty sure I'm using KMS, but my custom kernel behaves a bit differently from the distro kernel.

Anyway, this is all fine and fixes the bug; I'm closing it, let me know if I should have kept it open
Comment 17 Loïc Minier 2009-07-02 07:49:27 UTC
(Oh and xorg intel git tip included the fix of bug #22383)


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.