Bug 478074

Summary: On secondary monitor, wallpaper briefly flashes after being changed
Product: [Plasma] plasmashell Reporter: Жора Змейкин <katze_942>
Component: Image & Slideshow wallpaper pluginsAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: meven29, meven, nate, notmart, qydwhotmail
Priority: NOR Keywords: qt6
Version: master   
Target Milestone: 1.0   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 6.0
Sentry Crash Report:
Attachments: Demonstration

Description Жора Змейкин 2023-12-04 20:15:06 UTC
Created attachment 163863 [details]
Demonstration

On the main monitor the wallpaper changes pretty smoothly, but on the second monitor I notice a little twitch when the wallpaper changes. This is especially visible in the video.

STEPS TO REPRODUCE
1. Open the wallpaper settings.
2. Connect a second monitor.
3. Change the wallpaper for the second monitor.

OBSERVED RESULT
Twitching when changing the wallpaper

EXPECTED RESULT
Smooth wallpaper change, just like on the main monitor

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon (Unstable), Wayland
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.0
Comment 1 Nate Graham 2023-12-05 17:28:34 UTC
Can reproduce the brief flash after the wallpaper changes. Reproduces for me both from the Wallpaper KCM as well as the UI in the desktop containment settings window.
Comment 2 Méven Car 2023-12-11 11:32:03 UTC
Looking a the video image per image, the "little twitch" is at the end of The Opacity transition, the last step of opacity is quite abrupt and if the previous wallpaper was brighter than the new one, this becomes noticeable.

I tried using a ProppertyAnimation on opacity with an easing curve, it seemed to improve things somewhat, but couldn't be satisfied.

In ImageStackView

Code has comments by Fushan:
```
            // The value is to keep compatible with the old feeling defined by "TransitionAnimationDuration" (default: 1000)
            // 1 is HACK for https://bugreports.qt.io/browse/QTBUG-106797 to avoid flickering
```
Added in commit ea06a3259a8784b380d8c1aabb6946154129c150
Comment 3 Fushan Wen 2023-12-15 09:41:58 UTC
Can reproduce on my laptop, but cannot reproduce in a VM. I guess it's related to the video driver.
Comment 4 Bug Janitor Service 2023-12-15 13:47:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3686
Comment 5 Fushan Wen 2023-12-15 16:55:16 UTC
Git commit ea07f95b3f47918fe9d176e5300fd74354df5a9d by Fushan Wen.
Committed on 15/12/2023 at 14:50.
Pushed by fusionfuture into branch 'master'.

wallpapers/image: make the last wallpaper stay longer during transition

The exit transition starts first and can be completed earlier than
the enter transition, so add extra 500ms to the exit transition to avoid
flicker when the last wallpaper has been destroyed but the enter
transition is not completed yet.
FIXED-IN: 6.0

M  +2    -1    wallpapers/image/imagepackage/contents/ui/ImageStackView.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/ea07f95b3f47918fe9d176e5300fd74354df5a9d
Comment 6 Fushan Wen 2024-02-15 01:49:33 UTC
Git commit 4f730d6c63b440f461296da5d2f448d1ee77998f by Fushan Wen.
Committed on 14/02/2024 at 01:34.
Pushed by fusionfuture into branch 'master'.

wallpapers/image: make the last wallpaper stay longer during transition

The exit transition starts first and can be completed earlier than
the enter transition, so add extra 500ms to the exit transition to avoid
flicker when the last wallpaper has been destroyed but the enter
transition is not completed yet.

M  +2    -1    wallpapers/potd/package/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/4f730d6c63b440f461296da5d2f448d1ee77998f
Comment 7 Fushan Wen 2024-02-15 01:55:48 UTC
Git commit 69245fa93440e5b4382401caca0a9b263f12838f by Fushan Wen.
Committed on 15/02/2024 at 01:55.
Pushed by fusionfuture into branch 'Plasma/6.0'.

wallpapers/image: make the last wallpaper stay longer during transition

The exit transition starts first and can be completed earlier than
the enter transition, so add extra 500ms to the exit transition to avoid
flicker when the last wallpaper has been destroyed but the enter
transition is not completed yet.


(cherry picked from commit 4f730d6c63b440f461296da5d2f448d1ee77998f)

M  +2    -1    wallpapers/potd/package/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/69245fa93440e5b4382401caca0a9b263f12838f