Bug 59057 - Black screen after resume from s2ram
Summary: Black screen after resume from s2ram
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 57777 58729 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-05 15:06 UTC by Pontus Fuchs
Modified: 2013-08-07 22:30 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Kernel logs 3.8-rc2 and 3.7.0 (52.91 KB, application/x-gzip)
2013-01-05 19:27 UTC, Pontus Fuchs
no flags Details
3.7.0 (73.50 KB, text/plain)
2013-01-05 20:33 UTC, Marcin Slusarz
no flags Details
3.8.0-rc2 (70.29 KB, text/plain)
2013-01-05 20:33 UTC, Marcin Slusarz
no flags Details
3.8.0-rc2+drm-nv50-disp-fix-resume-from-s2ram-for-analog-outpu.txt (62.29 KB, text/plain)
2013-01-05 20:33 UTC, Marcin Slusarz
no flags Details
3.7.0 log with drm.debug=4 (117.41 KB, text/plain)
2013-01-06 20:23 UTC, Pontus Fuchs
no flags Details
3.8.0-rc2+fix with nouveau.debug=trace (708.16 KB, text/plain)
2013-01-06 20:26 UTC, Pontus Fuchs
no flags Details
3.7.0 log with drm.debug=2 nouveau.debug=trace (601.65 KB, text/plain)
2013-01-06 21:31 UTC, Pontus Fuchs
no flags Details
possible fix (573 bytes, patch)
2013-01-06 23:00 UTC, Marcin Slusarz
no flags Details | Splinter Review
possible fix v2 (469 bytes, patch)
2013-01-10 19:56 UTC, Marcin Slusarz
no flags Details | Splinter Review
possible fix v3 (3.80 KB, patch)
2013-01-12 15:58 UTC, Marcin Slusarz
no flags Details | Splinter Review
3.8.0-rc4 dmesg with nouveau.debug=trace (920.29 KB, text/plain)
2013-01-23 16:27 UTC, J Binder
no flags Details
Trace dmesg for successful suspend/resume with 3.8.0+ built on 21.2.2013 (910.96 KB, text/plain)
2013-02-24 19:31 UTC, J Binder
no flags Details

Description Pontus Fuchs 2013-01-05 15:06:28 UTC
Starting with 3.8rc1 I get a black screen when resuming after suspend. 
The kernel is alive because I can switch to VT1 and reboot with 
ctrl-alt-delete.

I bisected the problem down to this commit:

186ecad21: drm/nv50/disp: move remaining interrupt handling into core

Hardware is 8400M GS (10de:0427) in a Dell XPS M1330.

I see this in my kernel log after resume:

nouveau E[     PFB][0000:01:00.0] trapped read at 0x002001a020 on 
channel 0x00007b23 SEMAPHORE_BG/PFIFO_READ/00 reason: PAGE_NOT_PRESENT
nouveau E[    1177] failed to idle channel 0xcccc0000
[TTM] Failed to expire sync object before buffer eviction
[TTM] Failed to expire sync object before buffer eviction
[TTM] Failed to expire sync object before buffer eviction
Comment 1 Marcin Slusarz 2013-01-05 15:13:47 UTC
Are symptoms exactly the same with and without the patch from bug 58729?

Please attach full dmesg from 3.8-rcX and 3.7.
Comment 2 Pontus Fuchs 2013-01-05 19:27:03 UTC
Created attachment 72556 [details]
Kernel logs 3.8-rc2 and 3.7.0

Logs for working and non working kernels.

Commit "drm/nv50/disp: fix resume from s2ram for analog output" does not change the behaviour.
Comment 3 Pontus Fuchs 2013-01-05 19:29:13 UTC
I noticed that the machine seems very sluggish after the resume. A little hard to tell how slow because the screen is black, but I "feel" that rebooting takes a very long time.
Comment 4 Marcin Slusarz 2013-01-05 20:33:18 UTC
Created attachment 72566 [details]
3.7.0
Comment 5 Marcin Slusarz 2013-01-05 20:33:39 UTC
Created attachment 72567 [details]
3.8.0-rc2
Comment 6 Marcin Slusarz 2013-01-05 20:33:54 UTC
Created attachment 72568 [details]
3.8.0-rc2+drm-nv50-disp-fix-resume-from-s2ram-for-analog-outpu.txt
Comment 7 Marcin Slusarz 2013-01-05 20:34:36 UTC
Quoting http://nouveau.freedesktop.org/wiki/Bugs:
"Please, do not compress files you attach to bug reports, especially plain text files such as logs, unless the file is so huge bugzilla refuses to take it. Gzipping files makes taking a quick look impossible".
Comment 8 Marcin Slusarz 2013-01-05 20:37:50 UTC
Now, can you verify that with commit 186ecad21 and the fix from bug 58729 you still see black screen on resume? I'm asking because I think you hit 2 issues and you bisected the first one. If above combination work, can you bisect between 186ecad21 and 3.8rc1, applying fix from bug 58729 at each bisection step?
Comment 9 Pontus Fuchs 2013-01-05 22:33:01 UTC
(In reply to comment #8)
> Now, can you verify that with commit 186ecad21 and the fix from bug 58729
> you still see black screen on resume? I'm asking because I think you hit 2
> issues and you bisected the first one. If above combination work, can you
> bisect between 186ecad21 and 3.8rc1, applying fix from bug 58729 at each
> bisection step?

I tried 186ecad21 + "drm/nv50/disp: fix resume from s2ram for analog output" but no luck. Still black screen :(
Comment 10 Marcin Slusarz 2013-01-05 23:34:16 UTC
Please attach dmesg:
from 3.7 with drm.debug=4
from 3.8-rc2 (+patch) with nouveau.debug=trace
Comment 11 Pontus Fuchs 2013-01-06 20:23:45 UTC
Created attachment 72600 [details]
3.7.0 log with drm.debug=4
Comment 12 Pontus Fuchs 2013-01-06 20:26:31 UTC
Created attachment 72601 [details]
3.8.0-rc2+fix with nouveau.debug=trace
Comment 13 Marcin Slusarz 2013-01-06 20:54:34 UTC
Oh, I looked at wrong kernel tree - please attach kernel log from 3.7 with drm.debug=2 nouveau.debug=trace.
Comment 14 Pontus Fuchs 2013-01-06 21:31:34 UTC
Created attachment 72602 [details]
3.7.0 log with drm.debug=2 nouveau.debug=trace
Comment 15 Marcin Slusarz 2013-01-06 23:00:10 UTC
Created attachment 72603 [details] [review]
possible fix

Does it make a difference?
Comment 16 Pontus Fuchs 2013-01-07 19:58:43 UTC
(In reply to comment #15)
> Created attachment 72603 [details] [review] [review]
> possible fix
> 
> Does it make a difference?

I tried this patch on top of 3.8rc2 and 3.8rc2+"drm/nv50/disp: fix resume from s2ram for analog output" but no improvement :(

I use only the laptop's panel. I have no external monitor.
Comment 17 Marcin Slusarz 2013-01-07 21:38:23 UTC
*** Bug 58729 has been marked as a duplicate of this bug. ***
Comment 18 Marcin Slusarz 2013-01-10 19:56:21 UTC
Created attachment 72802 [details] [review]
possible fix v2

What about this one?
Comment 19 Marcin Slusarz 2013-01-10 20:18:19 UTC
Disregard this patch, please.
Comment 20 Marcin Slusarz 2013-01-12 15:58:37 UTC
Created attachment 72906 [details] [review]
possible fix v3

Please test this one.
Comment 21 Pontus Fuchs 2013-01-13 09:15:33 UTC
(In reply to comment #20)
> Created attachment 72906 [details] [review] [review]
> possible fix v3
> 
> Please test this one.

Tested on top of 3.8-rc3. No improvement seen.
Comment 22 J Binder 2013-01-23 16:27:08 UTC
Created attachment 73533 [details]
3.8.0-rc4 dmesg with nouveau.debug=trace

Still the same situation with post-3.8.0-rc4 from nouveau git master.
Verbose dmesg attached.
Comment 23 Alin M Elena 2013-02-20 22:52:40 UTC
this made it to 3.8.0
Comment 24 Alin M Elena 2013-02-21 11:23:13 UTC
*** Bug 57777 has been marked as a duplicate of this bug. ***
Comment 25 Alin M Elena 2013-02-21 11:30:38 UTC
Just to summarise the hardware on which this was confirmed

Hardware is 8400M GS (10de:0427) in a Dell XPS M1330.

nvidia 320m in a macbook pro
04:00.0 VGA compatible controller: NVIDIA Corporation Device 08a0 (rev a2) (prog-if 00 [VGA controller])
        Subsystem: Apple Inc. Device 00c2
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at d2000000 (32-bit, non-prefetchable) [size=16M]
        Memory at c0000000 (64-bit, prefetchable) [size=256M]
        Memory at d0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at 1000 [size=128]
        Expansion ROM at d3000000 [disabled] [size=128K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [e0] Vendor Specific Information: Len=14 <?>
        Kernel driver in use: nouveau
Comment 26 Sven 2013-02-21 17:25:59 UTC
My Laptop (Dell Latitude E6410, nvidia 3100M) is affected too. Let me know if you need anyting.
Comment 27 Alin M Elena 2013-02-21 20:29:31 UTC
some success to be reported...

using nouveau from git master (today's version) I managed to sleep and wake up and the screen came up correctly...


however as I use kde I had to disable desktop effects as today's master does not seem to login in kde if they are active...

todays master was compiled against kernel 3.8 desktop flavour.
Comment 28 Sven 2013-02-23 03:07:55 UTC
(In reply to comment #27)
> using nouveau from git master (today's version) I managed to sleep and wake
> up and the screen came up correctly...

What version was the latest that failed? Did you spot any particular commit between the two versions that might be the cause for why it's working again? I really need to get this fixed. It's very annoying.
Comment 29 J Binder 2013-02-24 19:31:04 UTC
Created attachment 75454 [details]
Trace dmesg for successful suspend/resume with 3.8.0+ built on 21.2.2013

Latest commit for this build is 2fee6f58d23e7bc2b8d9c599ae1353684043942a.

As in comment #27, suspen/resume works fine.
KDE login ist problematic as it freezes the graphics driver sone of the time.

Suspend/resume and logging in after that worked fine, though, which is what the attached dmesg shows.
Comment 30 Alin M Elena 2013-02-24 20:07:04 UTC
+J Binder

my kde freezes only if in desktop effects (on) I use native with opengl as opposite to raster.

Alin
Comment 31 Pontus Fuchs 2013-02-26 08:25:35 UTC
I tried compling git://anongit.freedesktop.org/nouveau/linux-2.6 / master today and suspend / resume now works fine. I too had to disable desktop effects.
Comment 32 Alin M Elena 2013-02-26 08:33:19 UTC
i have discovered that with the latest git... starting vlc makes things to freeze. can anyone confirm?


Alin
Comment 33 J Binder 2013-02-26 11:38:14 UTC
commit e5a58edc94a20a7ef4b7db67c166c4ca0588bad0
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Sat Feb 16 13:49:21 2013 +1000

    drm/nv50-/disp: 0x0000 is a valid udisp config value
    
    Return an out-of-range value instead to signal a failure from
    exec_clkcmp().
    
    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


is the first commit where s2ram works for me.
Comment 34 Alin M Elena 2013-03-04 18:04:56 UTC
I have tested it today with kernel 3.8.1 and suspend seems to work correctly... at least with an external display attached both lcd and it wake up.

if someone can confirm it too.. maybe we shall close it as solved?

Alin
Comment 35 Pontus Fuchs 2013-03-11 19:57:13 UTC
Suspend / Resume working again with Linus' master git.


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.