Bug 442697

Summary: Broken wobbly windows effect on Wayland
Product: [Plasma] kwin Reporter: Severin von Wnuck-Lipinski <severinvonw>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: HI Keywords: regression
Version First Reported In: 5.22.90   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=443148
Latest Commit: Version Fixed In: 5.23
Sentry Crash Report:

Description Severin von Wnuck-Lipinski 2021-09-19 14:06:45 UTC
SUMMARY

The wobbly windows effect is broken on KWin 5.22.90. I can't reproduce this issue on KWin 5.22.5.

STEPS TO REPRODUCE

1. Enable wobbly windows in system settings
2. Move or resize the system settings window or an application like Firefox

OBSERVED RESULT

The window immediately jumps into a corner of the screen and flickers during the move/resize operation. 

EXPECTED RESULT

The window wobbles like it should when running on X11.

SOFTWARE/OS VERSIONS

KDE Plasma Version: 5.22.90
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

I'm using the proprietary Nvidia driver on Wayland. This problem only affects certain windows like the system settings and Firefox while others are completely unaffected.
Issues can also be observed with the magic lamp and the fall apart effect. Might be related to this MR: https://invent.kde.org/plasma/kwin/-/merge_requests/1045
Comment 1 Vlad Zahorodnii 2021-09-20 08:29:20 UTC
Works fine on my computer with client-side and server-side decorated firefox. It might be another nvidia thing...
Comment 2 Vlad Zahorodnii 2021-09-20 08:31:06 UTC
Does wobbly windows effect work as expected on X11?
Comment 3 Vlad Zahorodnii 2021-09-20 09:36:10 UTC
Are all affected apps have server-side decorations?
Comment 4 Severin von Wnuck-Lipinski 2021-09-20 21:45:18 UTC
(In reply to Vlad Zahorodnii from comment #2)
> Does wobbly windows effect work as expected on X11?

Yes it does.

(In reply to Vlad Zahorodnii from comment #3)
> Are all affected apps have server-side decorations?

Both client-side decorated and server-side decorated Firefox (and Thunderbird) are broken for me.
I've also noticed that all other affected programs are QtQuick applications (like the new System Monitor).
Comment 5 Bug Janitor Service 2021-09-21 09:43:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1443
Comment 6 Vlad Zahorodnii 2021-09-21 10:27:40 UTC
Git commit 2200febcd6e4146c0a6f9fb18eae1b9ae2e944cb by Vlad Zahorodnii.
Committed on 21/09/2021 at 09:41.
Pushed by vladz into branch 'master'.

Restore fbo binding after updating surface texture from EGLStreams

Currently, data from client buffer EGLStream is copied to a surface
texture. An fbo is used for that purpose. The main issue with it is that
it doesn't restore the old framebuffer binding.

The surface texture can be updated in the middle of a compositing cycle.

If the framebuffer binding is not restored, any window that must be
rendered in an offscreen texture won't be rendered to the offscreen
texture.

This change makes EglStreamSurfaceTextureWayland restore the fbo binding
so the DeformEffect and software screen rotation work as expected with
the proprietary NVIDIA driver.

M  +12   -3    src/plugins/platforms/drm/egl_stream_backend.cpp

https://invent.kde.org/plasma/kwin/commit/2200febcd6e4146c0a6f9fb18eae1b9ae2e944cb
Comment 7 Vlad Zahorodnii 2021-09-21 10:28:19 UTC
Git commit 4b9bffcff95084368b4a24721b6f7820eb1e4fb3 by Vlad Zahorodnii.
Committed on 21/09/2021 at 10:28.
Pushed by vladz into branch 'Plasma/5.23'.

Restore fbo binding after updating surface texture from EGLStreams

Currently, data from client buffer EGLStream is copied to a surface
texture. An fbo is used for that purpose. The main issue with it is that
it doesn't restore the old framebuffer binding.

The surface texture can be updated in the middle of a compositing cycle.

If the framebuffer binding is not restored, any window that must be
rendered in an offscreen texture won't be rendered to the offscreen
texture.

This change makes EglStreamSurfaceTextureWayland restore the fbo binding
so the DeformEffect and software screen rotation work as expected with
the proprietary NVIDIA driver.


(cherry picked from commit 2200febcd6e4146c0a6f9fb18eae1b9ae2e944cb)

M  +12   -3    src/plugins/platforms/drm/egl_stream_backend.cpp

https://invent.kde.org/plasma/kwin/commit/4b9bffcff95084368b4a24721b6f7820eb1e4fb3