Bug 610323

Summary: intel: compiz freezes system during 3D screen rotation or edge effects
Product: [openSUSE] openSUSE 11.3 Reporter: Laszlo Tari <taril_laszlo>
Component: X.OrgAssignee: Stefan Dirsch <sndirsch>
Status: RESOLVED FIXED QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Normal    
Priority: P3 - Medium CC: aj, badshah400, dimstar, Martin.Seidler
Version: Milestone 7   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Laszlo Tari 2010-05-31 10:20:12 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; hu-HU; rv:1.9.2.4) Gecko/20100513 SUSE/3.6.4-1.11 Firefox/3.6.4

I enable desktop cube, cube rotation and expo with edge flip effect.
Randomly, when an effect (rotation, expo...) occurs, the display is frozen, input devices are unaccessable, no hdd led activity etc, you have to turn off than turn on your computer/notebook manually.
This happens with intel based gpu, nvidia and ati too, so this could not be a GPU related bug.

Reproducible: Sometimes

Steps to Reproduce:
1. enable Desktop_Cube , Rotate_Cube and Expo
2. in Rotate_Cube, enable Edge_Flip_Pointer
3. use your system for a day, use the edges to activate rotation/expo a lot
4. it will occur randomly
Actual Results:  
System is randomly halted by compiz.

Expected Results:  
System should not halted by compiz.

The pulblic release of openSuSE 11.2 with compiz is working correctly.
Comment 1 Dominique Leuenberger 2010-05-31 10:34:28 UTC
Can you please try with the entire stack from X11:Compiz ( http://download.opensuse.org/repositories/X11:/Compiz/openSUSE_Factory )

The stack has just been forwarded to Factory but is probably not fully built there yet.

(I'm running this stack on an nvidia GeForce 350M, with nvidia driver 256.25)
Comment 2 Laszlo Tari 2010-05-31 17:13:21 UTC
I installed it but it did not help. :-(

When my computer is in idle, sometimes, it cant wake up, only the lcd panel backlight is on.

I disabled screen rotation and edge-flipping anf expo, but results the same error.

I will disable compiz, will use only metacity tomorrow to get confirmed about this bug is compiz related.

This problem is existed after compiz 0.7.8! 11.2 has 0.7.8.
I can remember when I upgraded my compiz under 11.2 to 0.8.4, this bug happened.

Is there any debug mode in compiz?
Comment 3 Laszlo Tari 2010-06-01 14:32:24 UTC
I successfully escaped after system freezing to the console.

I checked the log files, the following line was added to the xorg and gdm log file:
[ 11585.749] (II) AIGLX: Suspending AIGLX clients for VT switch
Comment 4 Laszlo Tari 2010-06-02 14:23:20 UTC
Ok. I used my system without compiz, and it is stable, so this is a compiz related bug.
Comment 5 Laszlo Tari 2010-06-04 14:03:31 UTC
Ok. At home i use nvidia version 256 driver with compiz enabled desktop. More than 2 days. This problem does not exists!

BUT

At work, we have intel based vda devices where this bug happens a lot!
Could someone reproduce this bug with intel based vga system?
Comment 6 Dominique Leuenberger 2010-06-06 18:42:57 UTC
Dear Xorg team: Asking around a bit in the compiz channel revealed that apparently almost all intel users are affected by this. Apparently a regression in newer intel video drivers.
Comment 7 Dominique Leuenberger 2010-06-06 18:52:03 UTC
A reference to the intel driver bugzilla (pointed out by a fedora friend):
https://bugs.freedesktop.org/show_bug.cgi?id=27883

The bug has been closed by now: Plase make sure to get the patches in our tree.
Comment 8 Stefan Dirsch 2010-06-06 21:00:36 UTC
(In reply to comment #7)
> A reference to the intel driver bugzilla (pointed out by a fedora friend):
> https://bugs.freedesktop.org/show_bug.cgi?id=27883
> 
> The bug has been closed by now: Plase make sure to get the patches in our tree.

There are various patches mentioned in this bugreport. It's completely unknown which ones are required and where the git commits there are to be found, i.e. in which component (libdrm,Mesa,xf86-video-intel,xorg-server, kernel (which git repo and which branch)). This information needs to be figured out first, before
we can consider any patches to apply to our packages.
Comment 10 Stefan Dirsch 2010-06-07 16:49:12 UTC
(In reply to comment #9)
> References to git commits:
> 
> fdo#27883#c25:
> http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=44d45d3fa56f121ce89ffe5b28beb48be01a95df

But that one has been reverted 2 hours later.

commit 8b2039187fc23f5e9dddf4081f8b1ab6f4c01416
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat May 29 12:14:55 2010 +0100

    Revert "dri: Use size from backing pixmap when creating buffers."
    
    This reverts commit 44d45d3fa56f121ce89ffe5b28beb48be01a95df.
    
    Michel Dänzer pointed out the flaw in using the pixmap size instead of
    the drawable size:
    
      Using the backing pixmap dimensions for this is not desirable. In
      particular, it means that the DRI2 buffers of non-redirected windows
      always have the same size as the screen. But even for redirected windows
      it wastes some graphics memory with a re-parenting window manager, that
      is if it doesn't break in various ways due to the top left corner of the
      DRI2 buffers no longer corresponding to the top left corner of the window.
Comment 11 Stefan Dirsch 2010-06-07 17:33:50 UTC
Ok. Could you give the new packages a try? xorg-x11-driver-video and Mesa from buildservice, project X11:XOrg.

Verify that the RPM changelog contains (package are still rebuilding at the
moment):

Mon Jun  7 19:25:13 CEST 2010 - sndirsch@suse.de
- xf86-video-intel-commit-e2615cd.diff
  * dri: Only flip if the front and back pixmaps match (bnc #610323)
- xf86-video-intel-commit-f227240.diff
  * DRI2: fix new buffer exchange check (bnc #610323)

Mon Jun  7 19:27:30 CEST 2010 - sndirsch@suse.de
- mesa-commit-06c72da.diff
  * intel: Update renderbuffers unconditionally in
    intelSetTexBuffer2() (bnc #610323)
Comment 12 Stefan Dirsch 2010-06-07 20:06:08 UTC
Packages are now available:

  http://download.opensuse.org/repositories/X11:/XOrg/openSUSE_Factory/
Comment 13 Laszlo Tari 2010-06-08 15:38:25 UTC
I updated intel driver and mesa. The same error occurs.
Comment 14 Stefan Dirsch 2010-06-08 15:42:00 UTC
Ok. So just waste of time - as usual.
Comment 15 Dominique Leuenberger 2010-06-08 15:44:45 UTC
(In reply to comment #14)
> Ok. So just waste of time - as usual.

That's a bit harsh, considering that a user in bug 597596 just resolved his issue with those packages.
Comment 16 Stefan Dirsch 2010-06-08 16:15:54 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > Ok. So just waste of time - as usual.
> 
> That's a bit harsh, considering that a user in bug 597596 just resolved his
> issue with those packages.

Hmmm. I didn't see this. Would it make sense to submit the packages for openSUSE:Factory?
Comment 17 Stefan Dirsch 2010-06-08 16:18:30 UTC
I mean this guy is talking about fglrx (thus he likely owns an ATI card), but the patches are for intel.
Comment 18 Andreas Jaeger 2010-06-08 16:34:31 UTC
Stefan: Remember what I showed you and Matthias last week on Factory?  That issue with my Intel card is indeed solved with fglrx enabling.  So, if your patch fixes that one and the slowdown due to fglrx, then you did some really great work IMO.

Don't know why fglrx enabling helped on Intel but it did.
Comment 19 Martin Seidler 2010-06-08 17:00:17 UTC
Did this bug only appear on 64-bit systems (platform x86-64)? With which hardware precisely?
Comment 20 Laszlo Tari 2010-06-08 17:12:42 UTC
With compiz 0.7.8 everything is ok!

What did they changed since after?

I can remember, a year ago with my nvidia the same thing happened (maybe with compiz 0.8.2) but now it is fixed, maybe something around AIGLX. I don't know.

***** Martin Seidler: This is also available on 32 bit system!
Comment 21 Laszlo Tari 2010-06-08 17:17:42 UTC
I forgot to tell you this bug is happened to me today during a window pop-upping with fading animation, so someone could rename this bug.
Comment 22 Stefan Dirsch 2010-06-08 20:40:50 UTC
Ok. I just submitted both packages.

 41273  State:new     By:sndirsch     When:2010-06-08T22:38:13
        submit:       X11:XOrg/Mesa  ->  openSUSE:Factory       
        Descr: - mesa-commit-06c72da.diff
                 * intel: Update renderbuffers unconditionally in
                   intelSetTexBuffer2() (bnc #610323)

 41272  State:new     By:sndirsch     When:2010-06-08T22:37:55
        submit:       X11:XOrg/xorg-x11-driver-video -> openSUSE:Factory       
        Descr: - xf86-video-intel-commit-e2615cd.diff
                 * dri: Only flip if the front and back pixmaps match (bnc
               #610323)
               - xf86-video-intel-commit-f227240.diff
                 * DRI2: fix new buffer exchange check (bnc #610323)
Comment 23 Laszlo Tari 2010-06-14 19:54:14 UTC
I've just upgraded my system with the latest factory packages (intel, mesa), but the problem is still there.
Comment 24 Stefan Dirsch 2010-06-25 16:05:51 UTC
I believe it would be worth a try to update to latest Mesa, libdrm and 
xorg-x11-driver-video packages from obs://X11:XOrg.
Comment 25 Stefan Dirsch 2010-07-21 02:19:47 UTC
Still waiting for a response for more than 3 weeks now. Please reopen once
you can provide the requested feedback. Thanks.
Comment 26 Laszlo Tari 2010-07-21 19:39:29 UTC
I dont know, what does it mean: obs://X11:XOrg
But yesterday I updraded my system (dist-upgrade) and in metacity mode it was halted during abobe flash video playback. :-\
Comment 27 Laszlo Tari 2010-09-23 09:55:05 UTC
Finally, it is working!!!

Almost professwionally:
Sometimes compiz is inactivated itself.
Comment 28 Stefan Dirsch 2010-09-23 10:15:34 UTC
(In reply to comment #26)
> I dont know, what does it mean: obs://X11:XOrg

Sorry, I missed that question. Here is a HOWTO:

zypper ar \
  http://download.opensuse.org/repositories/X11:/XOrg/openSUSE_11.3/ \
  X11:XOrg
zypper mr -p 90 X11:XOrg
zypper ref
zypper dup

But apparently the issue has been fixed meanwhile.