[i4500MHD] Kubuntu: X asserts on pI830->batch_ptr != 0 on resume from suspend (UXA bug)

Bug #347587 reported by Luka Renko on 2009-03-23
78
This bug affects 7 people
Affects Status Importance Assigned to Milestone
xf86-video-intel
Fix Released
Critical
xserver-xorg-video-intel (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-intel

SW: Kubuntu Jaunty up-to-date
HW: ThinkPad x200s with Intel 4500MHD graphics

When Suspend is done by PowerDevil (close of lid, selecting Suspend action) and I perform resume, I get back to KDM login dialog, instead of back to my KDE session. This is reproducible.
If I perform suspend from command line (Konsole) with "sudo pm-suspend" command, resume works w/o problem.

I have noticed this error in /var/log/kdm.log:
X: ../../src/i830_batchbuffer.h:78: intel_batch_emit_dword: Assertion `pI830->batch_ptr != ((void *)0)' failed.

Bug sounds similar (same symptoms) to bug 328035, but different error message.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: xserver-xorg-video-intel 2:2.6.3-0ubuntu2
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersion: Linux version 2.6.28-11-generic (buildd@crested) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #36-Ubuntu SMP Fri Mar 20 19:51:24 UTC 2009
SourcePackage: xserver-xorg-video-intel
Uname: Linux 2.6.28-11-generic x86_64

[lspci]
00:00.0 Host bridge [0600]: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub [8086:2a40] (rev 07)
     Subsystem: Lenovo Device [17aa:20e0]
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a42] (rev 07)
     Subsystem: Lenovo Device [17aa:20e4]

I tried suspend/resume without X and it works well. So it should be the X driver issue.

change to high priority

I disabled tiling and enabled UXA

Created an attachment (id=19640)
xorg log

xorg log that shows batch buffer error at resuming time

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.

(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

(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.

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.

(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

Yes, that patch seems to have done the trick. I can resume properly on the X200 now.

commit 261c20a479f6ec1e94c2ba801323072227cc3ade
Author: Eric Anholt <email address hidden>
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.

Binary package hint: xserver-xorg-video-intel

SW: Kubuntu Jaunty up-to-date
HW: ThinkPad x200s with Intel 4500MHD graphics

When Suspend is done by PowerDevil (close of lid, selecting Suspend action) and I perform resume, I get back to KDM login dialog, instead of back to my KDE session. This is reproducible.
If I perform suspend from command line (Konsole) with "sudo pm-suspend" command, resume works w/o problem.

I have noticed this error in /var/log/kdm.log:
X: ../../src/i830_batchbuffer.h:78: intel_batch_emit_dword: Assertion `pI830->batch_ptr != ((void *)0)' failed.

Bug sounds similar (same symptoms) to bug 328035, but different error message.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: xserver-xorg-video-intel 2:2.6.3-0ubuntu2
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersion: Linux version 2.6.28-11-generic (buildd@crested) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #36-Ubuntu SMP Fri Mar 20 19:51:24 UTC 2009
SourcePackage: xserver-xorg-video-intel
Uname: Linux 2.6.28-11-generic x86_64

Luka Renko (lure) wrote :
Luka Renko (lure) wrote :

It seems this is related to UXA, which I have turned recently on to test. I have now removed xorg.conf and first two suspend/resume cycles worked (even from GUI). Will test this further.

summary: - suspend/resume gets me to KDM login screen on x200s
+ suspend/resume returns to KDM login screen on x200s with UXA
Bryce Harrington (bryce) on 2009-03-24
Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Confirmed
Luka Renko (lure) wrote :

I can confirm that this works with EXA. So it is clear this is UXA specific issue.

Problem is only that EXA is slow and it has redraw problems - see bug 279727

Luka Renko (lure) wrote :

I have found upstream bug for this issue and it seems there is fix available for this bug:
http://bugs.freedesktop.org/show_bug.cgi?id=18049

Can this be backported to Jaunty?

Changed in xserver-xorg-video-intel (Ubuntu):
status: Confirmed → Triaged
Changed in xserver-xorg-video-intel:
status: Unknown → Fix Released
Manuel Siggen (manuel-siggen) wrote :

I'm having the same assert with UXA enabled after resuming from RAM:

    X: ../../src/i830_batchbuffer.h:78: intel_batch_emit_dword: Assertion `pI830->batch_ptr != ((void *)0)' failed.

This on a Thinkpad X40 with :

    msi@x40:~$ lspci | grep VGA
    00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)

Thanks in advance !

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.

As you can see from Ubuntu reports, this problem is reproducible with the following cards:
- 4500MHD (8086:2a42) - ThinkPad X200s
- 855GM - ThinkPad X40
- X3100

Luka Renko (lure) wrote :

Above fix is in Jaunty, therefore this is different bug or some kind of regression. Have put comment to upstream bug.

Manuel Siggen (manuel-siggen) wrote :

Are you sure the fix is released in jaunty ?

As I understand the bug status, the fix is released in xf86-intel-video (upstream) but still in 'triaged' status in ubuntu. That would mean that the fix is not released in jaunty at the moment, no ?

Luka Renko (lure) wrote :

Yes, I have checked Jaunty source package and have confirmed that the code change is there. Here is ChangeLog entry:
commit b9ca7dcd0d6521c33d4b3beb09d9841411406657
Author: Eric Anholt <email address hidden>
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.
    (cherry picked from commit 261c20a479f6ec1e94c2ba801323072227cc3ade)

I will also change state to Confirmed, as it is not clear yet.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Triaged → Confirmed
Rafael Belmonte (eaglescreen) wrote :

I have got the same problem with Intel X3100.

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.

Same problem here on Jaunty beta

00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)

Scott Kitterman (kitterman) wrote :

Sleep works here, hibernate does not. It does say it's restoring, but restore ends up at the login screen.

00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller [8086:27a2] (rev 03)
00:02.1 Display controller [0380]: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller [8086:27a6] (rev 03)

System uses uxa and is Kubuntu Jaunty Beta (upgraded from Intrepid at the end of the beta freeze and not updated since).

Changed in xserver-xorg-video-intel:
status: Fix Released → Confirmed
Bryce Harrington (bryce) on 2009-03-29
summary: - suspend/resume returns to KDM login screen on x200s with UXA
+ suspend/resume returns to KDM login screen on x200s (UXA bug)

i can confirme this bug on sony vaio nr320ah ...
Is the fix already in Jaunty?

Changed in xserver-xorg-video-intel (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Marius Gedminas (mgedmin) wrote :

The fix is not in. I just got kicked back to GDM prompt after a resume (Lenovo T61, Intel 965GM, using UXA), with the same

  X: ../../src/i830_batchbuffer.h:78: intel_batch_emit_dword: Assertion `pI830->batch_ptr != ((void *)0)' failed.

error message in /var/log/gdm/:0.log.1.

$ lspci -nn |grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller [8086:2a02] (rev 0c)

I'm using Jaunty with the latest xserver-xorg-video-intel at the moment (2:2.6.3-0ubuntu9).

Marius Gedminas (mgedmin) wrote :

Correction: I was using an older version of xserver-xorg-video-intel when I suspended. I had apt-get upgraded it, but not yet restarted X.

Benjamin von Engelhardt (bve) wrote :

Same here on a Lenovo X300, jaunty up-to-date.

$ lspci -nn |grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller [8086:2a02] (rev 0c)

Bryce Harrington (bryce) on 2009-04-09
summary: - suspend/resume returns to KDM login screen on x200s (UXA bug)
+ [4500MHD] X asserts on pI830->batch_ptr != 0 on resume from suspend (UXA
+ bug)

Confirming this bug on a Thinkpad T500. Fix is not in, the problem still appears with xserver-xorg-video-intel version 2:2.6.3-0ubuntu9.

lspci says:
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a42] (rev 07)

Bryce Harrington (bryce) on 2009-04-21
description: updated
Bryce Harrington (bryce) on 2009-04-24
summary: - [4500MHD] X asserts on pI830->batch_ptr != 0 on resume from suspend (UXA
- bug)
+ [i4500MHD] X asserts on pI830->batch_ptr != 0 on resume from suspend
+ (UXA bug)

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 (<email address hidden>)
    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 (<email address hidden>)
    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

Created an attachment (id=25362)
Xorg.0.log on X200s 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 (<email address hidden>)
    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 (<email address hidden>)
    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

Bryce Harrington (bryce) on 2009-05-06
tags: added: resume
Luka Renko (lure) on 2009-05-07
tags: added: error-exit

Adjusting severity: crashes & hangs should be marked critical.

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.

Bryce Harrington (bryce) on 2009-05-12
summary: - [i4500MHD] X asserts on pI830->batch_ptr != 0 on resume from suspend
- (UXA bug)
+ [i4500MHD] Kubuntu: X asserts on pI830->batch_ptr != 0 on resume from
+ suspend (UXA bug)

Eric, sorry for confusion. Will try to get latest driver and try to reproduce and will open bug if issue is still there.

Changed in xserver-xorg-video-intel:
status: Confirmed → Fix Released
Bryce Harrington (bryce) wrote :

According to the upstream bug, Eric Anholt says this is fixed in 2.7.99.1, which is available from xorg-edgers PPA.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xserver-xorg-video-intel - 2:2.7.99.1+git20090602.ec2fde7c-0ubuntu1

---------------
xserver-xorg-video-intel (2:2.7.99.1+git20090602.ec2fde7c-0ubuntu1) karmic; urgency=low

  * Update to git 20090602 (master branch) up to commit ec2fde7c
    - xvmc is disabled since DRI1 no longer supported
    - LP: #96991 - 3D stuff breaks with Compiz: Redirected Direct Rendering
      is needed in DRI
    - LP: #120834 - X freezes with I830WaitLpRing error when running OpenGL apps
    - LP: #337608 - X crashes in fbBlt() when using Sun Java Plugin 6 + firefox3.0
    - LP: #339555 - compiz slowmotion after Jaunty upgrade
    - LP: #363900 - X.org freezes with intel driver, no apparent trigger
    - LP: #331719 - VT switching doesn't work on Intel 915GM
    - LP: #339091 - X freezes a few minutes after resuming
    - LP: #348436 - Kubuntu: X server crash when screensaver is started (4500MHD)
    - LP: #279727 - Kubuntu: Display Corruption w/ Intel 4700MHD
    - LP: #357851 - Kubuntu: Distorted display after switching virtual desktops w/ exa
    - LP: #158415 - Front buffer dynamic resize not supported
    - LP: #324998 - x server restarts itself w/ compiz on Intel 945GM
    - LP: #355593 - after upgrade to 9.04, rotating desktop cube ran slow
    - LP: #357290 - 1 fps in 3d apps like neverball with EXA
    - LP: #360774 - Graphical Corruption with EXA on X4500
    - LP: #364126 - screensaver prefs dialog in 9.04 RC livecd leaves dirt
    - LP: #375712 - Native resolution for dell "2005fpw" monitor not listed
    - LP: #375264 - Choppy flash video and poor performance with compiz
    - LP: #349568 - Jaunty / Compiz slow and tearing on GMA 4500MHD
    - LP: #356056 - window tearing during movement on 965 (no compiz)
    - LP: #330460 - xorg shows black image/hangs with jpg in firefox
    - LP: #347587 - X asserts on pI830->batch_ptr != 0 on resume from suspend
  * Merge with Debian experimental. Remaining Ubuntu changes:
    - Add lpia architecture
    - Re-enable the patch system, add quilt to build-deps.
    - 110_quirk_hp_mini.patch: quirk (sent upstream)
    - 117_quirk_thinkpad_x30.patch: quirk (sent upstream)
  * Drop 116_8xx_disable_dri.patch. There have been fixes for 3d on 8xx
    chipsets upstream, so drop the DRI disablement so the fixes can be
    re-tested.
  * Drop 103_quirk_intel_mb890.patch. Better quirk available upstream.
    (LP: #305269)

 -- Bryce Harrington <email address hidden> Tue, 02 Jun 2009 10:47:32 -0700

Changed in xserver-xorg-video-intel (Ubuntu):
status: Triaged → Fix Released
jpiesing (jon33040) wrote :

Is there any chance of a Jaunty version of this fix appearing in x-updates?

ematiu (ematiu) wrote :

Same problem with X200
xserver-xorg-video-intel Version: 2:2.7.1-0ubuntu1~xup~1

in gdm log:
X: ../../src/i830_batchbuffer.h:78: intel_batch_emit_dword: Assertion `pI830->batch_ptr != ((void *)0)' failed.

How can we install
2:2.7.99.1+git20090602.ec2fde7c-0ubuntu1
?

Robert Hooker (sarvatt) wrote :

It is UXA specific and that is not the supported render method in jaunty. x-updates is for actual releases, forcing everyone using it to only have the UXA acceleration method by putting a 2.8 RC release on there where EXA is dropped is not a very good idea in my opinion. Not to mention the intel driver is only 1/3rd of the equation when it comes to UXA stability. You can install bleeding edge stuff by upgrading to karmic where the userspace can support it or alternately have a subset of karmic by using the xorg-edgers jaunty packages. 2.7.2 will probably be released around the same time 2.8 is and could potentially include this fix.

https://launchpad.net/~xorg-edgers/+archive/ppa

ematiu (ematiu) wrote :

@Robert: Thanks a lot four your answer!

I have it running now...
First I tried to upgrade to X modules to Karmic, bu tafter fighting a little with dependencies, I moved back...

This is my configuration now:

> libdrm-intel1
                           2.4.9-1ubuntu1~xup~1
> xserver-xorg-video-intel
                           2:2.7.1-0ubuntu1~xup~1
> Linux version
                            Linux unchar 2.6.30-020630-generic #020630 SMP Wed Jun 10 09:04:38 UTC 2009 x86_64 GNU/Linux

>xorg.conf
Section "Device"
 Identifier "Configured Video Device"
# Option "AccelMethod" "uxa"
# Option "EXAOptimizeMigration" "true"
# Option "MigrationHeuristic" "greedy"
# Option "Tiling" "true" # i8xx users: see note in guid`:
EndSection
# Yes, all is commented!
======================================

It seems pretty stable. I can sleep and hibernate, and I have compiz working on a dual head (Vertical dual head, since max horizontal resolution is 2048px, and is not enought for me).

Is anyone need more information on my configuration, please ask.

Changed in xserver-xorg-video-intel:
importance: Unknown → Critical
Changed in xserver-xorg-video-intel:
importance: Critical → Unknown
Changed in xserver-xorg-video-intel:
importance: Unknown → Critical
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.