Bug 445160 - Wallpaper scaling issues on multimonitor Wayland setup
Summary: Wallpaper scaling issues on multimonitor Wayland setup
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-multiscreen (show other bugs)
Version: 5.24.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Aleix Pol
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2021-11-08 14:04 UTC by phrxmd
Modified: 2023-04-23 17:21 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Initial backdrop (National Geographic POTD) (2.05 MB, image/jpeg)
2021-11-08 14:04 UTC, phrxmd
Details
Initial backdrop after re-login - note how the wallpaper on the right screen has the scaling factor (200%) applied (2.35 MB, image/jpeg)
2021-11-08 14:05 UTC, phrxmd
Details
Initial backdrop after relogin, screenshot - note how Spectacle does not see the scaling as it is on the screen (1.64 MB, image/jpeg)
2021-11-08 14:07 UTC, phrxmd
Details
Backdrop after changing - note how it is scaled right away, and Spectacle now sees the scaling (1.53 MB, image/jpeg)
2021-11-08 14:09 UTC, phrxmd
Details
Backdrop after booting into KWin Wayland 5.23.3 (1.16 MB, image/jpeg)
2021-11-20 18:49 UTC, phrxmd
Details
Backdrop with oversized Yakuake window after booting into KWin Wayland 5.23.3 (746.77 KB, image/jpeg)
2021-11-20 18:52 UTC, phrxmd
Details
Wallpaper setup before KWin crash (National Geographic POTD scaled correctly) (146.61 KB, image/jpeg)
2022-02-11 18:56 UTC, phrxmd
Details
Wallpaper setup after KWin crash and restart (National Geographic POTD with KWin scaling applied twice) (133.16 KB, image/jpeg)
2022-02-11 18:57 UTC, phrxmd
Details
Incorrectly scaled wallpaper with incorrectly scaled krunner, single external monitor (620.43 KB, image/jpeg)
2022-02-12 00:23 UTC, Grzegorz Kowzan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description phrxmd 2021-11-08 14:04:13 UTC
Created attachment 143333 [details]
Initial backdrop (National Geographic POTD)

SUMMARY
When I reboot or relogin after changing the desktop wallpaper, the wallpaper on one of the monitors now appears scaled according to system scaling factor.

I don't always see this in Spectacle (but sometimes I do). I can reset this by changing the scaling factor for the affected display, then the wallpaper appears as it should, until the next login. I see it with Picture of the day as well as static wallpapers.

STEPS TO REPRODUCE
1. Set a scale factor and a desktop wallpaper.
2. Logout or login again - the wallpaper on one screen is now scaled.
3. Change the scale factor on that monitor - the wallpaper now appears as it should.
4. Logout or login again - it's scaled again

OBSERVED RESULT
The wallpaper looks scaled after a login.

EXPECTED RESULT
The wallpaper should appear the same after each login.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 phrxmd 2021-11-08 14:05:59 UTC
Created attachment 143334 [details]
Initial backdrop after re-login - note how the wallpaper on the right screen has the scaling factor (200%) applied
Comment 2 phrxmd 2021-11-08 14:07:00 UTC
Created attachment 143335 [details]
Initial backdrop after relogin, screenshot - note how Spectacle does not see the scaling as it is on the screen
Comment 3 phrxmd 2021-11-08 14:09:57 UTC
Created attachment 143336 [details]
Backdrop after changing - note how it is scaled right away, and Spectacle now sees the scaling
Comment 4 phrxmd 2021-11-08 14:11:35 UTC
Oh and sorry for missing this:

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20211105
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.14.14-1-default (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Comment 5 David Redondo 2021-11-09 08:27:03 UTC
Is it only the wallpaper or also other things? Windows places outside the screen for example?
Comment 6 phrxmd 2021-11-09 08:28:29 UTC
It seems to be only the wallpaper as far as I can see.
Comment 7 phrxmd 2021-11-15 18:19:34 UTC
I now have the situation where after a reboot, the wallpaper on screen 1 loads just fine, while the same wallpaper on screen 2 "jumps" repeatedly from the properly scaled version to a 200% scaled version and back :(
Comment 8 phrxmd 2021-11-20 18:49:31 UTC
Created attachment 143784 [details]
Backdrop after booting into KWin Wayland 5.23.3

I'm seeing it again.
Now the wallpaper of the left screen extends into the right screen.
Looks like there are some other positioning issues (KRunner opens in a strange position that is rougly in the middle of the wallpaper of the left screen)
Comment 9 phrxmd 2021-11-20 18:52:45 UTC
Created attachment 143785 [details]
Backdrop with oversized Yakuake window after booting into KWin Wayland 5.23.3

Another example - opening Yakuake after a fresh reboot into KWin 5.23.3 under Wayland. The Yakuake window extends across both screens, roughly the same as the backdrop of the left screen. There are clearly some scaling/positioning issues here.

The left screen is my 2560x1440 laptop screen @ 200%, the right screen is an external 4K monitor running at 3840x2160 @ 200%.
Comment 10 phrxmd 2022-02-11 18:55:31 UTC
I can reproduce this now when there is a KWin crash. Before the crash, the wallpaper is scaled regularly. After KWin crashes and comes up again, the wallpaper looks like it has KWin's scaling factor applied twice - as if there was an already-scaled version of the wallpaper in a cache somewhere before the crash, and after the crash KWin reads the scaled version and applies the scaling factor again.
Comment 11 phrxmd 2022-02-11 18:56:34 UTC
Created attachment 146593 [details]
Wallpaper setup before KWin crash (National Geographic POTD scaled correctly)
Comment 12 phrxmd 2022-02-11 18:57:19 UTC
Created attachment 146594 [details]
Wallpaper setup after KWin crash and restart (National Geographic POTD with KWin scaling applied twice)
Comment 13 Nate Graham 2022-02-11 21:54:21 UTC
Reminds me of Bug 449212. Some questions:

1. When your system is in this state, does it get fixed if you restart plasmashell with `plasmashell --replace`?
2. What kind of GPU do you have?
3. Is this a regression from Plasma 5.23?
Comment 14 phrxmd 2022-02-11 22:33:21 UTC
(In reply to Nate Graham from comment #13)
> Reminds me of Bug 449212. Some questions:
> 
> 1. When your system is in this state, does it get fixed if you restart
> plasmashell with `plasmashell --replace`?

I just tried it. `plasmashell --replace` seems to the issue mostly. After `plasmashell --replace` I end up in a state where the wallpaper is shown correctly initially until I either click on it or move the mouse to another screen, then it is displayed "scaled twice" again. This persists until I change virtual desktops at least once, then the wallpaper remains displayed correctly.

> 2. What kind of GPU do you have?

Intel 620 in the laptop, plus the Thunderbolt dock the external monitor is attached to.

> 3. Is this a regression from Plasma 5.23?

No. I first reported this with 5.23.2, it's persisted since then. See comment 4 for the original system information, back then I had forgotten to put it in the original post.
Comment 15 Grzegorz Kowzan 2022-02-12 00:22:49 UTC
I have the same issue: wallpaper is incorrectly scaled, running `plasmashell --replace` and switching workspaces fixes iy, krunner also shows up in the wrong spot. Note that I am using a single external monitor, so this problem is not specific to multi-monitor setups. I can confirm that the issue is not new and occurred also with 5.23.X. Possibly also with 5.22.X, but back then Plasma on Wayland crashed too frequently for me to use, so I didn't use it regularly and can't be sure.

The issue is summarized by the photo I just added. Desktop Folder Settings shows the wallpaper correctly scaled, but it's displayed wrongly. Spectacle screenshot also shows incorrectly placed krunner.

Operating System: Fedora Linux 35
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.7-200.fc35.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8650U CPU @ 1.90GHz
Memory: 15,5 GiB of RAM
Graphics Processor: Mesa DRI Intel® UHD Graphics 620
Comment 16 Grzegorz Kowzan 2022-02-12 00:23:41 UTC
Created attachment 146612 [details]
Incorrectly scaled wallpaper with incorrectly scaled krunner, single external monitor
Comment 17 Grzegorz Kowzan 2022-02-12 00:26:31 UTC
(In reply to Grzegorz Kowzan from comment #15)
> wrong spot. Note that I am using a single external monitor, so this problem
> is not specific to multi-monitor setups. 
For clarity, this is also a laptop so there is an internal monitor connected but it is disabled.
Comment 18 David Redondo 2022-02-14 08:00:14 UTC
KRunner asks Plasmashell where it should appear on screen, so when it's confused about screens it makes sense krunner also appears wrong
Comment 19 Nate Graham 2023-04-21 14:57:32 UTC
I'm not able to reproduce this issue in Plasma 5.27, which has a *ton* of multi-monitor improvements to fix issues such as this one. phrxmd, can you please upgrade to 5.27.4 or later and try again? Thanks!
Comment 20 phrxmd 2023-04-23 17:21:34 UTC
Can't reproduce it with 5.27.4 anymore. Thank you!