Bug 428089

Summary: Restarting compositing breaks existing EGLStreams
Product: [Plasma] kwin Reporter: Vlad Zahorodnii <vlad.zahorodnii>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, alex.wayfer, alex765, ekurzinger, kde, kinofhek, mateusbmelchiades, mauromol, nate, postix
Priority: NOR Flags: vlad.zahorodnii: Wayland+
vlad.zahorodnii: Mesa-
vlad.zahorodnii: NVIDIA+
Version: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=434715
Latest Commit: Version Fixed In:

Description Vlad Zahorodnii 2020-10-22 08:03:17 UTC
SUMMARY
In some cases, kwin has to restart compositing. For example, one such case is where user settings have changed.

Unfortunately, it also means that kwin needs to destroy window pixmaps, which means that all existing EGLStreams will transition into the "disconnected" state (because the consumer texture has been destroyed).

STEPS TO REPRODUCE
1. Change any compositing settings.

OBSERVED RESULT
Applications that use EGL have no any contents

EXPECTED RESULT
Applications that use EGL look the same before and after a compositing restart
Comment 1 Vlad Zahorodnii 2020-10-22 08:03:55 UTC
CC'ing Erik because he wrote the EGLStreams backend.
Comment 2 Erik Kurzinger 2020-11-09 21:51:11 UTC
This is a tricky issue. Our client-side egl-wayland code really isn't set up to handle the compositor restarting. The client would need some way to become aware of this and send a new attach_eglstream_consumer request, and then re-attach the producer.

Incidentally, we're currently working on driver-side support for passing buffers as dma-bufs, and once that's ready we could transition egl-wayland away from using EGLStreams. Then it should be possible to remove all of the EglStreamTexture stuff from kwin.

Until then, though, maybe we could just defer applying any settings that require a compositor reset until the next login when using the EGLStreams backend?
Comment 3 Vlad Zahorodnii 2021-04-07 19:44:10 UTC
*** Bug 434715 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2021-09-16 18:32:39 UTC
*** Bug 442529 has been marked as a duplicate of this bug. ***
Comment 5 David Edmundson 2021-10-16 23:20:10 UTC Comment hidden (spam)
Comment 6 David Edmundson 2021-10-16 23:20:34 UTC
Removing from VHI. Wayland is not a default, especially on Nvidia.
Comment 7 Aleix Pol 2022-01-19 15:57:04 UTC
NVIDIA hardware works under GBM now.