Bug 499447 - Remember wallpapers per physical monitor or resolution
Summary: Remember wallpapers per physical monitor or resolution
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: Image & Slideshow wallpaper plugins (show other bugs)
Version: 6.2.5
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2025-02-03 08:31 UTC by Karl-Johan Karlsson
Modified: 2025-04-10 18:16 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl-Johan Karlsson 2025-02-03 08:31:01 UTC
SUMMARY

I use slideshow wallpapers, centred without scaling, with manually pre-sized images in one directory per resolution, individually set per screen, i.e.:
~/backgrounds/1920x1080/
~/backgrounds/1920x1200/
~/backgrounds/2560x1440/
I have a laptop with a 1920x1200 built-in monitor, and regularly move between external monitors with the other resolutions as well (the most common ones are 2560x1440 over DP through a USB-C docking station, dual 1920x1200 over DP through another USB-C docking station, and 1920x1080 over HDMI).

When I switch monitors, it seems to be random which directory the desktop on the new monitor gets its wallpapers from, and I often have to manually change to the correct one. E.g. I plug in to the docking station with the 2560x1440 monitor, and Plasma displays wallpapers on that monitor from ~/backgrounds/1920x1200/, giving me images with the wrong aspect ratio and a large black border.

I would prefer it if Plasma could remember the wallpaper configuration per physical monitor, or per screen resolution.

SOFTWARE/OS VERSIONS

Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1
Kernel Version: 6.12.9-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × 12th Gen Intel® Core™ i7-1255U
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Xe Graphics
Comment 1 TraceyC 2025-04-07 22:51:03 UTC
This sounds reasonable. It would benefit many people who have a laptop they regularly reconnect to external displays
Comment 2 Nate Graham 2025-04-08 15:59:27 UTC
"per physical monitor" is unfortunately technically impossible since monitors lie. We could make this work like 85% of the time, but would end up with unfixable bugs when people use monitors that lie (which is a depressing number of them).

Remembering the wallpaper per resolution (or scale factor) is possible, but is it desirable? What's the actual use case here?

From the original bug report, it seems like this is in fact a bug, not a missing feature. We should fix the bug, not add a dubious feature that works around it.

Karl-Johan, can you be specific about how you trigger the bug? Ideally by writing Steps To Reproduce that another person can follow. Thanks!
Comment 3 Karl-Johan Karlsson 2025-04-08 18:12:57 UTC
(In reply to Nate Graham from comment #2)
> Remembering the wallpaper per resolution (or scale factor) is possible, but
> is it desirable? What's the actual use case here?

My actual use case is that I use desktop wallpapers featuring artwork, not generic abstract colours. To make this look good, I resize and crop the images manually beforehand (since it would be impossible for Plasma to know what a good-looking crop would be). This also allows me to use the same base image on monitors with different aspect ratios, if it still looks good in all the different crop patterns.

For a concrete example, see https://www.deviantart.com/kenket/art/Another-Day-Anywhere-596391668 (which is an acrylic painting of an African wild dog). The source image is 2442x1495px, which is neither 16:9 nor 16:10. However, with a few quick operations in GIMP, versions of it can be made that fit either 1920x1200 or 1920x1080.

To accomplish this, I have a directory structure with one directory per resolution, e.g.:

~/backgrounds/1920x1080/
~/backgrounds/1920x1200/
~/backgrounds/2560x1440/

And have my Plasma wallpaper settings set to:
Wallpaper type: Slideshow
Positioning: Centered
Background: Solid colour (black)
With each monitor having the folder with images of the correct resolution selected.

> Karl-Johan, can you be specific about how you trigger the bug? Ideally by
> writing Steps To Reproduce that another person can follow. Thanks!

I'm not sure how to be more specific, since it is not deterministic.

* Connect a laptop to one set of external monitors. On each monitor, right-click the background, select "Desktop and Wallpaper", and select the folder containing images of the resolution matching the monitor.
* Move the laptop to another set of external monitors, with different resolutions. Again, on each monitor, right-click the background, select "Desktop and Wallpaper", and select the folder containing images of the resolution matching the monitor.
* Move back and forth between the sets of external monitors several times. I am not sure whether it makes a difference if the laptop is suspended first or if I just yank out the docking station cable while it's running.
* Sometimes, wallpapers of the correct resolution appear on a newly connected monitor, without me having to change them.
* Sometimes, wallpapers of the wrong resolution appear on a newly connected monitor, and I have to change them. This shows up by the wallpapers either having a large black border (wallpaper too small for the monitor) or missing their edges (wallpaper too large for the monitor).
* Sometimes, after a change, the built-in monitor on the laptop shows wallpapers of the wrong resolution, even though this monitor hasn't changed.
Comment 4 Karl-Johan Karlsson 2025-04-08 18:41:35 UTC
I have not collected statistics on how often "sometimes" is. Based on how much this problem annoys me, I'd say it occurs about 1/4 of the times I move between monitor setups.

I have used this wallpaper setup for all my computers for a long time (file timestamps say 2010), but I didn't start moving one between external monitors until just recently, so I have no idea if it would have been a problem before then.
Comment 5 Karl-Johan Karlsson 2025-04-09 20:06:35 UTC
I've been running on Wayland previously, but yesterday I switched to X to escape a display bug in Firefox 137.
I was connected to 2*1920x1200 monitors.
I suspended the laptop (to RAM), disconnected from the docking station, and today I connected to 1*2560x1440 monitor and resumed.
The 2560x1440 monitor showed a 1920x1200 wallpaper and a thick black border.
So Wayland or X11 makes no difference for this issue.
Comment 6 Nate Graham 2025-04-10 18:16:54 UTC
OK, we'll you're in luck! We already support exactly what you want to do, for the reason why you want to do it. And we ship Plasma's default wallpapers like this, so you can copy the format we use there

Basically what you need to do is create a wallpaper package with multiple files in it, each one with one of your pre-cropped sizes. Then Plasma will use the appropriate one automatically. Check out /usr/share/wallpapers/Next/ on your system to see the format of how to create one of these wallpaper packages.

Once you've created the wallpaper packages for the desired images, put each one in ~/.local/share/wallpapers/. You may need to reboot afterwards. Thereafter, *one* item for the image should appear in the wallpaper chooser grids, and then when you switch screens, a different underlying image will be used.

You may need to remove any existing images from the wallpaper chooser grids to prevent Plasma from getting confused by the same image appearing twice (once in a wallpaper package and once from a standalone image file).

If you have trouble doing any of this, I'd recommend asking for help at https://discuss.kde.org. Folks there should be able to give you a hand if needed.