Bug 62036 - R128 + EXA + DRI = green color/tint in black areas and unreadable text
Summary: R128 + EXA + DRI = green color/tint in black areas and unreadable text
Status: RESOLVED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/rage128 (show other bugs)
Version: unspecified
Hardware: PowerPC Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-08 19:33 UTC by Str8bs
Modified: 2014-04-09 18:38 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
scrot1 original (315.42 KB, text/plain)
2013-03-08 19:33 UTC, Str8bs
no flags Details
with EXANoComposite True (283.58 KB, image/png)
2013-03-08 19:34 UTC, Str8bs
no flags Details
Scrot1 (315.42 KB, image/png)
2013-03-08 19:40 UTC, Str8bs
no flags Details
Scrot3 (311.96 KB, image/png)
2013-03-08 19:41 UTC, Str8bs
no flags Details
Scrot4 (313.55 KB, text/plain)
2013-03-08 19:42 UTC, Str8bs
no flags Details
lspci-vvv (4.28 KB, text/plain)
2013-03-08 19:42 UTC, Str8bs
no flags Details
Xorg.0.log withOUT workarounds (37.20 KB, text/plain)
2013-03-08 19:43 UTC, Str8bs
no flags Details
Xorg.0.log WITH workarounds (37.12 KB, text/plain)
2013-03-08 19:44 UTC, Str8bs
no flags Details
xorg.conf includes comments of other things tried (1.29 KB, text/plain)
2013-03-08 19:48 UTC, Str8bs
no flags Details
dmesg output (24.01 KB, text/plain)
2013-03-08 19:49 UTC, Str8bs
no flags Details
Replacing Scrot4 (313.55 KB, image/png)
2013-03-08 20:39 UTC, Str8bs
no flags Details

Description Str8bs 2013-03-08 19:33:57 UTC
Created attachment 76177 [details]
scrot1 original

Dear Maintainer,

Xubuntu 12.04 - Without disabling DRI or switching to XAA, black areas are green and text is corrupt (looks double strike?) See attached Scrot1.

Hardware - IMAC G3 600 with Rage 128 Ultra 16M
(This hardware also has this bug:https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-r128/+bug/1023975
requiring workaround of ForcePCIMode to enable DRI.)

Workaround attempts in order and accumulative:

Adding EXANoComposite True completely clears up text and icons now look correct. See attached Scrot2.

Adding enable compositing in window manage clears up more of the green. Scrot3

Adjusting "Alpha" in panel preferences cleans up more green in top panel. See Scrot4.

Via help from a forum, I installed patch I think includes this code:
http://cgit.freedesktop.org/xorg/driver/xf86-video-r128/tree/src/r128_accel.c#n1072 (My skills are limited.)

With that patch and EXANoComposite PLUS MigrationHeuristic greedy = all issues appear to resolved. With and without compositing enabled in window manager.

All of the attached logs are with that patch. I am new and really don't have a clue what is or is not relevant. Any guidance helping me to be more efficient at aiding (and less annoying) to you fine people would appreciated.

Thank you
Comment 1 Str8bs 2013-03-08 19:34:56 UTC
Created attachment 76178 [details]
with EXANoComposite True
Comment 2 Str8bs 2013-03-08 19:40:36 UTC
Created attachment 76179 [details]
Scrot1

Re-attaching scrot 1
Sorry for the first attempted screenshot. How to remove/strike?
Comment 3 Str8bs 2013-03-08 19:41:38 UTC
Created attachment 76180 [details]
Scrot3
Comment 4 Str8bs 2013-03-08 19:42:03 UTC
Created attachment 76181 [details]
Scrot4
Comment 5 Str8bs 2013-03-08 19:42:54 UTC
Created attachment 76182 [details]
lspci-vvv
Comment 6 Str8bs 2013-03-08 19:43:45 UTC
Created attachment 76183 [details]
Xorg.0.log withOUT workarounds
Comment 7 Str8bs 2013-03-08 19:44:16 UTC
Created attachment 76184 [details]
Xorg.0.log WITH workarounds
Comment 8 Str8bs 2013-03-08 19:48:44 UTC
Created attachment 76185 [details]
xorg.conf includes comments of other things tried
Comment 9 Str8bs 2013-03-08 19:49:13 UTC
Created attachment 76186 [details]
dmesg output
Comment 10 Str8bs 2013-03-08 20:39:07 UTC
Created attachment 76190 [details]
Replacing Scrot4

Did it again. Replacing scrot 4. My apologies for the bug spam.
Comment 11 Adam 2013-03-09 08:22:37 UTC
Just to clarify, the patch was

    if (info->directRenderingEnabled)
-	OUTREGP(R128_DP_DATATYPE, 0, ~R128_HOST_BIG_ENDIAN_EN);
+	OUTREGP(R128_DP_DATATYPE, R128_HOST_BIG_ENDIAN_EN, ~R128_HOST_BIG_ENDIAN_EN);
    else

Str8bs, did you verify that EXANoComposite + MigrationHeuristic Greedy didn't solve colours without the patch?

That icon on your bottom panel that is green is your 'trash' icon.  Strangely, that is often messed up for me with my radeon card and EXA (it is just a random mess of colours).  MigrationHeuristic Greedy solves it for me too, although firefox is noticeably slower with that setting (and I don't use it).

The top panel should be a dark grey, almost black colour. It may help with the screenshots to keep a consistent alpha value.
Comment 12 Connor Behan 2013-03-10 03:12:08 UTC
You might not have to use ExaNoComposite anymore once cairo 1.12 gets packaged. I noticed defects with cairo 1.10 text as well but cairo 1.12 handles it more efficiently. Once I added "SolidPicture" support to the driver and upgraded cairo, text looked a lot better.

You also might not have to adjust the alpha used by xfwm4 if you put
Section "Extensions"
  Option "Composite" "false"
EndSection
in your xorg.conf. I remember seeing messed up colors in xfce apps that used libXcomposite but this was worse with XAA on my system.

Anyway, I have already thought about the issues that don't specifically have to do with the big endian byte order so I suggest that you keep ExaNoComposite "true" and window manager compositing on for the time being.

Like Adam, I suspect that MigrationHeuristic "greedy" is the only thing that solved your problem. The effect of this is to fall back to software 99% of the time so EXA hardly ever gets used. Therefore I suggest that you don't use this if you want to test EXA patches.

Can you test four cases four me? (OUTREGP patch not applied, DRI off), (OUTREGP patch applied, DRI off), (OUTREGP patch not applied, DRI on), (OUTREGP patch applied, DRI on). Each time I want to know if there are any color changes in 2D apps (like the xfce panel) and 3D apps (like glxgears).
Comment 13 Connor Behan 2013-03-10 06:28:08 UTC
Ack, just 3 cases are needed. (patch applied, DRI on), (patch not applied, DRI on) and (DRI off). All with ExaNoComposite "true", no MigrationHeuristic set and whatever xfce settings you think are the best.
Comment 14 Str8bs 2013-03-10 16:11:42 UTC
Mr. Behan,
I have issues compiling (probably my lack of skills) so Adam was compiling for me.
So as not to waste your time:

Adam:
Please confirm the first R128 you gave via .deb was WITH OUTREGP patch and R128v2 was WITHOUT OUTREGP patch.
Testing now based on this assumption.

and yes, dark grey upper panel/bar as expected where I noted all issues apparently resolved. Alpha is at default except that one example.
Comment 15 Adam 2013-03-10 19:03:53 UTC
Yep, that's right.  If you are not sure you can open up the deb with archive manager and find the changelog.  Currently there are 4 versions floating about:

The first unpatched on the iso - (6.9.1-0ubuntu2)
The 6.9.1-0ubuntu3 I released with the OUTREGP patch
The 6.9.1-0ubuntu4 with the solid picture patch
The 6.9.1-0ubuntu5 with the OUTREGP patch and the solid picture patch.

I compiled cairo 1.12.2 too (which I assume you've found), so you can see if that makes a difference.  From my own experiments with my radeon card, you'll definitely have funny colours with that unless you use one of the versions with the solid picture patch.
Comment 16 Str8bs 2013-03-11 06:27:59 UTC
I could not observe any changes with or without OUTREGP patch. Will test SolidPicture patch.

The following is an attempt at more detailed notes of what I observe. I have a screenshot of each case if needed.

Constants:
EnablePageFlip True
EXANoComposite True
Window Manager Compositor Disabled


DRI Enabled and Extensions Composite False:
XFCE Panels and GLXgears colors look correct.
Terminal colors look correct.
Mouse pointer turns black when GLXgears is launched.
Goes back to white when GLXgears closed.

DRI Enabled and Extensions Composite True:
XFCE Panels are green. Mousing over icons in panel turns that square background black. It remains black once mouse moved elsewhere.
Terminal is green tinted white instead of grey. Launching GLXgears lines in terminal turns expected grey. Subsequent launches of terminal are expected grey. 
Mouse pointer turns black when GLXgears is launched.
Goes back to white when GLXgears closed.

DRI Disabled and Extensions Composite False:
XFCE Panels and GLXgears colors look correct.
Terminal colors look correct.
Mouse pointer remains white when GLXgears is launched.

DRI Disabled and Extensions Composite True:
XFCE Panels are green. Mousing over icons in panel turns that square background black. Does not remain black when mouse is moved elsewhere.
Terminal is green tinted white. Remains green when GlXgears is launched.
Mouse pointer remains white when glxgears is launched.

Thanks
Comment 17 Connor Behan 2013-03-12 20:33:28 UTC
So even the color change of the cursor and terminal are not affected by the patch? I guess this is not an endian problem then. I'll have to find out more about pitfalls with EXA + XComposite.
Comment 18 Str8bs 2013-03-14 03:35:48 UTC
Correct. That list was the same patched and not patched.
Comment 19 Str8bs 2013-04-08 23:42:54 UTC
Ubuntu 13.04 on iMac G3 R128 Ultra  3.8.0-7-powerpc-smp #13-Ubuntu SMP
withOUT oldmesa installed.
At 16 bit color, LXTerminal is green instead of black. At 24 bit color, LXTerminal looks as expected. No text issues apparent in either case.

I believe all the previous Ubuntu 12.04 tests I posted were at 16 bit. Any use to repeat at 24?
Comment 20 Connor Behan 2013-04-09 21:55:54 UTC
So using 24 bit depth helps? EXA and DRI are still active according to the log file right? If so, another case breakdown like comment 16 would help.
Comment 21 Str8bs 2013-04-11 18:12:32 UTC
Comment #19 was daily test ISO of Lubuntu without old mesa so DRI was not enabled.
LXTerminal was green instead of black. Changing color depth from 16 to 24 resolved. Occasional black bar on one line instead of text in Firefox browsing.Scrolling or clicking clears the black bar. Should this be a new bug report?

Reverting back to original bug report which is Xubuntu 12.04 without OUTREGP patch.Old mesa is installed and DRI IS enabled. Changing depth from 16 to 24 resolves all issues. No options used in xorg.conf related to composite or EXA options.
Mouse pointer turns black when running GLXgears and goes back to white when stopped. (Note: it does the black mouse pointer in GLXgears with XAA also.)

I will get you a full redo of breakdown like comment #16 with/without patch at 24 bit color over the weekend.

Thanks
Comment 22 Str8bs 2013-04-15 07:50:34 UTC
So to the "constants" in comment #16 should have also had ColorDepth 16

The following constants:
Constants:
EnablePageFlip True
EXANoComposite True
Window Manager Compositor Disabled
ColorDepth 24

I observe no problems with or without OUTREGP patch.

DRI Enabled and Extensions Composite False
XFCE Panels and GLXgears colors look correct.
Terminal is expected gray.
Mouse pointer turns black when glxgears is lauched.
Goes back to white when glxgears closed.

DRI Enabled and Extensions Composite True
XFCE Panels and GLXgears colors look correct.
Terminal is expected gray.
Mouse pointer turns black when glxgears is lauched.
Goes back to white when glxgears closed.

DRI Disabled and Extensions Composite False
XFCE Panels and GLXgears colors look correct.
Terminal Colors look correct.
Mouse pointer remains white when glxgears is launched.

DRI Disabled and Extensions Composite True
XFCE Panels are expected grey. Mousing over icons in panel turns that square background black.
Does not remain black when mouse is moved elsewhere.
Terminal is expected gray.
Mouse pointer remains white when glxgears is launched.
Comment 23 Adam Jackson 2014-04-09 18:38:54 UTC
There's no longer an r128 DRI driver.


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.