https://bugs.kde.org/show_bug.cgi?id=527150
Bug ID: 527150
Summary: Image wallpaper falls back to default on one screen:
replaceWhenLoaded() treats Image.Loading after
StackView.replace() as failure
Classification: Plasma
Product: plasmashell
Version First 6.8.0
Reported In:
Platform: CachyOS
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Image & Slideshow wallpaper plugins
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Target Milestone: 1.0
With a wallpaper package configured (e.g.
Image=file:///usr/share/wallpapers/Mountain/),
the lock screen shows the default wallpaper (Next) on one of two screens, while
the
other screen shows the configured wallpaper. A direct image file URL works on
both.
STEPS TO REPRODUCE
1. Two monitors: DP-1 2560x1440 with fractional scaling (logical 2048x1152),
HDMI-A-1 with logical size 1080x1920.
2. In kscreenlockerrc set:
[Greeter][Wallpaper][org.kde.image][General]
Image=file:///usr/share/wallpapers/Mountain/
3. Run /usr/lib/kscreenlocker_greet --testing
OBSERVED: DP-1 shows Next (dark variant), HDMI-A-1 shows Mountain.
Reproducible in almost every run (correct once in ~10 attempts).
EXPECTED: Mountain on both screens.
ANALYSIS
I added logging to ImageStackView.qml, replaceWhenLoaded(), right before
view.replace() and right before the fallback check:
before replace: status 1 (Ready)
after replace: 2048 1152 QSizeF(4096, 2304) status 2 (Loading)
.../Mountain/contents/images_dark/5120x2880.png?<ts>
-> then loads .../Next/contents/images_dark/5120x2880.png
The image has finished loading (Ready) when replaceWhenLoaded() runs.
view.replace(pendingImage, ...) then triggers a reload on this screen, so the
status goes back to Loading. The following check
if (pendingImage.status !== Image.Ready)
then calls mediaProxy.useSingleImageDefaults(), which permanently replaces the
source with the default wallpaper although nothing failed. With a direct file
URL the status apparently stays Ready, so the bug does not show.
Changing the check to
if (pendingImage.status === Image.Error || pendingImage.status ===
Image.Null)
fixes it reliably for me (3/3 runs, both screens correct).
SUGGESTED FIX
Base the fallback decision on the status before replace():
- view.replace(pendingImage, {}, QQC2.StackView.Transition);
+ const loadSucceeded = pendingImage.status === Image.Ready;
+ view.replace(pendingImage, {}, QQC2.StackView.Transition);
wallpaperInterface.loading = false;
- if (pendingImage.status !== Image.Ready) {
+ if (!loadSucceeded) {
mediaProxy.useSingleImageDefaults();
}
Why replace() causes a reload on the fractionally scaled screen (sourceSize
4096x2304 vs. logical 2048x1152) may be a separate issue.
SYSTEM
Arch Linux, Plasma 6.8.0 (plasma-workspace 6.8.0-1, kscreenlocker 6.8.0-1),
Wayland, NVIDIA RTX 5070 Ti, Qt <version>, DP-1 scale <scale>
--
You are receiving this mail because:
You are watching all bug changes.