Bug 385692 - Application windows (such as scrolling in kate) on EGL flickers.
Summary: Application windows (such as scrolling in kate) on EGL flickers.
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-13 11:10 UTC by David Edmundson
Modified: 2017-10-24 19:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Edmundson 2017-10-13 11:10:31 UTC
I have the issue Marco described on the mailing list.

Symptoms:
 - open a big file in kate
 - scroll quickly
 - flickers like crazy

This happens on kate, but never gedit
Marco says this doesn't happen in Weston
This does happen on neseted wayland sessions
It doesn't happen on testRenderingServer in kwayland (which is SHM based)

I'm pretty confident the real bug is in the QPA, but I'll track it here.

We can see in wayland debug:

[2180114.022]  -> wl_surface@40.frame(new id wl_callback@226)
[2180114.066]  -> wl_surface@40.attach(wl_buffer@160, 0, 0)
[2180114.208]  -> wl_surface@40.damage(529, 40, 2, 438)
[2180114.255]  -> wl_surface@40.damage(33, 478, 498, 2)
[2180114.303]  -> wl_surface@40.commit()
[2180114.324]  -> wl_surface@40.frame(new id wl_callback@139)
[2180114.360]  -> wl_surface@40.attach(wl_buffer@160, 0, 0)
[2180114.405]  -> wl_surface@40.damage(33, 38, 498, 2)
[2180114.442]  -> wl_surface@40.damage(33, 40, 2, 438)
[2180114.492]  -> wl_surface@40.damage(529, 40, 2, 438)
[2180114.538]  -> wl_surface@40.damage(33, 478, 498, 2)
[2180114.585]  -> wl_surface@40.commit()
...
[2180120.358] wl_buffer@160.release()
[2180120.378] wl_buffer@160.release()


This looks to me like it's attaching the same buffer twice (and in some cases 4/5 times) before getting the release of the buffer

We could be reading those pixels after the first commit; hence flicker
Comment 1 Martin Flöser 2017-10-13 19:33:26 UTC
Yes if Qt renders to the same buffer, it will flicker. It would explain why we see it in the test server and - depending how Weston implements it - why it is not visible in Weston. If Weston does the upload to egl directly on the surface commit, it won't flicker. KWin uploads to EGL Just before rendering, so there is a chance of flicker.
Comment 2 David Edmundson 2017-10-14 05:37:41 UTC
Patch submitted \o/