Bug 14035 - [945] X gets fatal lockup when idle after playing movies
Summary: [945] X gets fatal lockup when idle after playing movies
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: 7.3 (2007.09)
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Wang Zhenyu
QA Contact: Xorg Project Team
URL: https://bugs.launchpad.net/ubuntu/+so...
Whiteboard:
Keywords:
Depends on:
Blocks: 15000
  Show dependency treegraph
 
Reported: 2008-01-11 22:44 UTC by Bryce Harrington
Modified: 2008-03-24 21:44 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to fix crash with overlay+DPMS (1.31 KB, patch)
2008-03-22 09:43 UTC, maximlevitsky
no flags Details | Splinter Review

Description Bryce Harrington 2008-01-11 22:44:13 UTC
Several users report lockups after their machine has been idle.  It's been tentatively identified that this occurs after playing a movie, and the screensaver comes on, or when the screensaver itself plays an mpg.  This was first reported against Gutsy, but is confirmed as still occurring as of Hardy Alpha-3 (with intel 2.2 driver).

The original bug report is:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/160309

http://launchpadlibrarian.net/10936352/Xorg.0.log.old
http://launchpadlibrarian.net/10936355/lspci.txt
http://launchpadlibrarian.net/10936356/dmesg.txt
http://launchpadlibrarian.net/10936501/xorg.conf

Steps to reproduce:

1. Start playing any video in a fullscreen with Kaffeine
2. Pause playing
3. Wait for display turning off (all screensavers are disabled, this is default power saving behavior of the X)
Result:
System seems frozen, it's impossible to switch to text console (Ctrl+Alt+F1), I can only turn the laptop off (with data lost).

Alternate method to reproduce:

1.  Install Electricsheep screensaver
2.  Configure it to display .mpg movies using mpeg2dec_onroot
3.  Leave screen locked for a period of time, so .mpg plays
Result:
Crashes with fatal lockup.

Here are two examples of the crash output:

ProcXCloseDevice to close or not ?
ProcXCloseDevice to close or not ?
ProcXCloseDevice to close or not ?
ProcXCloseDevice to close or not ?
SetGrabKeysState - disabled
Error in I830WaitLpRing(), timeout for 2 seconds
pgetbl_ctl: 0x3ffc0001 pgetbl_err: 0x0
ipeir: 0 iphdr: 1810000
LP ring tail: a008 head: 9fc4 len: 1f801 start 0
eir: 0 esr: 0 emr: ffff
instdone: ffc0 instpm: 0
memmode: 306 instps: f0000
hwstam: fffe ier: 2 imr: 0 iir: 250
Ring at virtual 0xa78de000 head 0x9fc4 tail 0xa008 count 17
        00009f44: 00000000
        00009f48: 02000011
        00009f4c: 00000000
        00009f50: 02000011
        00009f54: 00000000
        00009f58: 02000011
        00009f5c: 00000000
        00009f60: 02000011
        00009f64: 00000000
        00009f68: 02000011
        00009f6c: 00000000
        00009f70: 02000010
        00009f74: 00000000
        00009f78: 08800000
        00009f7c: 3f832000
        00009f80: 02000011
        00009f84: 00000000
        00009f88: 02000011
        00009f8c: 00000000
        00009f90: 02000011
        00009f94: 00000000
        00009f98: 02000011
        00009f9c: 00000000
        00009fa0: 01810000
        00009fa4: 00000000
        00009fa8: 02000011
        00009fac: 00000000
        00009fb0: 02000010
        00009fb4: 00000000
        00009fb8: 08800000
        00009fbc: 3f832000
        00009fc0: 01810000
        00009fc4: 00000000
Ring end
space: 130996 wanted 131064
(II) intel(0): [drm] removed 1 reserved context for kernel
(II) intel(0): [drm] unmapping 8192 bytes of SAREA 0xf8876000 at 0xb7aed000

Fatal server error:
lockup

(EE) intel(0): I830 Vblank Pipe Setup Failed 0
(II) AIGLX: Suspending AIGLX clients for VT switch
(EE) intel(0): I830 Vblank Pipe Setup Failed 0
(EE) intel(0): I830 Vblank Pipe Setup Failed 0
(EE) intel(0): I830 Vblank Pipe Setup Failed 0
(EE) intel(0): I830 Vblank Pipe Setup Failed 0
(II) intel(0): xf86UnbindGARTMemory: unbind key 0
(II) intel(0): xf86UnbindGARTMemory: unbind key 1
(II) intel(0): xf86UnbindGARTMemory: unbind key 2
(II) intel(0): xf86UnbindGARTMemory: unbind key 3
(II) intel(0): xf86UnbindGARTMemory: unbind key 4



Second crash, same user, tail of Xorg.0.log.old:

Error in I830WaitLpRing(), timeout for 2 seconds
pgetbl_ctl: 0x3ffc0001 pgetbl_err: 0x0
ipeir: 0 iphdr: 1810000
LP ring tail: d068 head: d05c len: 1f801 start 0
eir: 0 esr: 0 emr: ffff
instdone: ffc0 instpm: 0
memmode: 306 instps: f0000
hwstam: fffe ier: a2 imr: 0 iir: 250
Ring at virtual 0xa78c4000 head 0xd05c tail 0xd068 count 3
 0000cfdc: 00000000
 0000cfe0: 00000000
 0000cfe4: 7f1c000b
 0000cfe8: 4347e000
 0000cfec: 4347e000
 0000cff0: 3f800000
 0000cff4: 3f800000
 0000cff8: be000000
 0000cffc: 4347e000
 0000d000: 00000000
 0000d004: 3f800000
 0000d008: be000000
 0000d00c: be000000
 0000d010: 00000000
 0000d014: 00000000
 0000d018: 54f00006
 0000d01c: 03cc0320
 0000d020: 00000000
 0000d024: 00c800c8
 0000d028: 02e0b720
 0000d02c: 00000000
 0000d030: 00000320
 0000d034: 022b8ff0
 0000d038: 02000011
 0000d03c: 00000000
 0000d040: 02000011
 0000d044: 00000000
 0000d048: 02000010
 0000d04c: 00000000
 0000d050: 08a00000
 0000d054: 3fe33001
 0000d058: 01810000
 0000d05c: 00000000
Ring end
space: 131052 wanted 131064
(II) intel(0): [drm] removed 1 reserved context for kernel
(II) intel(0): [drm] unmapping 8192 bytes of SAREA 0xf8cd1000 at 0xb7ad3000
(II) intel(0): [drm] Closed DRM master.

Fatal server error:
lockup

(II) AIGLX: Suspending AIGLX clients for VT switch
(II) intel(0): fbc disabled on plane a
(II) intel(0): xf86UnbindGARTMemory: unbind key 0
(II) intel(0): xf86UnbindGARTMemory: unbind key 1
(II) intel(0): xf86UnbindGARTMemory: unbind key 2
(II) intel(0): xf86UnbindGARTMemory: unbind key 3
(II) intel(0): xf86UnbindGARTMemory: unbind key 4
Comment 1 Michael Fu 2008-01-15 17:46:15 UTC
we have several similar bug report on 945GM that's video related. bug# 13630, bug# 13733. would you please help to reproduce on our machine, shuang?

Comment 2 Shuang He 2008-01-16 18:51:32 UTC
we can't reproduce this issue.
we have installed a 32-bit ubuntu 7.0.4 on 945GM, and got folllowing results:
with out-of-box driver(i810 1.7.4): can't reproduce
with updated driver from repos(intel 1.9.94): can't reproduce
with everything built from git(xserver 1.4.99, intel 2.2.0): can't reproduce
Comment 3 Shuang He 2008-01-17 21:01:10 UTC
we have tried after upgrading to ubuntu 7.10 gusty.(xserver 1.3, intel drv 2.1.1)
can't reproduce this issue. we have tried both methods you provided
we see Electricsheep use mpeg2dec_onroot by default, 
Is there anything else need to set?
Comment 4 Shuang He 2008-01-20 18:43:52 UTC
(In reply to comment #3)
> we have tried after upgrading to ubuntu 7.10 gusty.(xserver 1.3, intel drv
> 2.1.1)
> can't reproduce this issue. we have tried both methods you provided
> we see Electricsheep use mpeg2dec_onroot by default, 
> Is there anything else need to set?
> 

OK, we can reproduce this issue. we tried let it run the screensaver during the weekend. X crashed when I recheck it today.
Comment 5 Gordon Jin 2008-01-20 19:01:48 UTC
So it's reproducible, but may need long time. I'm temporarily assign this to Zhenyu.
Comment 6 Andrew King 2008-01-21 20:02:28 UTC
duplicated as ubnuntu bug #180015. 

A backtrace from the crash, and xorg.0.log with ModeDebug on are given.

http://launchpadlibrarian.net/11226110/gdb.txt (backtrace)
http://launchpadlibrarian.net/11129292/xorg.0.log_glx (xorg.log)
http://launchpadlibrarian.net/11129307/lspci.log (lspci)

I hope this helps, as currently I have to run X with dri disabled.

This is with a GM965 using the intel driver.
Comment 7 Wang Zhenyu 2008-03-03 00:04:31 UTC
It looks this problem only happen in xaa? Can anyone confirm is it true? 

And Shuang, can we produce this with exa?
 
Comment 8 Wang Zhenyu 2008-03-12 19:42:29 UTC
It looks XAA is always used for this bug, is that right, Shuang?

In XAA, 2D render accel is totally off, so this problem should be relate to 3D dri.
Shuang, could you try to test with current master with Xv memory fix?
Comment 9 Wang Zhenyu 2008-03-18 23:11:12 UTC
Bryce, could you let origin reporters to try git master for Xv issue?
Comment 10 maximlevitsky 2008-03-22 09:43:24 UTC
Created attachment 15388 [details] [review]
Patch to fix crash with overlay+DPMS
Comment 11 maximlevitsky 2008-03-22 09:44:28 UTC
I have similar issue and I fixed it here, try the above patch
Comment 12 Wang Zhenyu 2008-03-23 22:17:36 UTC
Thanks for the patch!

So the problem is we ignored dpms mode change for overlay, mostly in i830_overlay_switch_to_crtc() function, which caused problem if overlay display on dpms off crtc. Great catch!

I'd like to change (intel_crtc->dpms_mode != DPMSModeOn) to (intel_crtc->dpms_mode == DPMSModeOff) to reflect possible dpms modes we believe to enable crtc, ok?
Comment 13 Wang Zhenyu 2008-03-24 00:09:17 UTC
Patch pushed. Close this.
Comment 14 Bryce Harrington 2008-03-24 21:44:25 UTC
Thanks, I'll pull it into Ubuntu.


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.