Bug 328518 - Random textured triangles on AMD Catalyst
Summary: Random textured triangles on AMD Catalyst
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 4.11.3
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-07 20:05 UTC by Timothy Baldwin
Modified: 2016-11-02 14:40 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
thomas.luebking: Catalyst+


Attachments
Screenshot (809.46 KB, image/png)
2013-12-07 20:07 UTC, Timothy Baldwin
Details
Debug Info (34.74 KB, application/octet-stream)
2013-12-15 20:37 UTC, Timothy Baldwin
Details
xorg logs, xorg settings, glxinfos, kwin support, xsession-errors, screenshots, etc. (2.09 MB, application/x-xz)
2014-01-03 14:15 UTC, Tamás Gere
Details
fglrx 13.251 screenshot (1.19 MB, image/png)
2014-03-05 16:44 UTC, Allen Webb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Baldwin 2013-12-07 20:05:47 UTC
With AMD Cataylst driver 13.8~beta1 and AMD A8-5600k (AMD Radeon HD 7560D) screen redraws are as somewhat randomised traingles containing part of the area to be redrawn in the area to be redrwan.

Reproducible: Always

Steps to Reproduce:
1. Open Dolphin
2. Set list view
3. Drag a file with a long name



Using git bisect I have tracked the problem to commit 1f0bb6d36075b0b14c927b91d5c3df6720826afd
Comment 1 Timothy Baldwin 2013-12-07 20:07:16 UTC
Created attachment 83976 [details]
Screenshot
Comment 2 Thomas Lübking 2013-12-07 20:18:02 UTC
Thanks for the bisect.
Can you also attach the outputs of "qdbus org.kde.kwin /KWin supportInformation" and "glxinfo"?

I assume returning false in libkwineffects/kwinglutils.cpp:1964

bool GLVertexBuffer::supportsIndexedQuads()
{
    return false; // just for testing
    return GLVertexBufferPrivate::supportsIndexedQuads;
}

would fix it as well then?
Comment 3 Timothy Baldwin 2013-12-15 20:37:04 UTC
Created attachment 84115 [details]
Debug Info
Comment 4 Timothy Baldwin 2013-12-15 20:38:31 UTC
Making a simular change fixes it, I removed the code that sets GLVertexBufferPrivate::supportsIndexedQuads to true.
Comment 5 Thomas Lübking 2013-12-15 23:43:33 UTC
I assume it's a problem in the fglrx beta and bet that
GLX_MESA_copy_sub_buffer
is a lie.

Can you install the stable (former, one that doesn't cause this) fglrx version and provide a counter glxinfo?
Comment 6 Tamás Gere 2014-01-03 14:14:18 UTC
Hello!

I have same problem with HD8670D (A10-6800K APU). Now using xorg 1.13 (same result with 1.14).
I've set up dual monitor and the effect is more intense here then on the screenshot attached.

I tried lots of combination of fglrx/xorg and settings. Until now the fglrx 13.4 and xorg 1.13 does not produce the effect (didn't try the 13.9 / 1.13 combo yet), however that still can't use because the whole environment become unstable (painful lag spikes on rendering).

I figured some lines in .xsession-errors when the effect happens:
QWidget::setMinimumSize: (/KCommonDecorationButton) Negative sizes (-6,-6) are not possible
kwin(4688) KWin::x11ErrorHandler: kwin: X Error ( "error: BadPixmap [4], request: X_ChangeGC[56]" )
...
Also this when the lag spike happens with the fglrx 13.4:
kwin(4724) KWin::x11ErrorHandler: kwin: X Error ( "error: BadDrawable [9], request: X_GetGeometry[14]" ) 
kwin(4724) KWin::x11ErrorHandler: kwin: X Error ( "error: BadDrawable [9], request: RenderCreatePicture[RENDER+4]" ) 
...
This happens all the time with every combination:
kwin(4724) KWin::x11ErrorHandler: kwin: X Error ( "error: BadDamage [DAMAGE+0], request: XDamageDestroy[DAMAGE+2], resource: 0x7400075" ) 
kwin(4724) KWin::x11ErrorHandler: kwin: X Error ( "error: BadDamage [DAMAGE+0], request: XDamageDestroy[DAMAGE+2], resource: 0x740007e" ) 
kwin(4724) KWin::x11ErrorHandler: kwin: X Error ( "error: BadDamage [DAMAGE+0], request: XDamageDestroy[DAMAGE+2], resource: 0x1800068" ) 
...
I also tried to play with the "UseFastTLS" and the "DamageEvents" setting in xorg.conf's Device section, but no luck.

I collected some stuff: xorg logs, xorg settings, glxinfos, kwin support, xsession-errors, screenshots, etc., say if you want more. I'm attaching as a compressed tar.

PS: GLX_MESA_copy_sub_buffer seems wrong way, since all ati-drivers (incl. stables) has it.
Comment 7 Tamás Gere 2014-01-03 14:15:19 UTC
Created attachment 84430 [details]
xorg logs, xorg settings, glxinfos, kwin support, xsession-errors, screenshots, etc.
Comment 8 Thomas Lübking 2014-01-03 17:10:59 UTC
Can you verify comments #2 & #4 (means to recompile kwin)
Comment 9 Denis M. (Phr33d0m) 2014-02-22 18:50:32 UTC
Hi, just wanted to say that comment 2 fixed this *annoying* issue I've been having for *months*.
Comment 10 Thomas Lübking 2014-02-22 20:14:58 UTC
Fredrik thinks, the actual issue is in libkwineffects/kwinglutils.cpp:1442
void IndexBuffer::accomodate(int count)

For a very wild shot, could you inject "glFlush();" behind
glBufferData(GL_ELEMENT_ARRAY_BUFFER, size, NULL, GL_STATIC_DRAW);
and behind
glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_ELEMENT_ARRAY_BUFFER, 0, 0, m_size); ?
Comment 11 Allen Webb 2014-03-05 16:41:32 UTC
I am seeing a similar problem with KDE 4.11 (on kubuntu 13.10) using fglrx 13.251 (catalyst 13.12). I will attach a screenshot. What can I do to determine if it is a duplicate bug or not?
Comment 12 Allen Webb 2014-03-05 16:44:17 UTC
Created attachment 85426 [details]
fglrx 13.251 screenshot

Corruption when minimizing or maximizing a window on KDE 4.11 when using fglrx 13.251
Comment 13 Thomas Lübking 2014-03-05 23:25:15 UTC
(In reply to comment #11)
> What can I do to determine if it is a duplicate bug or not?
Can you compile a patched version of kwin?
Comment 14 Allen Webb 2014-03-06 00:43:47 UTC
I made the changes suggested in comment #10 and it didn't resolve the issue. I also am not seeing anything added to .xsession-errors which makes me believe I am seeing a different problem.
Comment 15 Thomas Lübking 2014-03-06 00:46:50 UTC
See comment #2 - it's nowhere clear whether the suggestion in comment #10 could resolve this (well, unless the change from comment #2 resolves it for you ;-)
Comment 16 Allen Webb 2014-03-06 05:33:41 UTC
(In reply to comment #15)
> See comment #2 - it's nowhere clear whether the suggestion in comment #10
> could resolve this (well, unless the change from comment #2 resolves it for
> you ;-)

The changes from Comment #2 stop the glitches. Anything else you want me to try (so I can use indexed quads if they are helpful)?
Comment 17 Martin Flöser 2016-11-02 14:40:21 UTC
This bug report hasn't seen any comment for almost 3 years. Given that I assume that it's no longer an issue and was a problem with the driver. In case it still happens, please reopen.