https://bugs.freedesktop.org/show_bug.cgi?id=60439
Priority: medium Bug ID: 60439 Assignee: dri-devel@lists.freedesktop.org Summary: Suspend/resume broken for cayman since kernel >=3.7.0 (maybe rc too) Severity: major Classification: Unclassified OS: Linux (All) Reporter: h.judt@gmx.at Hardware: x86-64 (AMD64) Status: NEW Version: XOrg CVS Component: DRM/Radeon Product: DRI
In all kernels newer than 3.6.x, suspend & resume is broken for cayman. It works fine in 3.6.11 and lower. Last tested release where issue is reproducible is 3.8.0-rc6.
Suspend seems to work ok as nothing hangs, but on resume the console appears with a blinking cursor at the top left corner, then after some seconds the video signal seems to be turned off and the monitor goes into powersave mode. SSH doesn't work, machine seems frozen. Hello, reset button!
I can bisect but would appreciate it if you could tell me which commits count as possible bad candidates.
(Also I noticed that in 3.8.0-rc6, the compiz-0.8 splash screen is garbled, which it is not in 3.7.x and 3.6.x, but that's a different issue.)
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #1 from Alex Deucher agd5f@yahoo.com --- Can you bisect? I can't think of any commits in particular that would cause an issue with suspend and resume.
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #2 from Harald Judt h.judt@gmx.at --- Seems to have been introduced by a change between 3.7-rc1 and 3.7-rc2 (ddffeb8c4d0331..6f0c0580b7). Don't have time to track that further now. Maybe it doesn't have to do with suspend/resume directly, but is caused by it as some sort of side-effect?
The following commits fall within that range (only one specific to cayman), I guess I can skip some of them:
bd6126b - drm: radeon: fix printk format warning (vor 4 Monaten) 8ad33cd - drm/radeon: fix spelling typos in debugging output 0829184 - drm/radeon: Don't destroy I2C Bus Rec in radeon_ext_tmds_enc_destroy(). 3691fee - drm/radeon: check if pcie gen 2 is already enabled (v2) c1a7ca0 - drm/radeon/cayman: set VM max pfn at MC init 13e55c3 - drm/radeon: separate pt alloc from lru add d72d43c - drm/radeon: don't add the IB pool to all VMs v2 90a51a3 - drm/radeon: allocate page tables on demand v4 23d4f1f - drm/radeon: update comments to clarify VM setup (v2) 29dbe3b - drm/radeon: allocate PPLLs from low to high cd23492 - drm/radeon: fix compilation with backlight disabled<Alex Deucher> a187193 - drm/radeon: use %zu for formatting size_t
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #3 from Michel Dänzer michel@daenzer.net --- (In reply to comment #2)
The following commits fall within that range (only one specific to cayman), I guess I can skip some of them:
Please don't. In the best case, you save a couple of tests, in the worst case the bisection result is invalid and you have to start over again.
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #4 from Harald Judt h.judt@gmx.at --- I will bisect the week after the next, before I will not have access to that machine. I'd rather avoid bisecting standby/resume problems too much because that could possibly cause data loss, and it is not possible to do in a VM.
BTW: I do not have such issues on a laptop with a ATI RV620 [Mobility Radeon HD 3400 Series], so this only seems to affect cayman.
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #5 from Harald Judt h.judt@gmx.at --- I did bisect between ddffeb8c4d0331..6f0c0580b7, skipping only "23d4f1f - drm/radeon: update comments to clarify VM setup (v2)" which is a trivial step IMO. The offending commit is this:
commit 90a51a329258e3c868f6f4c1fb264ca01c590c57 Author: Christian König deathsimple@vodafone.de Date: Tue Oct 9 13:31:17 2012 +0200
drm/radeon: allocate page tables on demand v4
Based on Dmitries work, but splitting the code into page directory and page table handling makes it far more readable and (hopefully) more reliable.
Allocations of page tables are made from the SA on demand, that should still work fine since all page tables are of the same size.
Also using the fact that allocations from the SA are mostly continuously (except for end of buffer wraps and under very high memory pressure) to group updates send to the chipset specific code into larger chunks.
v3: mostly a rewrite of Dmitries previous patch. v4: fix some typos and coding style
Signed-off-by: Dmitry Cherkasov Dmitrii.Cherkasov@amd.com Signed-off-by: Christian König deathsimple@vodafone.de Tested-by: Michel Dänzer michel.daenzer@amd.com Reviewed-by: Alex Deucher alexander.deucher@amd.com Signed-off-by: Alex Deucher alexander.deucher@amd.com
Trying to revert this commit for 3.7-rc2 using git revert failed.
https://bugs.freedesktop.org/show_bug.cgi?id=60439
Alexandre Demers alexandre.f.demers@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.freedesktop.or | |g/show_bug.cgi?id=56139
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #6 from Alexandre Demers alexandre.f.demers@gmail.com --- I think this is the same as bug 56139. I'll be watching what's going on here and I'm ready to test if anything comes out.
https://bugs.freedesktop.org/show_bug.cgi?id=60439
Harald Judt h.judt@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Suspend/resume broken for |Suspend/resume broken for |cayman since kernel >=3.7.0 |cayman with |(maybe rc too) |90a51a329258e3c868f6
--- Comment #7 from Harald Judt h.judt@gmx.at --- What makes you think bug 56139 and this one are related? Can you reproduce the suspend/resume problems introduced by this commit?
https://bugs.freedesktop.org/show_bug.cgi?id=60439
Alex Deucher agd5f@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexandre.f.demers@gmail.co | |m
--- Comment #8 from Alex Deucher agd5f@yahoo.com --- *** Bug 56139 has been marked as a duplicate of this bug. ***
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #9 from Alex Deucher agd5f@yahoo.com --- Does switching to another VT before suspending help?
https://bugs.freedesktop.org/show_bug.cgi?id=60439
Christian König deathsimple@vodafone.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #10 from Christian König deathsimple@vodafone.de --- Going to look into it as soon as I have time. We are probably just missing to reset something after resume.
Christian.
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #11 from Dmitry Cherkassov dcherkassov@gmail.com --- Hi.
I can't reproduce this bug on cayman with 3.8-rc3 (using pm-suspend). Resuming works.
What software do you use? I've used xmonad launched via legacy startx while testing that.
Can you fire up a simple twm session without compiz, etc stuff and see how it goes? Is it possible to get dmesg output (via serial cable or smth)?
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #12 from Alexandre Demers alexandre.f.demers@gmail.com --- (In reply to comment #11)
Hi.
I can't reproduce this bug on cayman with 3.8-rc3 (using pm-suspend). Resuming works.
What software do you use? I've used xmonad launched via legacy startx while testing that.
Can you fire up a simple twm session without compiz, etc stuff and see how it goes? Is it possible to get dmesg output (via serial cable or smth)?
See bug 56139, comments 51 and 52. Suspending/resuming from console or XFCE don't trigger the bug. However, doing the same under KDE or Gnome-Shell does exhibit it.
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #13 from Alex Deucher agd5f@yahoo.com --- Created attachment 76349 --> https://bugs.freedesktop.org/attachment.cgi?id=76349&action=edit possible fix
This patch should fix the issue.
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #14 from Alexandre Demers alexandre.f.demers@gmail.com --- (In reply to comment #13)
Created attachment 76349 [details] [review] possible fix
This patch should fix the issue.
It does over here.
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #15 from Harald Judt h.judt@gmx.at --- Created attachment 76397 --> https://bugs.freedesktop.org/attachment.cgi?id=76397&action=edit ogv video showing corruption (1.4MiB)
I confirm it fixes the problem, thanks for the patch.
However, it still doesn't fix bug #44772, can there be anything else missing? Symptoms are almost the same, except #44772 only occurs (sporadically) when hibernating/resuming, not on suspend/resume.
Further, corruption of the compiz splash screen is not fixed with this patch (as expected of course). It appears scrambled in some checkerboard fashion, see the attached ogv I recorded with recordmydesktop. It happens with 3.8.0 kernel, not sure about 3.7 (I do not think so) and definitely not with 3.6, all other components being unchanged and at current git.
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #16 from Alex Deucher agd5f@yahoo.com --- (In reply to comment #15)
Further, corruption of the compiz splash screen is not fixed with this patch (as expected of course). It appears scrambled in some checkerboard fashion, see the attached ogv I recorded with recordmydesktop. It happens with 3.8.0 kernel, not sure about 3.7 (I do not think so) and definitely not with 3.6, all other components being unchanged and at current git.
That issue is probably bug 60802.
https://bugs.freedesktop.org/show_bug.cgi?id=60439
--- Comment #17 from Alexandre Demers alexandre.f.demers@gmail.com --- (In reply to comment #16)
(In reply to comment #15)
Further, corruption of the compiz splash screen is not fixed with this patch (as expected of course). It appears scrambled in some checkerboard fashion, see the attached ogv I recorded with recordmydesktop. It happens with 3.8.0 kernel, not sure about 3.7 (I do not think so) and definitely not with 3.6, all other components being unchanged and at current git.
That issue is probably bug 60802.
According to the attached ogv, it is exactly what I'm experiencing in bug 60802 and it should be tracked there, not in the current bug.
https://bugs.freedesktop.org/show_bug.cgi?id=60439
Florian Mickler florian@mickler.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |florian@mickler.org
--- Comment #18 from Florian Mickler florian@mickler.org --- A patch referencing this bug report has been merged in Linux v3.9-rc4:
commit fa3daf9aa74a3ac1c87d8188a43d283d06720032 Author: Alex Deucher alexander.deucher@amd.com Date: Mon Mar 11 15:32:26 2013 -0400
drm/radeon: fix S/R on VM systems (cayman/TN/SI)
https://bugs.freedesktop.org/show_bug.cgi?id=60439
Michel Dänzer michel@daenzer.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED
--- Comment #19 from Michel Dänzer michel@daenzer.net --- Resolving per comment #18.
dri-devel@lists.freedesktop.org