Bug 472901 - Screen flickers when switching virtual desktop with touchpad gesture and animations are off
Summary: Screen flickers when switching virtual desktop with touchpad gesture and anim...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: Gestures (show other bugs)
Version: 5.27.6
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-01 23:39 UTC by Quinten Kock
Modified: 2023-10-17 12:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.9


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Quinten Kock 2023-08-01 23:39:17 UTC
SUMMARY
The screen flickers black for a frame or so when using the touchpad gesture to switch virtual desktops (three/four finger swipe). More specifically, it happens as soon as you release, and only when animations are disabled.

STEPS TO REPRODUCE
1. Disable animations by dragging the "Animation speed" slider in systemsettings all the way to right.
2. Switch virtual desktops with 3/4 finger touchpad swipe.
3. Observe that the screen flickers black when releasing your fingers.

OBSERVED RESULT
Screen flickers black.

EXPECTED RESULT
Screen switches instantly to target desktop, without any visual flicker.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 38 kernel 6.4.6
(available in About System)
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
GPU: Intel UHD 620, Mesa 23.1.4
Graphics Platform: Wayland

Wasn't sure which component to file against, so general.
Comment 1 Quinten Kock 2023-10-14 10:22:53 UTC
I just noticed, when using the keyboard shortcut to switch between desktops the same issue happens.
Comment 2 Bug Janitor Service 2023-10-16 05:12:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4507
Comment 3 Vlad Zahorodnii 2023-10-16 17:07:14 UTC
Git commit 94b74cff960566d42813ecf4847637c2283a6fac by Vlad Zahorodnii, on behalf of Quinten Kock.
Committed on 16/10/2023 at 19:07.
Pushed by vladz into branch 'master'.

plugins/slide: add special case for instant animations 

In springmotion.cpp for the slide plugin, there are issues when
animations are disabled, namely a black screen flicker.

The flicker is caused by float under/overflow (div-by-0 -> infinity).

This commit fixes that by special-casing an infinite spring constant,
so that the animation immediately jumps to the anchor.

M  +10   -0    src/plugins/slide/springmotion.cpp

https://invent.kde.org/plasma/kwin/-/commit/94b74cff960566d42813ecf4847637c2283a6fac
Comment 4 Vlad Zahorodnii 2023-10-17 11:07:36 UTC
Git commit 1c447b7cee950e99761763c80c15e6e862b40b4b by Vlad Zahorodnii, on behalf of Quinten Kock.
Committed on 16/10/2023 at 19:07.
Pushed by vladz into branch 'Plasma/5.27'.

plugins/slide: add special case for instant animations 

In springmotion.cpp for the slide plugin, there are issues when
animations are disabled, namely a black screen flicker.

The flicker is caused by float under/overflow (div-by-0 -> infinity).

This commit fixes that by special-casing an infinite spring constant,
so that the animation immediately jumps to the anchor.


(cherry picked from commit 94b74cff960566d42813ecf4847637c2283a6fac)

M  +10   -0    src/effects/slide/springmotion.cpp

https://invent.kde.org/plasma/kwin/-/commit/1c447b7cee950e99761763c80c15e6e862b40b4b