Bug 365333 - no redraws with OpenGL compositing backends on amdgpu driver
Summary: no redraws with OpenGL compositing backends on amdgpu driver
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.7.0
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-10 21:03 UTC by Stefan Majewsky
Modified: 2016-07-11 08:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
qdbus org.kde.KWin /KWin supportInformation (4.93 KB, text/plain)
2016-07-10 21:03 UTC, Stefan Majewsky
Details
glxinfo (98.47 KB, text/plain)
2016-07-10 21:08 UTC, Stefan Majewsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Majewsky 2016-07-10 21:03:32 UTC
Last week, on my desktop PC, I switched from Catalyst to the new xf86-video-amdgpu driver since the Catalyst driver suddenly started having problems rendering some Steam games. After rebooting to switch to the new kernel and X driver, I was greeted by a black screen.

Alt-Shift-F12 resolved the problem, and a few more attempts of Alt-Shift-F12 showed that the screen stopped redrawing whenever compositing was enabled. The only exception is the mouse cursor which still moves appropriately, and changes shape according to the surface beneath it.

I checked different settings in the kwincompositing KCM and found that the bug only appears under the following settings:

* Rendering backend: OpenGL 2.0 or 3.1 (XRender works fine)
* OpenGL interface: GLX (EGL works fine)
* Tearing prevention: Reuse screen content ("Full screen repaints" and "Only when cheap" appear to work fine in a short test)

The bug is really only hit when all three settings are set to the problematic values. I first saw the problem in kwin 5.6 (after I installed the amdgpu driver), and waited until this week to see if 5.7 would help, but the problem is still reproducible.

Reproducible: Always
Comment 1 Stefan Majewsky 2016-07-10 21:03:56 UTC
Created attachment 99994 [details]
qdbus org.kde.KWin /KWin supportInformation
Comment 2 Stefan Majewsky 2016-07-10 21:08:30 UTC
Created attachment 99995 [details]
glxinfo
Comment 3 Thomas Lübking 2016-07-10 21:41:16 UTC
there's a BIG FAT WARNING to not use this setting (reuse) with mesa drivers
they used to enter a dead slow codepath when reading the frontbuffer and apparently now (at least in the amdgpu case)  completely refuse to work.
solution: don't try.
Comment 4 Stefan Majewsky 2016-07-10 21:44:46 UTC
Interesting. Then there may be two UI issues in there:

1. I did not see that message since it only appears when moving to that setting, not when the KCM starts out in it.

2. The message says "'Re-use screen content' causes severe performance problems on MESA drivers." It should be reworded to e.g. "severe performance and rendering problems", so people know what they're getting into when choosing that.
Comment 5 Stefan Majewsky 2016-07-10 21:45:44 UTC
Addendum for point 1 in comment 4: Seeing that message again is especially critical in my situation since I moved from Catalyst to amdgpu, so the message did not apply to me when I saw it for the first time (when I set it to "Reuse screen content" while using the Catalyst driver).
Comment 6 Martin Flöser 2016-07-11 07:05:01 UTC
Showing the warning again is not a good idea. Users do a deliberate choice when they ignore the warning and change the setting. At that point we don't need to "annoy" them by showing it every time they open the settings.

It would be interesting to get this warning when one switches GPU drivers, but that's of course nothing KWin knows about.
Comment 7 Thomas Lübking 2016-07-11 08:23:05 UTC
one didn't know about the new issue in the past.
a strategy out could be to query the renderer from kwin and still annoy users (because of the severe impact, "deliberately" implies developer)

alternatively, the FB-reading branch could be dropped.
fglrx is more or less discontinued and nvidia has good buffer_age support.
Comment 8 Martin Flöser 2016-07-11 08:36:29 UTC
> alternatively, the FB-reading branch could be dropped.

Sounds like the best option to me