Bug 21576 - [i945gm] UXA failed resume after hibernate (UXA bug)
[i945gm] UXA failed resume after hibernate (UXA bug)
Status: RESOLVED FIXED
Product: xorg
Classification: Unclassified
Component: Driver/intel
7.4 (2008.09)
x86 (IA32) Linux (All)
: high major
Assigned To: ykzhao
Xorg Project Team
: NEEDINFO
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-05 13:48 UTC by Bryce Harrington
Modified: 2009-07-12 18:27 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
XorgLog.txt (20.74 KB, text/plain)
2009-05-05 13:49 UTC, Bryce Harrington
no flags Details
XorgConf.txt (1.10 KB, text/plain)
2009-05-05 13:51 UTC, Bryce Harrington
no flags Details
kdm.log (498.72 KB, text/x-log)
2009-05-05 13:51 UTC, Bryce Harrington
no flags Details
20090504-Xorg.log.1 (36.78 KB, text/plain)
2009-05-05 13:52 UTC, Bryce Harrington
no flags Details
20090504-Xorg.log.2 (18.55 KB, application/octet-stream)
2009-05-05 13:52 UTC, Bryce Harrington
no flags Details
Restore the modeset for every activated crtc (1.11 KB, patch)
2009-07-02 01:16 UTC, ykzhao
no flags Details | Splinter Review
dmesg_after_w_patch (57.03 KB, text/plain)
2009-07-05 21:40 UTC, Oleksij Rempel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bryce Harrington 2009-05-05 13:48:45 UTC
Forwarding this bug from a ubuntu reporter:
https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/352207

[Problem]
After enabling UXA, X cannot resume after hibernate, but could resume after suspend.

If I go to text console from X (CTRL-ALT-F1 for example) then back to X (CTRL-ALT-F7) then the screen will just go blank. So I don't think that X failed to load, it just failed to show anything at all.

Here I attached 2 Xorg.log, 1 after waking-up from hibernation (Xorg.log.1),
the second one after going back from text mode (Xorg.log.2)

 distro:             Ubuntu
 architecture:       i686
 kernel:             2.6.28-11-generic
 xserver-xorg:       1:7.4~5ubuntu16
 mesa:               7.3-1ubuntu4
 libdrm:             2.4.5-0ubuntu3
 -intel:             2:2.6.3-0ubuntu2
 -ati:               1:6.12.1-0ubuntu1

The 2.7.0 driver from x-updates was also tested and found to have the same issue.

[lspci]
00:00.0 Host bridge [0600]: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub [8086:27a0] (rev 03)
	Subsystem: Micro-Star International Co., Ltd. Device [1462:0571]
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller [8086:27a2] (rev 03)
	Subsystem: Micro-Star International Co., Ltd. Device [1462:0571]
Comment 1 Bryce Harrington 2009-05-05 13:49:18 UTC
Created attachment 25500 [details]
XorgLog.txt
Comment 2 Bryce Harrington 2009-05-05 13:51:28 UTC
Created attachment 25501 [details]
XorgConf.txt
Comment 3 Bryce Harrington 2009-05-05 13:51:54 UTC
Created attachment 25502 [details]
kdm.log
Comment 4 Bryce Harrington 2009-05-05 13:52:18 UTC
Created attachment 25503 [details]
20090504-Xorg.log.1
Comment 5 Bryce Harrington 2009-05-05 13:52:37 UTC
Created attachment 25504 [details]
20090504-Xorg.log.2
Comment 6 Gordon Jin 2009-05-05 19:10:50 UTC
Yifei, can you reproduce this on 945GM?
Comment 7 Gordon Jin 2009-05-11 00:29:56 UTC
We can't reproduce it with upstream code on our 945GM.
Comment 8 Jesse Barnes 2009-05-11 11:21:26 UTC
Adjusting severity: crashes & hangs should be marked critical.
Comment 9 Jesse Barnes 2009-05-11 12:00:19 UTC
Also I'm a little confused about the summary; it sounds like regular VT switch was broken as well?  Or was it just VT switch after resuming from hibernate?

Anyway, please try upstream bits as Gordon suggests and let us know.  Thanks.
Comment 10 Yifei Chen 2009-05-12 01:16:23 UTC
Still, we cannot reproduce it on our 945GM with:
distro:          Fedora 9
Libdrm:                (master)1bae8844cafd70f6196116f6e84b0f36c069e976
Mesa:           (master)53c2cc8fefa07723fc456d94eda292e201c41dae
xserver:                (master)c2b668e6fff11c52f2a3f0dc3f4d1fc2c5bcf3e6
xf86_video_intel:               (master)8d27247829fe4f55691ce68f9f4b14810fb34b32
kernel:                2.6.30-rc4

hibernate works fine, and vt switch works fine too after/before hibernate.
Comment 11 Jesse Barnes 2009-06-23 12:17:29 UTC
Yeah, this works well for me on an AspireOne...
Comment 12 Jesse Barnes 2009-06-23 12:22:03 UTC
Spoke too soon.. my machine hard hung shortly after returning from hibernate...  investigating.
Comment 13 Jesse Barnes 2009-06-23 12:49:35 UTC
Ah no I think something else was broken in my environment (was running some debug code).  Resume from hibernate appears ok with current bits.
Comment 14 Jesse Barnes 2009-06-23 13:29:42 UTC
Arg no, right after I hit commit on my last comment it hung again...  
Comment 15 ykzhao 2009-06-29 00:56:06 UTC
(In reply to comment #14)
> Arg no, right after I hit commit on my last comment it hung again...  
How about doing the hibernation/resume under the console mode and then start X?Does the system still hang after starting X?
Thanks.

Comment 16 ykzhao 2009-07-02 01:16:16 UTC
Created attachment 27321 [details] [review]
Restore the modeset for every activated crtc

Will you please try the attached patch on the latest linus git tree and see whether the issue still exists?
   
Thanks.
Comment 17 ykzhao 2009-07-05 18:58:30 UTC
Ping Bryce?
Comment 18 Oleksij Rempel 2009-07-05 21:38:12 UTC
This patch solved same resume issue on my pc (intel DG45ID)
Comment 19 Oleksij Rempel 2009-07-05 21:40:55 UTC
Created attachment 27404 [details]
dmesg_after_w_patch
Comment 20 Oleksij Rempel 2009-07-05 21:47:59 UTC
I have other bug related to resume on this pc.
http://bugzilla.kernel.org/show_bug.cgi?id=13710
Comment 21 Bryce Harrington 2009-07-06 20:18:02 UTC
ykzhav, note that I forwarded this from a ubuntu reporter, ari197.  I am not experiencing this bug myself.

I have asked ari197 to subscribe to this bug, and now have provided .debs of the git version of the driver including your patch for them to test with.
Comment 22 ykzhao 2009-07-09 22:12:57 UTC
According to the discussion/comments I make some changes about the patch in comment #16. Now the patch set is already sent to intel-gfx mailing list.
    >http://lists.freedesktop.org/archives/intel-gfx/2009-July/003255.html
    >http://lists.freedesktop.org/archives/intel-gfx/2009-July/003256.html
    >http://lists.freedesktop.org/archives/intel-gfx/2009-July/003257.html

    Patch 1: resumes the modesetting for every activated crtc
    Patch 2: disable the unused connectors while resuming the modesetting
    Patch 3: Split the suspend/resume into KMS/UMS path to avoid resuming the modesetting registers twice in KMS mode.

thanks.
Comment 23 ykzhao 2009-07-12 18:27:58 UTC
Since the mentioned patch set is already shipped, the bug will be marked as resolved.
   >Patch 1/3: commit 354ff96772540d2e836194bf14dd9c05c274055c
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Wed Jul 8 14:13:12 2009 +0800
    drm/i915: Restore the KMS modeset for every activated CRTC
   >Patch 2/3: commit af4fcb574efa90373b02ae0bb8b54d710c32eeb4
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Wed Jul 8 14:13:13 2009 +0800
    drm: Disable the unused connectors explicitly when resuming with KMS.
   >Patch 3/3: commit fccdaba4317604602e5802c3afc4021f2fb8132e
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Wed Jul 8 14:13:14 2009 +0800
    drm/i915: Avoid saving/restore the modesetting registers twice in KMS mode

   If the issue still exists after the test, please reopen it.

   Thanks.