Bug 18049

Summary: [945GM DRI2] S3 resume fails on eeepc/X200s
Product: xorg Reporter: Li Peng <peng.li>
Component: Driver/intelAssignee: Eric Anholt <eric>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: critical    
Priority: high CC: jeremy, jonathon, lure, shuber
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 18858    
Attachments:
Description Flags
xorg log
none
Xorg.0.log on X200s with 2.7.0 driver none

Description Li Peng 2008-10-13 18:57:26 UTC
Hardware platform : eeePC

Code 
===========================================================
git://anongit.freedesktop.org:/git/xorg/proto/dri2proto (master branch)
git://anongit.freedesktop.org:/git/mesa/drm (master)
git://anongit.freedesktop.org:/git/mesa/mesa (master)
git://anongit.freedesktop.org:/git/xorg/xserver (master with dri2 enabled)
git://anongit.freedesktop.org:/git/xorg/driver/xf86-video-intel (dri2 branch)

Reproduce Steps(steps,current result, reproduce possibility)
===========================================================
(1) boot system
(2) launch terminal
(3) run command "echo mem > /sys/power/state" to suspend the system
(4) push power button the resume the system

Expected result:
===========================================================
System could resume back successfully

Current result:
===========================================================
System will either fail to resume back or will resume back but hang.
Comment 1 Li Peng 2008-10-13 18:59:31 UTC
I tried suspend/resume without X and it works well. So it should be the X driver issue.
Comment 2 Li Peng 2008-10-13 19:11:22 UTC
change to high priority 
Comment 3 Li Peng 2008-10-13 19:13:26 UTC
I disabled tiling and enabled UXA
Comment 5 Li Peng 2008-10-13 20:09:12 UTC
Created attachment 19640 [details]
xorg log

xorg log that shows batch buffer error at resuming time
Comment 6 Gordon Jin 2008-10-14 00:12:55 UTC
So the key error message is:
i830_batchbuffer.h:56: intel_batch_emit_dword: Assertion `pI830->batch_ptr != ((void *)0)' failed.

S3 works fine if not using DRI2, right?

btw, don't use git://anongit.freedesktop.org:/git/mesa/drm. Intel developers have stopped drm development on that tree. Please just use drm in Eric's drm-intel-next tree.
Comment 7 Li Peng 2008-10-14 00:20:45 UTC
(In reply to comment #6)
> So the key error message is:
> i830_batchbuffer.h:56: intel_batch_emit_dword: Assertion `pI830->batch_ptr !=
> ((void *)0)' failed.
> 
> S3 works fine if not using DRI2, right?
> 
> btw, don't use git://anongit.freedesktop.org:/git/mesa/drm. Intel developers
> have stopped drm development on that tree. Please just use drm in Eric's
> drm-intel-next tree.
> 

Yes, S3 works fine without DRI2
I am using Eric's drm-intel-next tree for drm driver
for libdrm, it is from git://anongit.freedesktop.org:/git/mesa/drm
Comment 8 Gordon Jin 2008-10-14 00:39:59 UTC
(In reply to comment #7)
> I am using Eric's drm-intel-next tree for drm driver
> for libdrm, it is from git://anongit.freedesktop.org:/git/mesa/drm

That's correct.
Comment 9 Jeremy Fitzhardinge 2008-11-11 16:50:09 UTC
I'm seeing this as well, on a Thinkpad X200.  I've also reported it as https://bugzilla.redhat.com/show_bug.cgi?id=467318

If I switch to a text console before suspending, then the resume works.  When I switch to X, there's still a high chance it will hang shortly after, but sometimes it seems to work.
Comment 10 Li Peng 2008-11-11 21:48:54 UTC
(In reply to comment #9)
> I'm seeing this as well, on a Thinkpad X200.  I've also reported it as
> https://bugzilla.redhat.com/show_bug.cgi?id=467318
> 
> If I switch to a text console before suspending, then the resume works.  When I
> switch to X, there's still a high chance it will hang shortly after, but
> sometimes it seems to work.
> 

you probabaly need this patch that fix the suspend/resume issue on Thinkpad X200

http://lists.freedesktop.org/archives/intel-gfx/2008-November/000508.html
Comment 11 Jeremy Fitzhardinge 2008-11-12 07:28:22 UTC
Yes, that patch seems to have done the trick.  I can resume properly on the X200 now.
Comment 12 Eric Anholt 2008-12-05 12:29:24 UTC
commit 261c20a479f6ec1e94c2ba801323072227cc3ade
Author: Eric Anholt <eric@anholt.net>
Date:   Fri Dec 5 12:13:26 2008 -0800

    uxa: Add in EnableDisableFBAccess handling like examodule.c did.
    
    This fixes assertion failures when rendering text while VT switched.
Comment 13 Luka Renko 2009-03-25 23:52:15 UTC
I still get this assertion on Kubuntu Jaunty with version 2.6.3-0ubuntu2
See bug:
https://launchpad.net/bugs/347587

Can somebody comment on this, or should I open new bug.
Comment 14 Luka Renko 2009-03-26 03:38:23 UTC
As you can see from Ubuntu reports, this problem is reproducible with the following cards:
- 4500MHD (8086:2a42) - ThinkPad X200s
- 855GM - ThinkPad X40
- X3100
Comment 15 Luka Renko 2009-03-27 10:49:44 UTC
I am re-opening this bug due to many reports that UXA in Ubuntu/Jaunty still has this problem. I have verified and the mentioned fix is part of Ubuntu package.
Comment 16 Luka Renko 2009-05-01 22:54:42 UTC
I can still reproduce this problem with 2.7.0 driver.

    *

HW: ThinkPad X200s, Intel 4500MHD
SW: up-to-date Kubuntu Jaunty with intel 2:2.7.0-1ubuntu1~xup~1

I can still reproduce this bug with 2:2.7.0-1ubuntu1~xup~1 version of intel driver, but only when suspend is done on lid close. I have performed the following suspend/resume tests:
- sudo pm-suspend: OK
- Supend from KDE's PowerDevil menu: OK
- Auto-suspend on lid close (when on battery): X-server crash

This is extract from /var/log/kdm.log:

X.Org X Server 1.6.0
Release Date: 2009-2-25
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-15-server x86_64 Ubuntu
Current Operating System: Linux lure 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009 x86_64
Build Date: 09 April 2009 02:11:54AM
xorg-server 2:1.6.0-0ubuntu14 (buildd@crested.buildd)
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat May 2 07:09:14 2009
(==) Using config file: "/etc/X11/xorg.conf"
Setting master
Dropping master
Setting master
Dropping master
Setting master
Dropping master
X: ../../src/i830_batchbuffer.h:78: intel_batch_emit_dword: Assertion `pI830->batch_ptr != ((void *)0)' failed.

X.Org X Server 1.6.0
Release Date: 2009-2-25
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-15-server x86_64 Ubuntu
Current Operating System: Linux lure 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009 x86_64
Build Date: 09 April 2009 02:11:54AM
xorg-server 2:1.6.0-0ubuntu14 (buildd@crested.buildd)
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat May 2 07:14:04 2009
(==) Using config file: "/etc/X11/xorg.conf"
Setting master
Comment 17 Luka Renko 2009-05-01 22:55:51 UTC
Created attachment 25362 [details]
Xorg.0.log on X200s with 2.7.0 driver
Comment 18 Jesse Barnes 2009-05-11 11:21:33 UTC
Adjusting severity: crashes & hangs should be marked critical.
Comment 19 Eric Anholt 2009-05-12 17:37:53 UTC
Luka: Please open new bugs for new issues, otherwise you just confuse things.  But your bug (UXA on non-GEM kernel) should be fixed in master or 2.7.99.1 anyway.
Comment 20 Luka Renko 2009-05-13 07:07:11 UTC
Eric, sorry for confusion. Will try to get latest driver and try to reproduce and will open bug if issue is still there.

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.