SecondLife, GL.O.B.S. and other GL apps have a Black Window on Radeon drivers - Patch available

Bug #90169 reported by Marco Trevisan (Treviño) on 2007-03-06
2
Affects Status Importance Assigned to Milestone
X.Org X server
Invalid
Medium
mesa (Debian)
Invalid
Undecided
Unassigned
mesa (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: libgl1-mesa-dri

Upgrading to Mesa 6.5.2 on radeon driver (r200, r300...) some apps (like Globs and Second Life client) shows a black window (screen) without showing its content (that seem to run well, also if it isn't visible); some of them (SecondLife) could be seen anyway after a window resize as a workaround.

Anyway Michel Dänzer pushed a patch to fix this on r300; All is referenced and solved here: https://bugs.freedesktop.org/show_bug.cgi?id=9876

Applying the attached patch to the Ubuntu Sources fixes the bug for all the apps I tested.

Please, add this to the ubuntu package, I've attached also a patch file showing diff to integrate this into the ubuntu mesa sources.

Related branches

Do you get a black screen (with only right mouse pointer)?
I get that from when I'm using Xorg 7.2 and Mesa 6.5.2; I get the same also using Globs Benchmarks http://globs.sourceforge.net/

I tested Second Life on r300 and noticed that login screen is not visible until you change size of the window. After that you can use the menu and even play.

(In reply to comment #3)
> I tested Second Life on r300 and noticed that login screen is not visible until
> you change size of the window. After that you can use the menu and even play.

That's the same here... Maybe on first loading the window isn't designed, so after resizing there's a forced redesign that make the game show again...

(In reply to comment #4)
> (In reply to comment #3)
> > I tested Second Life on r300 and noticed that login screen is not visible until
> > you change size of the window. After that you can use the menu and even play.
>
> That's the same here... Maybe on first loading the window isn't designed, so
> after resizing there's a forced redesign that make the game show again...
>

but why is indirect rendering working then?

(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > I tested Second Life on r300 and noticed that login screen is not visible until
> > > you change size of the window. After that you can use the menu and even play.
> >
> > That's the same here... Maybe on first loading the window isn't designed, so
> > after resizing there's a forced redesign that make the game show again...
> >
>
> but why is indirect rendering working then?
>

No idea, I was just wondering...

Can somebody test the patch I pushed? It sounds like it could help.

BTW Second Life client is free, with source.

(In reply to comment #7)
> Can somebody test the patch I pushed? It sounds like it could help.

I planned that, I've to recompile my mesa... I'll report after testing ;)

(In reply to comment #9)
> (In reply to comment #7)
> > Can somebody test the patch I pushed? It sounds like it could help.
>
> I planned that, I've to recompile my mesa... I'll report after testing ;)

Just finished to compile the patched version and it works like a charm :)

I mean, there's no more a black screen neither on GL.O.B.S. neither on SecondLife, so good patch!

I've applied to the ubuntu mesa 6.5.2 and patched all correctly (no warnings, no errors) so I'll post on launchpad too!

Bye and again thanks, I think we can close the bug :)

michael: can you also patch r200 please. I tried it myself, but seems my patch was so poor, that it crashed the application :-(

was something like that:

diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index fc6eb93..25e697e 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -680,6 +680,8 @@ r200MakeCurrent( __DRIcontextPrivate *dr

         r200UpdateWindow( newCtx->glCtx );
         r200UpdateViewportOffset( newCtx->glCtx );
+
+ r200SetCliprects(newCtx, GL_BACK_LEFT);
       }

       _mesa_make_current( newCtx->glCtx,
diff --git a/src/mesa/drivers/dri/r200/r200_lock.c b/src/mesa/drivers/dri/r200/r200_lock.c
index bcc0c91..8eec3c6 100644
--- a/src/mesa/drivers/dri/r200/r200_lock.c
+++ b/src/mesa/drivers/dri/r200/r200_lock.c
@@ -98,7 +98,7 @@ void r200GetLock( r200ContextPtr rmesa,
          r200SetCliprects( rmesa, GL_FRONT_LEFT );
       r200UpdateViewportOffset( rmesa->glCtx );
       driUpdateFramebufferSize(rmesa->glCtx, drawable);
- rmesa->lastStamp = drawable->lastStamp;
+// rmesa->lastStamp = drawable->lastStamp;
    }

    R200_STATECHANGE( rmesa, ctx );
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index bdb487f..2856b75 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -1889,6 +1889,8 @@ void r200SetCliprects( r200ContextPtr rm

    if (rmesa->state.scissor.enabled)
       r200RecalcScissorRects( rmesa );
+
+ rmesa->lastStamp = drawable->lastStamp;
 }

> I've applied to the ubuntu mesa 6.5.2 and patched all correctly (no warnings,
> no errors) so I'll post on launchpad too!

Here you are the launchpad bug I've posted: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/90169

(In reply to comment #11)
> michael: can you also patch r200 please. I tried it myself, but seems my patch
> was so poor, that it crashed the application :-(

I think if anything you should set the front cliprects, but I doubt that's why it crashes. I'm afraid someone with the hardware will have to do it, e.g. Roland. Although it might help if you could attach a backtrace from gdb.

(In reply to comment #13)
> (In reply to comment #11)
> > michael: can you also patch r200 please. I tried it myself, but seems my patch
> > was so poor, that it crashed the application :-(
>
> I think if anything you should set the front cliprects, but I doubt that's why
> it crashes. I'm afraid someone with the hardware will have to do it, e.g.
> Roland. Although it might help if you could attach a backtrace from gdb.

Marc, your patch works for me (tested with globs, not 2nd life though), no matter if GL_FRONT_LEFT or GL_BACK_LEFT is used in r200MakeCurrent.
If you're seeing an assertion fail in _mesa_reference_framebuffer as I do, this is a different problem in mesa git not directly related to this patch. Otherwise, as Michel said, a backtrace might be helpful.
Oh, and I'd bet radeon would need the same fix too.

Binary package hint: libgl1-mesa-dri

Upgrading to Mesa 6.5.2 some apps (like Globs and Second Life client) shows a black window (screen) without showing its content (that seem to run well, also if it isn't visible); some of them (SecondLife) could be seen anyway after a window resize as a workaround.

Anyway Michel Dänzer pushed a patch to fix this; All is referenced and solved here: https://bugs.freedesktop.org/show_bug.cgi?id=9876

Applying the attached patch to the Ubuntu Sources fixes the bug for all the apps I tested.

Please, add this to the ubuntu package, I've attached also a patch file showing diff to integrate this into the ubuntu mesa sources.

This problem happens also on other radeon hardware, the patch I've applied works and is tested only on r300 cards, this should be applied to other cards families too; follow the freedesktop bug to get this...
There's also an r200 patch in WIP status.

description: updated
description: updated

(In reply to comment #14)
> Marc, your patch works for me (tested with globs, not 2nd life though), no
> matter if GL_FRONT_LEFT or GL_BACK_LEFT is used in r200MakeCurrent.
> If you're seeing an assertion fail in _mesa_reference_framebuffer as I do, this
> is a different problem in mesa git not directly related to this patch.

seems to be fixed meantime.

> Otherwise, as Michel said, a backtrace might be helpful.
> Oh, and I'd bet radeon would need the same fix too.

I can confirm that with upper patch+GL_FRONT_LEFT shows the login screen on r200. The crash I have seen is possible related to something else. Will file another bug, when I know who is causing it.

Created an attachment (id=9022)
Patch for r200 on Mesa 6.5.2

I've modified the patch posted by Marc to make it work on Mesa 6.5.2 base for ubuntu package.

Changed in xorg-server:
status: Unknown → Rejected

Added patch for r200 radeon hardware based on one taken from freedesktop bugzilla adapted to Mesa 6.5.2 ubuntu sources.

*** Bug 10192 has been marked as a duplicate of this bug. ***

Philip Falkner (philafel) wrote :

Please include this patch in Feisty. I'm developing the compositing version of KWin in KDE, and it simply does not work with hardware acceleration (r200) without this patch.

I've verified that this patch does fix the problem, and doesn't appear to cause any other problems.

https://bugs.freedesktop.org/show_bug.cgi?id=10192 is the radeon/r200 version of the previous freedesktop bug.

Also, note that the fixes have been committed upstream:
http://gitweb.freedesktop.org/?p=mesa/mesa.git;a=commit;h=6f9b1afc862851532e4820705c412388b497ad58
http://gitweb.freedesktop.org/?p=mesa/mesa.git;a=commit;h=88501887e48d1619e4296afa609dfe9904b81a70
http://gitweb.freedesktop.org/?p=mesa/mesa.git;a=commit;h=33ea9dccaf31c2dfb0961847eedfe75336d9c80f
http://gitweb.freedesktop.org/?p=mesa/mesa.git;a=commit;h=d0a3400f66b8c4ace7ebef6d0a944376d5203756

This should be completely fixed using mesa 6.5.2-3ubuntu6

Philip Falkner (philafel) wrote :

Yes indeed. Thank you!

Timo Aaltonen (tjaalton) wrote :

closing bogus component

Changed in mesa:
status: Unconfirmed → Rejected
Timo Aaltonen (tjaalton) wrote :

yep, latest mesa upload fixed this.

Changed in mesa:
status: Confirmed → Fix Released
Davide Bertola (dade) wrote :

I still have the same bug.
The windows content is not black but does not redraw..

my lspci -vvv

01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R250 [Mobility FireGL 9000] (rev 01) (prog-if 00 [VGA])
        Subsystem: Acer Incorporated [ALI] Unknown device 001f
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR+ FastB2B+
        Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 66 (2000ns min), Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 10
        Region 0: Memory at d8000000 (32-bit, prefetchable) [size=128M]
        Region 1: I/O ports at 3000 [size=256]
        Region 2: Memory at d0100000 (32-bit, non-prefetchable) [size=64K]
        [virtual] Expansion ROM at d0120000 [disabled] [size=128K]
        Capabilities: [58] AGP version 2.0
                Status: RQ=48 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW+ AGP3- Rate=x1,x2,x4
                Command: RQ=32 ArqSz=0 Cal=0 SBA+ AGP+ GART64- 64bit- FW- Rate=x1
        Capabilities: [50] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

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

Other bug subscribers

Remote bug watches

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