Bug 1976132

Summary: EGLStream: Xwayland windows turn black sometimes when resizing
Product: Red Hat Enterprise Linux 8 Reporter: Olivier Fourdan <ofourdan>
Component: xorg-x11-server-XwaylandAssignee: Olivier Fourdan <ofourdan>
Status: CLOSED ERRATA QA Contact: Peter Kopec <pekopec>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.5CC: fmuellner, tpelka
Target Milestone: betaKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: xorg-x11-server-Xwayland-21.1.1-5.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 18:37:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1976780    
Bug Blocks:    

Description Olivier Fourdan 2021-06-25 09:35:10 UTC
Description of problem:

This is NVIDIA proprietary driver an EGLStream, with Xwayland 21.1.1-4 and agl-wayland 1.1.7 (which contains https://github.com/NVIDIA/egl-wayland/commit/0d12001c7fb6951fe5cb7c832811340b6f8ef102).

When resizing an X11 window such as xterm, the whole window surface sometime turn black.

Version-Release number of selected component (if applicable):

mutter-3.32.2-57.el8

How reproducible:

Always

Steps to Reproduce:
1. On a system with NVIDIA hardware and proprietary driver
2. Start xterm
3. Resize the xterm window

Actual results:

The window sometimes turns completely black

Expected results:

The window content remains visible while resizing

Additional info:

Reason I suspect a bug in mutter and not Xwayland is because the same version of Xwayland with the exact same set of patches with egl-wayladn 1.1.7 works fine on Fedora 34. The only difference I can think of here is mutter.

FWIW I tried backporting GNOME/mutter!942 (the “allow commit” property) and also 
the “wayland/egl-stream: Cache texture snippet” from master, but to no avail unfortunately.

The list of patches I tried to backport so far:

https://gitlab.gnome.org/GNOME/mutter/-/commit/bac188b568f8948a41c1d6fda0fcd3e2c4033743
https://gitlab.gnome.org/GNOME/mutter/-/commit/845157c11138ed189221f5c8164fb17945d1d493
https://gitlab.gnome.org/GNOME/mutter/-/commit/10796e672619347848d0f66f40cd9cde32994e20
https://gitlab.gnome.org/GNOME/mutter/-/commit/4ae9953607c82166e2bc7f342d2663d38314f6bd
https://gitlab.gnome.org/GNOME/mutter/-/commit/53fce8e988e4e61acdd7ea51e16e20d11265c906
https://gitlab.gnome.org/GNOME/mutter/-/commit/c3c54e8ce66764ca4e85da1b3cee3284db55eae7
https://gitlab.gnome.org/GNOME/mutter/-/commit/aa017383ace0281397866f2296e0375b266f11d7
https://gitlab.gnome.org/GNOME/mutter/-/commit/d7a7af1ff200626f9cba9abae2eb4b1ed3efa7a5
https://gitlab.gnome.org/GNOME/mutter/-/commit/df5a5d279d1ec9757881304f6cb3ca546a3743a0
https://gitlab.gnome.org/GNOME/mutter/-/commit/a2e2cfe43714df656e451ef525b97c24fa786fed
https://gitlab.gnome.org/GNOME/mutter/-/commit/76ee026caa1ab0215be389e4a33a6994ce3d26fc

But none of those seem to solve the issue.

Comment 1 Olivier Fourdan 2021-06-25 13:03:41 UTC
OK, I have the fix, I was missign a couple of commits, but it works fine now.

It's ~12 backport patches (with some adaptations) but resizes are butter smooth now.

Comment 2 Olivier Fourdan 2021-06-25 13:44:34 UTC
(In reply to Olivier Fourdan from comment #1)
> OK, I have the fix, I was missign a couple of commits, but it works fine now.
> 
> It's ~12 backport patches (with some adaptations) but resizes are butter
> smooth now.

Sorry I take that back, it still happens, so this is definitely not GNOME/mutter!942

Comment 3 Olivier Fourdan 2021-06-28 07:40:22 UTC
All my apologies, but the problem is with Xwayland - If I install the el8 package on FEdora I can reproduce there as well.

Moving to Xwayland

Comment 4 Olivier Fourdan 2021-06-28 08:14:25 UTC
There it is, clearly visible in the journalct logs:

> Jun 28 09:58:57 xxxx org.gnome.Shell.desktop[2352]: EGL_NV_stream_flush not available, this may cause visible corruption.

We **need** to update libepoxy in el8!

Comment 5 Peter Kopec 2021-06-30 10:31:22 UTC
tested with xorg-x11-server-Xwayland-21.1.1-5.el8
The window content remained visible while resizing

Comment 8 Peter Kopec 2021-07-15 17:36:05 UTC
based on Comment 5 moving on verified

Comment 10 errata-xmlrpc 2021-11-09 18:37:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (mesa and related packages bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:4234