Bug 14441

Summary: Compiz shows only black screen on i965
Product: Mesa Reporter: Timo Jyrinki <timo.jyrinki>
Component: Drivers/DRI/i965Assignee: Eric Anholt <eric>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: 84yelo3, bgamari, guillaume, michae1t, michel, olive, seanlkml, shuang.he, tjaalton
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 16653    
Attachments: patch on top of current mesa...
try 2.. fail on the first attempt.
try 3 - now with 100% less fail

Description Timo Jyrinki 2008-02-09 02:21:00 UTC
When compiz is tried to be enabled, only a black screen is shown. Restoring to metacity works. OpenGL works in some other cases, but not with compiz.

Used components:
- xserver git
- intel ddx git
- drm git
- mesa git

DRI_MM is being used. This has been confirmed by Maxim Levitsky too now on the xorg mailing list: http://lists.freedesktop.org/archives/xorg/2008-February/032776.html

As an additional information, if I _don't_ have TTM working, I get a screen of semi-random colored noise instead of the black screen I get with the TTM.
Comment 1 Eric Anholt 2008-02-13 15:31:48 UTC
After removing bogus whitelist code and then removing the not-so-bogus blacklist code from the debian package, I can confirm this result.
Comment 2 Guillaume Seguin 2008-02-28 13:36:08 UTC
I can confirm this using latest drm/mesa/xserver/intel driver (from batchbuffer branch) git, with both DRI and DRI2.
Comment 3 Sean Estabrooks 2008-03-11 23:01:28 UTC
Seeing this as well on a G35 system using either master or batchbuffer branch.
Comment 4 Sean Estabrooks 2008-03-13 12:35:46 UTC
Turns out it's not exactly a black screen after all.  If I hold ctrl-alt-left-mouse-button and roll around, the cube rotates.  While all four sides of the cube are complete black, the cube reflection shows up along the bottom of the screen.  Also the freedesktop.org logo shows up on the top of the cube.  The speed of the rotation is good, there doesn't appear to be a performance problem.

Maybe this suggests a particular kind of breakage which points to a solution?
Comment 5 Shuang He 2008-03-20 00:21:21 UTC
I can reproduce this issue on our G965 as well.
Comment 6 Shuang He 2008-03-20 19:07:44 UTC
and with XAA, it's kind of working(wobbling, cube desktop, rotate). but the xterm window is blank.
Comment 7 Ben Gamari 2008-04-21 22:34:04 UTC
Has there been any progress on this bug? I think bug #15577 might be a DUP.
Comment 8 Michel Dänzer 2008-04-22 01:38:21 UTC
*** Bug 15577 has been marked as a duplicate of this bug. ***
Comment 9 Michel Dänzer 2008-04-22 01:42:16 UTC
Does disabling the assignment

	 pDRIInfo->texOffsetStart = I830TexOffsetStart;

in xf86-video-intel/src/i830_dri.c fix the problem? If so, it seems that the corresponding code in the Mesa driver needs to be fixed or disabled for 965.
Comment 10 Ben Gamari 2008-04-22 08:21:36 UTC
Wow, looks like that does it. The texture_from_pixmap demo in mesa seems to produce output when that line (and the if statement directly above it) is disabled. I haven't been able to test compiz yet due to visual issues, unfortunately.

(In reply to comment #9)
> Does disabling the assignment
> 
>          pDRIInfo->texOffsetStart = I830TexOffsetStart;
> 
> in xf86-video-intel/src/i830_dri.c fix the problem? If so, it seems that the
> corresponding code in the Mesa driver needs to be fixed or disabled for 965.
> 

Comment 11 Sean Estabrooks 2008-04-22 08:54:16 UTC
Michel,

Thanks for finding the source of the problem.  Commenting out that line makes the tfp demo and Compiz work here.
Comment 12 Ben Gamari 2008-04-22 09:08:15 UTC
You are presently running compiz with xserver/mesa git? Have you experienced any symptoms of bug #15641? I haven't been able to get compiz to even start.

- Ben


(In reply to comment #11)
> Michel,
> 
> Thanks for finding the source of the problem.  Commenting out that line makes
> the tfp demo and Compiz work here.
> 

Comment 13 Sean Estabrooks 2008-04-22 09:29:17 UTC
(In reply to comment #12)
There were a few FBConfig problems recently which i helped create, but they seem to be resolved now.  FWIW, i'm running xserver/mesa/drm/xf86-video-intel from Git.
Comment 14 Ben Gamari 2008-04-22 10:02:19 UTC
When was this? Any particular commits?
Comment 15 Sean Estabrooks 2008-04-22 10:58:43 UTC
(In reply to comment #14)
Sorry don't know particular commits.  The issue was caused by some commits by Kristian in the last couple of weeks but appears fixed as Compiz with LIBGL_ALWAYS_INDIRECT=1 now works here.  Probably it's not related to the problem you're seeing.

Comment 16 Shuang He 2008-05-04 22:06:43 UTC
With latest git master, this issue still exists.
Comment 17 Michael 2008-05-10 06:50:57 UTC
In the latest revision this particular bug seems fixed.  Still some mess with a flat white cube on the desktop faces using direct rendering though.  Life is difficult without wobbly windows.
Comment 18 Ben Gamari 2008-05-11 09:58:13 UTC
(In reply to comment #17)
> In the latest revision this particular bug seems fixed.  Still some mess with a
> flat white cube on the desktop faces using direct rendering though.  Life is
> difficult without wobbly windows.
> 

Amen to the last statement. Are you running on a 64-bit environment? Are you experiencing #15641? Thanks.
Comment 19 Michael 2008-05-12 03:09:22 UTC
Oh, I was following 15577 and didn't look at the title here... I am really on i915.  Not sure what bug to post to now since there seem to be many open issues related to the one I was having.

My machine is 32 bit.  Also, right now I am using the default X (X.org 11.0) and drm with my distro.  The driver is listed as "Mesa DRI Intel(R) 945GM 20061102 x86/MMX/SSE2".  Mesa is current from git.  

Some change in the mesa git in the last 3 days got my compiz working so be I run with indirect rendering.  In an earlier git I was seeing a black screen that didn't spin, I would sometimes also see a white screen with random garbage which eventually seemed to switch to solid black.  My system would only lock up (go unresponsive) on a black screen when direct rendering was active in compiz with whichever mesa is packaged in the fedora 9 prerelease.  Now with direct rendering I just get that empty cube with the fedora "f" graphics on the top and bottom.

In unrelated news, interestingly, the drm git "died" on my system today.  It was running compiz earlier for a few hours before the display froze and everything went unresponsive. Now on startup X with drm git kills my system after a few flickers. I'll wait a few days and post a bug if I still see this as I do not have time to check if there is already one open.


(In reply to comment #18)
> (In reply to comment #17)
> > In the latest revision this particular bug seems fixed.  Still some mess with a
> > flat white cube on the desktop faces using direct rendering though.  Life is
> > difficult without wobbly windows.
> > 
> 
> Amen to the last statement. Are you running on a 64-bit environment? Are you
> experiencing #15641? Thanks.
> 

(In reply to comment #18)
> (In reply to comment #17)
> > In the latest revision this particular bug seems fixed.  Still some mess with a
> > flat white cube on the desktop faces using direct rendering though.  Life is
> > difficult without wobbly windows.
> > 
> 
> Amen to the last statement. Are you running on a 64-bit environment? Are you
> experiencing #15641? Thanks.
> 

Comment 20 Ben Gamari 2008-05-28 00:53:27 UTC
This bug definitely still exists in git. However, the fix mentioned in Comment #9 still fixes it. Something should be checked in soon if the change needs to be made in mesa. Release is pretty soon I think. 
Comment 21 Timo Jyrinki 2008-06-04 09:59:47 UTC
Does commenting pDRIInfo->texOffsetStart = I830TexOffsetStart; in i830_dri.c fix it for all others? For me it does not seem to help. Changed a machine, though, this one is a laptop with GMA X3100. And nowadays it's white screen, or like corrected afterwards white cube / desktop (I can turn it around).

drm / libdrm git, mesa git ("7.1rc1"), intel git, ttm enabled. However, xserver 1.4.1 this time since I couldn't get my xserver 1.5-branch git to actually run (socket failures / problems, I'll try to get it running though again later). Other OpenGL stuff works more or less, like Flight Gear, if I just first replace compiz wm with metacity after logging in (compiz enabled by default).
Comment 22 Ben Gamari 2008-06-05 08:02:47 UTC
Yep, it helps for me (I'm running compiz presently). Are you sure you're running with indirect rendering?  Sounds like similar symptoms. Make sure that LIBGL_ALWAYS_INDIRECT is set (I've made that mistake more than a few times) and maybe also pass --indirect-rendering to compiz just for good measure. I'm also on a laptop with X3100. Should be similar silicon (right?)

(In reply to comment #21)
> Does commenting pDRIInfo->texOffsetStart = I830TexOffsetStart; in i830_dri.c
> fix it for all others? For me it does not seem to help. Changed a machine,
> though, this one is a laptop with GMA X3100. And nowadays it's white screen, or
> like corrected afterwards white cube / desktop (I can turn it around).
> 
> drm / libdrm git, mesa git ("7.1rc1"), intel git, ttm enabled. However, xserver
> 1.4.1 this time since I couldn't get my xserver 1.5-branch git to actually run
> (socket failures / problems, I'll try to get it running though again later).
> Other OpenGL stuff works more or less, like Flight Gear, if I just first
> replace compiz wm with metacity after logging in (compiz enabled by default).
> 

Comment 23 Timo Jyrinki 2008-06-08 03:23:29 UTC
(In reply to comment #22)
> Yep, it helps for me (I'm running compiz presently). Are you sure you're
> running with indirect rendering?

You're right. Now running compiz with mesa git trunk succesfully, and indeed with the mentioned line commented out in i830_dri.c. I also got my xserver 1.5 running, though the keyboard settings are a mystery to me.
Comment 24 Timo Jyrinki 2008-07-15 02:56:03 UTC
Would anyone have information on whether the comment 9:s fix/workaround is "correct" and doesn't cause any side effects for any users? Distributions would probably want Intel + Compiz to work.
Comment 25 Michel Dänzer 2008-07-15 03:13:10 UTC
(In reply to comment #24)
> Would anyone have information on whether the comment 9:s fix/workaround is
> "correct" and doesn't cause any side effects for any users? 

The workaround disables zero-copy texture-from-pixmap with all 3D drivers. If the corresponding support in the i965 driver can't be fixed, it would be much better to just disable that instead.

> Distributions would probably want Intel + Compiz to work.

Sure, which is why I made this a blocker for Mesa 7.1. :) Not sure how much longer Brian is holding out though.
Comment 26 Dave Airlie 2008-07-24 23:57:33 UTC
Created attachment 17877 [details] [review]
patch on top of current mesa...

please try this out.. 

I haven't tested it on real hw, its just guess work until I get to a 965 machine.
Comment 27 Dave Airlie 2008-07-25 01:32:42 UTC
Created attachment 17878 [details] [review]
try 2.. fail on the first attempt.
Comment 28 Dave Airlie 2008-07-25 02:34:03 UTC
Created attachment 17885 [details]
try 3 - now with 100% less fail

okay lets go again.
Comment 29 Dave Airlie 2008-07-25 02:59:22 UTC
patch checked into mesa master.
Comment 30 Sean Estabrooks 2008-07-26 01:01:18 UTC
(In reply to comment #29)
> patch checked into mesa master.
> 

Thanks very much for working on this and committing a fix.  Unfortunately with latest Git xserver/mesa/intel my system locks up hard when compiz starts.  Perhaps it's unrelated to this fix.  I hope to get a chance to look at it further in the next few days.  Hopefully others will report back if this patch works for them too.

Comment 31 Sean Estabrooks 2008-07-31 12:38:33 UTC
Sorry for the delay in testing, but it's working well now here.
Thanks!
Comment 32 Adam Jackson 2009-08-24 12:29:22 UTC
Mass version move, cvs -> git

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.