Bug 464674

Summary: Wallpaper size changes after toggling external display while session is locked or any windows are open
Product: [Plasma] plasmashell Reporter: hexchain <kde>
Component: Image & Slideshow wallpaper pluginsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kde, nate, notmart, qydwhotmail, xaver.hugl
Priority: NOR Keywords: regression, wayland-only
Version First Reported In: 5.26.90   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Desktop state after toggling the monitor

Description hexchain 2023-01-23 06:35:32 UTC
Created attachment 155522 [details]
Desktop state after toggling the monitor

SUMMARY
On my laptop, after turning the monitor off and on, the desktop wallpaper on the external display appears as if it is shown on the internal screen: scaled and cropped to a smaller display size, only covering the top left part of the screen, and the remaining space is filled with black color. Changing the wallpaper also only changes the image area. I've attached a screenshot to demonstrate the situation.

This only happens when there are other foreground windows, or when the session is locked. It doesn't happen if it is a bare desktop before turning off the screen.

Restarting plasma-plasmashell.service brings it back to normal.

Setup: Wayland, laptop (internal screen on eDP-1, 2880x1800, 200%, usually turned off when a monitor is present) connected to a monitor (DP-2, 3840x2160, 200%) through a USB-C cable

The monitor does not disconnect when turned off but shortly disconnects (for ~2 seconds) when turned on. I've tried to simulate this by quickly unplugging/re-plugging the cable, but failed.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 6.1.7-arch1-1 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
I don't think this has ever happened in 5.26.
Comment 1 Fushan Wen 2023-01-24 01:10:25 UTC
Is the bug only on Wayland?
Comment 2 hexchain 2023-01-24 04:58:50 UTC
Short answer: yes, it doesn't seem to happen on X11.

Long story: I've created a new user to try to reproduce this bug. I believe these are the steps to make it happen (some might not be necessary, though):

1. Log into a Wayland session and set both screens to 200% scale
2. Disable the internal screen, only enable the external one
3. Disconnect the external display
4. Change the wallpaper on the internal screen
5. Log out and log in
6. Open some applications and lock the screen
7. Toggle the external display
8. Unlock, and minimize all windows

It could be highly dependent on the monitor's behavior when powered on. If it is hard to reproduce on your side, I can try to add some logs to kwin and/or plasmashell.
Comment 3 Fushan Wen 2023-02-11 11:28:10 UTC
Cannot reproduce but I don't have any monitor with DP so I can't really test here.
Comment 4 Zamundaaa 2024-05-22 13:11:16 UTC

*** This bug has been marked as a duplicate of bug 468159 ***