Bug 159960

Summary: i915 DRM module fails after an ACPI suspend/resume cycle
Product: [Fedora] Fedora Reporter: Charles Taylor <tomalek>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED CANTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: kevin, pfrields, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-03 00:32:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Charles Taylor 2005-06-09 18:59:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.7.8-1.3.1

Description of problem:
Using the kernel boot parameter
"acpi_sleep=s3_bios" allows my notebook to suspend and resume with ACPI, but 
DRI doesn't survive properly and if any 3D application is run after a resume I get wither:

* An X server hang that requires shutting down the machine (the machine is
still running and responds to acpi events, so I can shut down the
machine).  This happens with armagetron or celestia.

* The application draws its first frame, freezes a few seconds, then
crashes without taking the X server with it.  (the GL screensavers,
glxgears do this).  When this happens, I get an error message in the
console after the app crashes:

$ glxgears
intelWaitIrq: drmI830IrqWait: -16

The kernel also complains.  dmesg gives a message like:

[drm:i915_wait_irq] *ERROR* i915_wait_irq: EBUSY -- rec: 0 emitted: 7

... for every attempt to run a GL application.


Version-Release number of selected component (if applicable):
kernel-2.6.11-1.14_FC3 through kernel-2.6.11-1.27_FC3 , xorg-x11-6.8.2-1.FC3.13 through xorg-x11-6.8.2-1.FC3.34

How reproducible:
Always

Steps to Reproduce:
1.Log into a gnome session
2.run glxgears to verify that DRI's working
3.suspend using ACPI
4.On resume, run glxgears again
  

Actual Results:  glxgears crashes, kernel complains about i915_wait_irq is busy


Expected Results:  glxgears and other GL applications operates normally.

Additional info:

THe system in question is a JVC (Asus) MiniNote MP-XV841.  The video chipset is reported as Intel 82852/855GM.

I'm not sure whether this bug is best filed against the kernel or xorg-x11, but it's the kernel that spits out the error message. :)  Please move the bug somewhere else if it's more appropriate there.

This bug is very similar to the one reported in this URL:

http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg21138.html

THe workaround described there works (just not very well), and the DRM module will actually work again if X is restarted, but that ruins the whole point of suspending the machine in the first place.

Comment 1 Charles Taylor 2005-06-15 16:13:37 UTC
This bug has been squashed by the Ubuntu folks:

https://bugzilla.ubuntu.com/show_bug.cgi?id=7787

It looks like the problem requires a fix of both the drm modules and the X server.

I've unbroken things on Fedora by installing these snapshots of the xorg drivers
from dri.freedesktop.org:

http://dri.freedesktop.org/snapshots/common-20050610-linux.i386.tar.bz2
http://dri.freedesktop.org/snapshots/i810-20050610-linux.i386.tar.bz2

This fixes the X server half of the problem, but the DRM modules included in
those packages cause a crash on suspend.

This can be fixed by patching the Fedora-supplied i915 drm module with the
i915drm-sync-ver patch from Ubuntu's kernel.  (All this patch does is increment
the minor version number of the drm module from 1 to 2).  After this, suspend
and resume seem to work as expected.  If the patch is NOT applied to the kernel
module, then I get the same failure as before.

Ugly, but it at least proves that dri CAN survive a suspend-resume cycle ...
even on Fedora.


Comment 2 Warren Togami 2005-06-15 18:45:03 UTC
Is this already in the upstream 2.6.12 kernel?

Comment 3 Charles Taylor 2005-06-16 15:53:15 UTC
Oops, that should be the 

http://dri.freedesktop.org/snapshots/i915-20050610-linux.i386.tar.bz2

snapshot.

Comment 4 Dave Jones 2005-07-15 18:05:19 UTC
An update has been released for Fedora Core 3 (kernel-2.6.12-1.1372_FC3) which
may contain a fix for your problem.   Please update to this new kernel, and
report whether or not it fixes your problem.

If you have updated to Fedora Core 4 since this bug was opened, and the problem
still occurs with the latest updates for that release, please change the version
field of this bug to 'fc4'.

Thank you.

Comment 5 Kevin Goeser 2005-07-24 15:38:25 UTC
Is it possible to get a patch against the (vanilla) 2.6.12 kernel? I'm not on
redhat, though I experience exact the same problem and couldn't find much about
it :-/

Thanks!

Comment 6 Dave Jones 2005-10-03 00:32:25 UTC
This bug has been automatically closed as part of a mass update.
It had been in NEEDINFO state since July 2005.
If this bug still exists in current errata kernels, please reopen this bug.

There are a large number of inactive bugs in the database, and this is the only
way to purge them.

Thank you.