Bug 479279

Summary: Desktop Effects that involve squash and stretch are obscured by white pixels
Product: [Plasma] kwin Reporter: pawlowski486
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, pawlowski486, vlad.zahorodnii, xaver.hugl
Priority: NOR Keywords: qt6
Version First Reported In: 5.91.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.0
Sentry Crash Report:
Attachments: Output from journalctl --user-unit plasma-kwin_wayland --boot 0
Output from journalctl with source
Output from journalctl still broken

Description pawlowski486 2024-01-02 01:27:39 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

Many desktop effects are obscured by white pixels or white rectangles. The video https://icefangvault.myusa.cloud/index.php/s/3rALYFsgxH9afM4 shows the following effects in order: 
Morphing Popups when hovering over icons in the taskbar and moving between them
Launch Feedback (This isn't a Desktop Effect; it is found in Cursors -> Configure Launch Feedback) 
Wobbly Windows when dragging the screen around
Maximize
and most notably:
KDE Overview is completely unusable.

Pressing Meta+tab, Meta+w, or Meta+g turns the screen white instead of showing desktop overview or desktop grid. Pressing escape will return the screen to normal.

STEPS TO REPRODUCE
1. Turn on a desktop effect that squishes, squashes, or stretches a window (For example, Magic Lamp.)
2. Activate the effect (with a hover, mouse click, keyboard shortcut, etc.

OBSERVED RESULT
Animations are obscured in white. Sometimes a section of the screen is obscured by a white rectangle (Morphing Popups, Maximize, KDE Overview) and other times the animation is played but it is replaced by white pixels (Wobbly Windows, Magic Lamp.)

EXPECTED RESULT
I expect the pixels on the display to animate smoothly without being obscured by anything.
SOFTWARE/OS VERSIONS
Windows: N/A
macOS: N/A
Linux/KDE Plasma: OpenSUSE Tumbleweed 20231226
(available in About System)
KDE Plasma Version: 5.91.90
KDE Frameworks Version: 5.248.0
Qt Version: 6.6.1
Kernel Version: 6.6.7-1-default (64-bit)
Graphics Platform: X11
HARDWARE
Processors: 2 x Intel® Core™2 Duo CPU P8400 @ 2.26GHz
Memory: 3.7 GiB of RAM
Graphics Processor: Mesa Mobile Intel® GM45 Express Chipset
Manufacturer: LENOVO
Product Name: 7417CTO
System Version: ThinkPad T400

ADDITIONAL INFORMATION
This issue is identical in both X11 and Wayland.
This issue appears to be a regression. I do not have this problem when running from my live usb installer. My USB drive is: OpenSUSE Krypton 10.7 (a.k.a OpenSUSE Tumbleweed 20231209)
Plasma 5.90.90
Frameworks 5.247.0
Qt 6.6.1
kernel 6.6.3-1-default (64 bit).
I cannot install this version to my SSD because the OpenSUSE Krypton installer requires an internet connection and auto-updates at install time.
Comment 1 Zamundaaa 2024-01-11 20:21:28 UTC
This looks like some shader doesn't compile. Please attach the output of
> journalctl --user-unit plasma-kwin_wayland --boot 0
after triggering one of the effects, it should contain warnings about why that's happening
Comment 2 pawlowski486 2024-01-12 04:25:43 UTC
Created attachment 164835 [details]
Output from journalctl --user-unit plasma-kwin_wayland --boot 0
Comment 3 pawlowski486 2024-01-12 04:28:10 UTC
Text file with console output is attached. Please note that I only get output when running in a Wayland session and only when not using sudo. If I'm in X11 or I append sudo to the start of the command, I get
-- No entries --

Hopefully this helps; I don't see anything specifically mentioning desktop effects in there but I also don't know what I'd be looking for.
Comment 4 Bug Janitor Service 2024-01-12 19:43:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4902
Comment 5 Zamundaaa 2024-01-12 19:47:25 UTC
Okay, there's definitely a shader not compiling. It's hard to say what exactly is going on without the shader source though; that MR should help diagnose these kinds of problems.
Comment 6 Zamundaaa 2024-01-12 21:06:12 UTC
Git commit 427ce522a22fde6d9ea5ec46e3749195281cdc84 by Xaver Hugl.
Committed on 12/01/2024 at 21:42.
Pushed by zamundaaa into branch 'master'.

opengl/glshader: print the shader source if compilation fails

The shader log is almost entirely useless without the source

M  +5    -0    src/opengl/glshader.cpp

https://invent.kde.org/plasma/kwin/-/commit/427ce522a22fde6d9ea5ec46e3749195281cdc84
Comment 7 Bug Janitor Service 2024-01-12 21:07:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4905
Comment 8 Zamundaaa 2024-01-12 21:32:11 UTC
Git commit df4657c9636a570e8dfb43d5852a4a9e01a7ed90 by Xaver Hugl.
Committed on 12/01/2024 at 22:17.
Pushed by zamundaaa into branch 'Plasma/6.0'.

opengl/glshader: print the shader source if compilation fails

The shader log is almost entirely useless without the source


(cherry picked from commit 427ce522a22fde6d9ea5ec46e3749195281cdc84)

M  +5    -0    src/opengl/glshader.cpp

https://invent.kde.org/plasma/kwin/-/commit/df4657c9636a570e8dfb43d5852a4a9e01a7ed90
Comment 9 pawlowski486 2024-01-16 01:22:12 UTC
Created attachment 164939 [details]
Output from journalctl with source

I think this version has the source you're looking for. It definitely looks different than the old version.
Comment 10 Bug Janitor Service 2024-01-16 13:43:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4944
Comment 11 Zamundaaa 2024-01-16 13:54:42 UTC
Git commit ed339de9536aab453701fff3488e0f9ea2f4de91 by Xaver Hugl.
Committed on 16/01/2024 at 14:42.
Pushed by zamundaaa into branch 'master'.

opengl/glshadermanager: add missing newline

M  +1    -1    src/opengl/glshadermanager.cpp

https://invent.kde.org/plasma/kwin/-/commit/ed339de9536aab453701fff3488e0f9ea2f4de91
Comment 12 Zamundaaa 2024-01-16 14:04:59 UTC
Git commit 12c3197ca6839a2a470d3712a4bad4f6c71aa3ef by Xaver Hugl.
Committed on 16/01/2024 at 14:55.
Pushed by zamundaaa into branch 'Plasma/6.0'.

opengl/glshadermanager: add missing newline


(cherry picked from commit ed339de9536aab453701fff3488e0f9ea2f4de91)

M  +1    -1    src/opengl/glshadermanager.cpp

https://invent.kde.org/plasma/kwin/-/commit/12c3197ca6839a2a470d3712a4bad4f6c71aa3ef
Comment 13 pawlowski486 2024-01-19 01:55:55 UTC
Created attachment 165027 [details]
Output from journalctl still broken

I am still seeing the issue on both X11 and Wayland on my laptop. Hopefully I have the latest updates from KDE and it was appropriate for me to reopen this bug report. I have attached a new journalctl output since it is significantly different.
Comment 14 Bug Janitor Service 2024-01-19 08:53:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4992
Comment 15 Bug Janitor Service 2024-01-19 09:32:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4993
Comment 16 Vlad Zahorodnii 2024-01-19 14:55:22 UTC
Git commit 0284610effee77a5295aa969eb5ba168a667a328 by Vlad Zahorodnii.
Committed on 19/01/2024 at 15:44.
Pushed by vladz into branch 'master'.

opengl: Fix parsing of the else branch

`it` points to `#else`. We need to move to the next line.

M  +1    -0    src/opengl/glshadermanager.cpp

https://invent.kde.org/plasma/kwin/-/commit/0284610effee77a5295aa969eb5ba168a667a328
Comment 17 Vlad Zahorodnii 2024-01-19 15:08:27 UTC
Git commit 7ba7ddfee8ae51827646c1419dcd368917ca2ba9 by Vlad Zahorodnii.
Committed on 19/01/2024 at 15:57.
Pushed by vladz into branch 'master'.

opengl: Let OpenGL implementation handle if preprocessor directive

It's less error prone and handles cases like if/elif/else better, etc.

M  +2    -2    src/opengl/colormanagement.glsl
M  +0    -37   src/opengl/glshadermanager.cpp

https://invent.kde.org/plasma/kwin/-/commit/7ba7ddfee8ae51827646c1419dcd368917ca2ba9
Comment 18 Vlad Zahorodnii 2024-01-22 08:34:26 UTC
Git commit 617acb537f4f224a17da4239adaf05484e787caf by Vlad Zahorodnii.
Committed on 22/01/2024 at 09:33.
Pushed by vladz into branch 'Plasma/6.0'.

opengl: Let OpenGL implementation handle if preprocessor directive

It's less error prone and handles cases like if/elif/else better, etc.
(cherry picked from commit 7ba7ddfee8ae51827646c1419dcd368917ca2ba9)

M  +2    -2    src/opengl/colormanagement.glsl
M  +0    -37   src/opengl/glshadermanager.cpp

https://invent.kde.org/plasma/kwin/-/commit/617acb537f4f224a17da4239adaf05484e787caf
Comment 19 Vlad Zahorodnii 2024-01-22 08:34:34 UTC
Git commit 6c6be75fdf6e6ab10c00cad506501778b12cd931 by Vlad Zahorodnii.
Committed on 22/01/2024 at 09:33.
Pushed by vladz into branch 'Plasma/6.0'.

opengl: Fix parsing of the else branch

`it` points to `#else`. We need to move to the next line.
(cherry picked from commit 0284610effee77a5295aa969eb5ba168a667a328)

M  +1    -0    src/opengl/glshadermanager.cpp

https://invent.kde.org/plasma/kwin/-/commit/6c6be75fdf6e6ab10c00cad506501778b12cd931