Bug 57557 - [ivb] render corruption under kwin + desktop effects
Summary: [ivb] render corruption under kwin + desktop effects
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
Depends on:
Reported: 2012-11-26 14:32 UTC by Tobias Klausmann
Modified: 2019-11-27 13:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

SNA Rendering (1.72 MB, image/png)
2012-11-26 14:32 UTC, Tobias Klausmann
no flags Details
UXA Rendering (1.72 MB, image/png)
2012-11-26 14:33 UTC, Tobias Klausmann
no flags Details
Xorg.0.log (49.55 KB, text/plain)
2012-11-26 14:35 UTC, Tobias Klausmann
no flags Details
Leftover rendering corruptions (1.72 MB, image/gif)
2013-08-28 14:49 UTC, Tobias Klausmann
no flags Details
2.99.908 Regression (244.56 KB, image/png)
2014-02-01 17:50 UTC, Tobias Klausmann
no flags Details
2.99.909 minor Regression (253.98 KB, image/png)
2014-02-01 20:05 UTC, Tobias Klausmann
no flags Details
2.99.911 (737.13 KB, image/png)
2014-04-04 13:34 UTC, Tobias Klausmann
no flags Details
Corruptions with Mesa 9.2.3 and XServer (1.69 MB, image/png)
2014-04-10 15:33 UTC, Tobias Klausmann
no flags Details
Fedora Live KDE (1.61 MB, image/png)
2014-04-11 01:22 UTC, Tobias Klausmann
no flags Details

Description Tobias Klausmann 2012-11-26 14:32:00 UTC
Created attachment 70592 [details]
SNA Rendering

With SNA enabled my screen has some minor rendering corruptions. These are not visible with UXA
Comment 1 Tobias Klausmann 2012-11-26 14:33:38 UTC
Created attachment 70593 [details]
UXA Rendering
Comment 2 Tobias Klausmann 2012-11-26 14:35:54 UTC
Created attachment 70594 [details]
Comment 3 Chris Wilson 2012-11-26 14:38:54 UTC
Try turning off desktop effects as a simple test for a known Damage bug.
Comment 4 Tobias Klausmann 2012-11-26 14:41:29 UTC
Ok that helps, sorry for the duplicate i did not find!
Comment 5 Chris Wilson 2013-07-15 08:11:34 UTC
Do you mind giving me a status update?
Comment 6 Tobias Klausmann 2013-07-15 12:24:56 UTC
Still visible. But it did get better imho!
intel driver: 2.21.12

your workaround from comment 3 still works!

Comment 7 Tobias Klausmann 2013-08-28 14:47:59 UTC
The noted corruptions are gone. But there are still other minor corruptions.
Comment 8 Tobias Klausmann 2013-08-28 14:49:41 UTC
Created attachment 84798 [details]
Leftover rendering corruptions
Comment 9 Tobias Klausmann 2013-08-28 15:19:34 UTC
Additional Notes:

intel driver: 2.21.15
Kernel: 3.11.0-rc7+
libdrm: 2.4.46
Mesa: 9.3-devel
Comment 10 Chris Wilson 2014-02-01 11:23:52 UTC
If we ignore that Damage is not tracking certain operations.... There have been a number of damage related and Ivybridge related fixes since, so it is well worth retesting.
Comment 11 Tobias Klausmann 2014-02-01 16:28:14 UTC
I can still reproduce this, but unlike earlier i have to try really hard!
That may as well be kde related!
Comment 12 Tobias Klausmann 2014-02-01 17:50:16 UTC
Created attachment 93186 [details]
2.99.908 Regression

After i had noticed you released 908 today, i rechecked if the bug was there. it is, but while wanting to upload another picture for the leftover rendering corruption i noticed a grave regression. This is not reproducible with 907!
Comment 13 Chris Wilson 2014-02-01 18:00:18 UTC
Already doing a brown paper bag release. :(
Comment 14 Chris Wilson 2014-02-01 19:17:14 UTC
Embarrassment release pushed.
Comment 15 Tobias Klausmann 2014-02-01 20:05:03 UTC
Created attachment 93195 [details]
2.99.909 minor Regression

Yo may put away the brown paper bag (Thanks for the quick fix!). But nevertheless, this is the pedantic thread ;-) , so i have something new for you! Note the black border around one of the icons in the list. This is while the mouse cursor hovers over it. This again is not reproducible with 907!
Comment 16 Chris Wilson 2014-02-01 21:59:21 UTC
Ugh, found it in the end:

commit 853588ad5be9407d2123f6055458ca84e72b8eb9
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Feb 1 21:55:09 2014 +0000

    sna: If IGNORE_CPU is not set we must mark the move as MOVE_READ
    Logic reversal in discarding CPU damage. An old bug revealed by the more
    aggressive attempts to discard CPU damage.
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 17 Tobias Klausmann 2014-02-01 22:43:52 UTC
Confirmed, the black border is gone! Thanks!
Comment 18 Tobias Klausmann 2014-03-30 19:14:45 UTC
Can't reproduce the remaining rendering corruption from Comment #8 with KDE 4.13, looks like the driver was not the problem in the end. Thanks!
Comment 19 Tobias Klausmann 2014-04-04 13:34:15 UTC
Created attachment 96901 [details]

After several days without it, today the damage bug came back :/
Comment 20 Chris Wilson 2014-04-04 13:42:15 UTC
Do you have a screenshot? There have been a few mesa regressions that affect KDE in particular, which might account for the reoccurrence.
Comment 21 Tobias Klausmann 2014-04-04 13:44:21 UTC
attachment 96901 [details] from Comment #19 is from a few minutes ago
Comment 22 Chris Wilson 2014-04-09 07:57:27 UTC
Sorry about missing the updated image, I just overlooked it in the email. Are you using the raster backend for Qt?
Comment 23 Tobias Klausmann 2014-04-09 14:03:03 UTC
No problem :-)

Yes, I'm using the Raster Backend with OpenGL 3.1.
Comment 24 Chris Wilson 2014-04-09 15:25:19 UTC
Master now has a fix for a PutImage regression in 2.99.911, which was hit by Qt's Raster engine.
Comment 25 Tobias Klausmann 2014-04-09 16:40:20 UTC
Ok, testing master and will report back. Thanks!
Comment 26 Tobias Klausmann 2014-04-09 16:58:55 UTC
Still reproduceable with Head of Master, sorry!

Don't know if this is important, but I'm using Mesa 10.2-devel versions, following Mesa Master closely as well.
Comment 27 Chris Wilson 2014-04-09 17:07:38 UTC
Whilst there are some pretty severe regressions in mesa-10.1+ that affect KDE, your screenshot doesn't look like one of them.

Have you tried switching between different engines for compositing and rendering?
Comment 28 Tobias Klausmann 2014-04-09 17:47:30 UTC
Give the fact that KDE is not lying to me about the backends and the OpenGL Versions, the bug persists with both Native/Raster with any given OGL Versions (3.1, 2.0, 1.2).

That makes me wonder if KDE is really switching it.
Comment 29 Chris Wilson 2014-04-10 11:52:06 UTC
One thing that would help is knowing whether the XRender Desktop Effects backend is also susceptible. Then perhaps whether mesa-9 shows the same errors, or xorg-1.14.
Comment 30 Tobias Klausmann 2014-04-10 13:34:16 UTC
It really does, hmm ok, lets see where I can get a Mesa and a XServer 1.14
Comment 31 Tobias Klausmann 2014-04-10 15:33:20 UTC
Created attachment 97167 [details]
Corruptions with Mesa 9.2.3 and XServer

As you can see, it has not helped:

Mesa 9.2.3
xf86-video-intel 2.99.911+ (git snapshot as of yesterday evening)
Comment 32 Chris Wilson 2014-04-10 15:52:52 UTC
Hmm, I had hopes that it was a fbconfig selection issue.

What are the exact steps to reproducing this?
Comment 33 Tobias Klausmann 2014-04-10 16:01:10 UTC
Steps to reproduce:

1) Log in with Desktop Effects activated
2) Click at the Networkmanager/nm Applet (does work with Calender/Notifications as well)
3) Click somewhere at the Desktop to hide the Applet
4) now you should see the Corruption
Comment 34 Chris Wilson 2014-04-10 17:15:32 UTC
Or not. :|

Would it be possible for you to bisect what triggered the regression this time? Presuming we can find a point in time where it did work.
Comment 35 Tobias Klausmann 2014-04-10 19:28:04 UTC
Bisecting is not the problem, but finding a good starting point will is. Anyway lets see what i can do.
Comment 36 Tobias Klausmann 2014-04-10 23:26:38 UTC
Tried to find a good commit, but have failed miserably :/. The good state noted in Comment 18 was 2.99.911 or 910, but both are bad now. I'm uncertain if it is the driver, Mesa or KDE and I'm not able to reproduce the good state again.
Comment 37 Tobias Klausmann 2014-04-11 01:22:04 UTC
Created attachment 97202 [details]
Fedora Live KDE

Ok, a final try for a reproduce able bug:

1) Start a new KDE, here Fedora KDE Live: 

2) start Systemsettings, choose "Desktop Effects"

3) Within the General Tab set Animation Speed to Very Fast (apply)
4) Within the Advanced Tab choose OpenGL 3.1 (apply)
5) Open the Network Widget, click somewhere at the desktop to hide the widget again -> now you finally should see it (tried several times, and works always)
Comment 38 Chris Wilson 2014-04-11 07:36:31 UTC
For me, the setting that made the difference in the end was "Tearing Prevention (VSync): None"
Comment 39 Chris Wilson 2014-04-11 08:12:40 UTC
I am able to reproduce the persistent shadow with UXA, SNA and software rendering. I think this might not be a ddx bug.
Comment 40 Tobias Klausmann 2014-04-11 12:41:39 UTC
Hmm ok, some final notes about tearing prevention from my side:

None/Only when Cheap (update of major screen regions) -> shadow bug
Full Scene Repaints                                   -> no bug at all
Re-use screen content                                 -> much worse, windows are not redrawn at all

Leaving this bug open, but your conclusion sounds right, so you are free to close.

Comment 41 Martin Peres 2019-11-27 13:31:21 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/xorg/driver/xf86-video-intel/issues/14.

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.