Bug 433471 - Cover Switch and Flip Switch animations works unreliably after upgrade to Plasma 5.21
Summary: Cover Switch and Flip Switch animations works unreliably after upgrade to Pla...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: tabbox (show other bugs)
Version: 5.21.0
Platform: Gentoo Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-02-23 09:15 UTC by Michal Ziabkowski
Modified: 2021-04-19 17:07 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.21.5


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Ziabkowski 2021-02-23 09:15:57 UTC
SUMMARY

After upgrading to Plasma 5.21, I've noticed something off about the cover switch animation, which I'm using as the Alt-Tab switcher. When I keep pressing Alt-Tab in quick succession, I always get the rotation animation. But when doing it at a normal pace, I get the animation more or less half the time and an instant switch otherwise, which feels visually jarring.

On a related note, the animation speed settings in the KCM doesn’t seem to do anything. Setting it to something as high as 1000 (I assume miliseconds?) didn't change a thing.


STEPS TO REPRODUCE
1. Set Alt-Tab switcher to Cover Switch
2. Press Tab a few times while holding Alt

OBSERVED RESULT
The animation isn't displayed most of the time.

EXPECTED RESULT
The animation is displayed every single time when switching between tasks.


SOFTWARE/OS VERSIONS

KDE Plasma Version: 5.21.0
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Comment 1 Nate Graham 2021-02-23 18:15:36 UTC
Can confirm.
Comment 2 Nate Graham 2021-02-23 18:16:31 UTC
Looks like Flip Switch is affected too.
Comment 3 Ricardo J. Barberis 2021-02-27 20:22:38 UTC
Adding a "me too" to follow the bug.

Also happening in Plasma 5.21.1.

Operating System: Slackware 15.0alpha1
KDE Plasma Version: 5.21.1
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.10.18
OS Type: 64-bit
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-1035G1 CPU @ 1.00GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Comment 4 Michał Dybczak 2021-03-06 19:55:20 UTC
I can confirm this issue. With Plasma 5.21 the first animation was OK, the next ones were missing, windows appeared instantly. After the updates, with Plasma 5.21.2 it works chaotic.
Meaning, sometimes the new windows shows up immediately without animation, sometimes with very quick animation, sometimes with super quick animation that you more perceive with your gut. So the effect is not too good.

I'm on a hybrid GPU laptop, with hybrid session using by default Intel Modesetting.
Comment 5 Ricardo J. Barberis 2021-03-13 17:06:14 UTC
One quirk I noticed just today: Cover switch animation works ok if I have a youtube video playing in a browser (Opera Beta in my case) tab.

If I pause the video the animation starts misbehaving again.

In case it helps, I do not have hardware acceleration enabled, this is what opera://gpu/ shows:

Graphics Feature Status
Canvas: Software only, hardware acceleration unavailable
Compositing: Software only. Hardware acceleration disabled
Multiple Raster Threads: Enabled
Out-of-process Rasterization: Disabled
OpenGL: Disabled
Rasterization: Software only. Hardware acceleration disabled
Skia Renderer: Enabled
Video Decode: Software only. Hardware acceleration disabled
Vulkan: Disabled
WebGL: Software only, hardware acceleration unavailable
WebGL2: Software only, hardware acceleration unavailable
Problems Detected
Gpu compositing has been disabled, either via blocklist, about:flags or the command line. The browser will fall back to software compositing and hardware acceleration will be unavailable.
Disabled Features: gpu_compositing
Accelerated video decode has been disabled, either via blocklist, about:flags or the command line.
Disabled Features: video_decode
Comment 6 Michał Dybczak 2021-03-13 19:15:33 UTC
I can confirm. When YouTube video is playing, animation works fine. When I pause it, it's bugged again. Weird!
Comment 7 Michal Ziabkowski 2021-03-14 15:36:58 UTC
Confirmed. But I see the same thing happens with any video playing, not just in a browser. I have a suspicion that it has to do with the window contents constantly changing and being marked as dirty, leading to the animation not being skipped as it would.
Comment 8 Bug Janitor Service 2021-03-15 07:33:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/782
Comment 9 Michal Ziabkowski 2021-03-27 16:21:10 UTC
Applied the commit from the pull request above and it seems to resolve the issue for me. I've been using it for a week with no obvious side-effects.
Comment 10 Nate Graham 2021-04-19 17:05:31 UTC
Git commit 5839e59e24c094104fcfd83884a7406a9e9e0e7f by Nate Graham, on behalf of Vlad Zahorodnii.
Committed on 19/04/2021 at 17:03.
Pushed by ngraham into branch 'master'.

effects: Properly reset present times in coverswitch and flipswitch effects

The last presentation timestamps should be reset when all animations
finish rather than when the effect finishes. Otherwise, the calculated
time diff for the first animation frame will be too big.

M  +6    -7    src/effects/coverswitch/coverswitch.cpp
M  +15   -13   src/effects/flipswitch/flipswitch.cpp

https://invent.kde.org/plasma/kwin/commit/5839e59e24c094104fcfd83884a7406a9e9e0e7f
Comment 11 Nate Graham 2021-04-19 17:06:39 UTC
Git commit 170a436aaccdbd7a69bd2516ad921545d3454f14 by Nate Graham, on behalf of Vlad Zahorodnii.
Committed on 19/04/2021 at 17:06.
Pushed by ngraham into branch 'Plasma/5.21'.

effects: Properly reset present times in coverswitch and flipswitch effects

The last presentation timestamps should be reset when all animations
finish rather than when the effect finishes. Otherwise, the calculated
time diff for the first animation frame will be too big.


(cherry picked from commit 5839e59e24c094104fcfd83884a7406a9e9e0e7f)

M  +6    -7    effects/coverswitch/coverswitch.cpp
M  +15   -13   effects/flipswitch/flipswitch.cpp

https://invent.kde.org/plasma/kwin/commit/170a436aaccdbd7a69bd2516ad921545d3454f14