Bug 104597 - [bisected] Compton weird colors
Summary: [bisected] Compton weird colors
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
: 104540 105824 105918 108937 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-01-12 11:34 UTC by Christoph Haag
Modified: 2019-09-25 18:02 UTC (History)
8 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Desktop with compton --backend glx (326.80 KB, image/png)
2018-01-12 11:34 UTC, Christoph Haag
Details
xdpyinfo (125.04 KB, text/plain)
2018-01-12 21:53 UTC, Christoph Haag
Details
glxinfo (125.82 KB, text/plain)
2018-01-12 21:53 UTC, Christoph Haag
Details
Possible fix, tested against server 1.19 branch. (1.74 KB, patch)
2018-01-31 13:02 UTC, Mario Kleiner
Details | Splinter Review

Description Christoph Haag 2018-01-12 11:34:57 UTC
Created attachment 136675 [details]
Desktop with compton --backend glx

RX 480, mesa master.

Running compton --backend glx produces the effect in the attached image. The colors are corrupted, but some applications look correct.

There is one situation where I have seen a similar effect not involving compton and that is kwin's window preview of SteamVR's vrmonitor: https://www.youtube.com/watch?v=IHHQS_Q5uqE. All other window previews work correctly, it's only the vrmonitor that's broken.
But that's enough to say it's not a compton specific problem.
Comment 1 Michel Dänzer 2018-01-12 15:22:12 UTC
It could be similar bugs in compton and kwin. :)

If this started recently, maybe you can try bisecting Mesa.

I wonder if this might be related to bug 104599.
Comment 2 Christoph Haag 2018-01-12 16:25:29 UTC
e5ff036c6751c39ee008ca7db47b3ce4d7a38a15 is the first bad commit
commit e5ff036c6751c39ee008ca7db47b3ce4d7a38a15
Author: Mario Kleiner <mario.kleiner.de@gmail.com>
Date:   Fri Dec 15 23:05:07 2017 +0100

    st/dri: Add support for BGR[A/X]1010102 formats.

    Exposes RGBA 10 10 10 2 and 10 10 10 0 visuals and
    fbconfigs for rendering.

    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    Reviewed-by: Marek Olšák <marek.olsak@amd.com>
    Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Comment 3 network723 2018-01-12 19:26:02 UTC
bug 104540 is probably the very same issue, since OBS uses Xcomposite to capture a window.
Comment 4 network723 2018-01-12 19:26:41 UTC
*** Bug 104540 has been marked as a duplicate of this bug. ***
Comment 5 Mario Kleiner 2018-01-12 21:49:19 UTC
Can you try what happens if you add the following snippet
inside the <device> section of your /etc/drirc and restart compton?

<application name="compton" executable="compton">
    <option name="allow_rgb10_configs" value="false"/>
</application>

The output of xdpyinfo and glxinfo could also be useful.

To disable the new rgb10 support globally, one can add this snippet instead:

<option name="allow_rgb10_configs" value="false"/>
Comment 6 Christoph Haag 2018-01-12 21:53:23 UTC
Created attachment 136700 [details]
xdpyinfo

No need to add to drirc, you can also set drirc options with an environment variable.

This indeed works fine, no color issue:
allow_rgb10_configs=false compton --backend glx
Comment 7 Christoph Haag 2018-01-12 21:53:33 UTC
Created attachment 136701 [details]
glxinfo
Comment 8 Mario Kleiner 2018-01-17 02:50:23 UTC
compton didn't cause problems for me under default 24 bit color-depth on X-Server 1.19.3.

But Christoph's setup is running the new server 1.19.6, and the glxinfo shows various new 32 bit visuals, not only rgba 8 8 8 8 but also rgba 10 10 10 2.

1.19.6 contains the patch "glx: Duplicate relevant fbconfigs for compositing visuals" backported from master, adding lots new 32 bpp compositing visuals, so that might trigger the problems?
Comment 9 Fredrik Höglund 2018-01-17 04:26:49 UTC
The broken window preview is actually a bug in plasma.

The thumbnail code doesn't look at the sizes of the color channels; it only checks that the GLX_BUFFER_SIZE matches the depth of the window.
Comment 10 Mario Kleiner 2018-01-31 13:02:51 UTC
Created attachment 137087 [details] [review]
Possible fix, tested against server 1.19 branch.

This patch fixes the problem with compton, as tested against server 1.19 branch. Also applies cleanly against master, but i haven't tested it on master yet.

So far tested with KDE-5, compiz, and compton, on ati-ddx under Radeon gfx, both screen depth 24 and 30.
Comment 11 Thomas Crider 2018-02-16 06:49:29 UTC
(In reply to Mario Kleiner from comment #10)
> Created attachment 137087 [details] [review] [review]
> Possible fix, tested against server 1.19 branch.
> 
> This patch fixes the problem with compton, as tested against server 1.19
> branch. Also applies cleanly against master, but i haven't tested it on
> master yet.
> 
> So far tested with KDE-5, compiz, and compton, on ati-ddx under Radeon gfx,
> both screen depth 24 and 30.

tested here 1.19 as well, sadly does not fix the issue with OBS xcomposite window capture mentioned in https://bugs.freedesktop.org/show_bug.cgi?id=104540
Comment 12 Thomas Crider 2018-02-16 06:52:36 UTC
(In reply to Mario Kleiner from comment #5)
> Can you try what happens if you add the following snippet
> inside the <device> section of your /etc/drirc and restart compton?
> 
> <application name="compton" executable="compton">
>     <option name="allow_rgb10_configs" value="false"/>
> </application>
> 
> The output of xdpyinfo and glxinfo could also be useful.
> 
> To disable the new rgb10 support globally, one can add this snippet instead:
> 
> <option name="allow_rgb10_configs" value="false"/>

adding this for obs resolves https://bugs.freedesktop.org/show_bug.cgi?id=104540

<application name="obs" executable="obs">
     <option name="allow_rgb10_configs" value="false"/>
</application>
Comment 13 Michel Dänzer 2018-02-16 08:35:43 UTC
(In reply to gloriouseggroll from comment #12)
> adding this for obs resolves
> https://bugs.freedesktop.org/show_bug.cgi?id=104540

That probably means it's an OBS bug, not handling 10bpc configs correctly. Please report it to the OBS developers.
Comment 14 Luke A. Guest 2018-02-22 15:55:13 UTC
Looks like it's the same as https://obsproject.com/forum/threads/xcomposite-colours-all-wrong.81265/ and https://obsproject.com/forum/threads/xcomposite-window-capture-not-working.81389/.

It's been pointed out it's not Obs as TyMiles2012 moved back from the Oibaf PPA on Ubuntu 17.10.1 back to standard drivers and it no longer affects him.
Comment 15 Michel Dänzer 2018-02-22 16:00:22 UTC
(In reply to Luke A. Guest from comment #14)
> It's been pointed out it's not Obs as TyMiles2012 moved back from the Oibaf
> PPA on Ubuntu 17.10.1 back to standard drivers and it no longer affects him.

That doesn't mean it's a Mesa bug, just that the OBS issue was triggered by a change in Mesa's behaviour (it now exposes 10-bit-per-component colour configs).
Comment 16 Dave Gilbert 2018-03-31 12:16:09 UTC
*** Bug 105824 has been marked as a duplicate of this bug. ***
Comment 17 Timothy Arceri 2018-04-09 20:56:49 UTC
*** Bug 105918 has been marked as a duplicate of this bug. ***
Comment 18 Christian König 2018-12-05 07:39:43 UTC
*** Bug 108937 has been marked as a duplicate of this bug. ***
Comment 19 GitLab Migration User 2019-09-25 18:02:26 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1299.


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.