Bug 481219

Summary: Wallpaper thumbnails show a 1 or 2 px vertical white line in ultrawide display
Product: [Plasma] plasmashell Reporter: Iyán M. V. <me>
Component: Image & Slideshow wallpaper pluginsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: boredsquirrel, d_debnath, fanzhuyifan, jmb_tux, meven, musicalstrength27, nate, notmart, qydwhotmail
Priority: NOR Keywords: qt6
Version First Reported In: 6.1.2   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: Framework 6.6
Sentry Crash Report:
Attachments: White vertical line on thumbnails

Description Iyán M. V. 2024-02-11 12:50:31 UTC
Created attachment 165749 [details]
White vertical line on thumbnails

SUMMARY
The thumbnails in the wallpaper settings show a thin white line on the left.


STEPS TO REPRODUCE
1. Go to System Settings -> Wallpaper

OBSERVED RESULT
Wrong thumbnail

EXPECTED RESULT
Correct thumbnail as in Plasma 5.x

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0
Kernel Version: 6.7.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: LENOVO
Product Name: 20XYCTO1WW
System Version: ThinkPad X1 Yoga Gen 6
Comment 1 fanzhuyifan 2024-02-11 20:15:20 UTC
Thank you for your bug report! What is the resolution of your screen? I can't reproduce on my 1920x1080 monitor.
Comment 2 Iyán M. V. 2024-02-11 20:39:30 UTC
I just realized that I also cannot reproduce on the built-in laptop's screen, which is 1920x1200 and I run with scale 125%. The screenshot was taken with an external ultrawide monitor with 3440x1440 (also running with scale 125%)
Comment 3 fanzhuyifan 2024-02-12 23:08:18 UTC
*** Bug 481264 has been marked as a duplicate of this bug. ***
Comment 4 Méven Car 2024-02-14 11:31:36 UTC
(In reply to Iyán Méndez Veiga from comment #2)
> I just realized that I also cannot reproduce on the built-in laptop's
> screen, which is 1920x1200 and I run with scale 125%. The screenshot was
> taken with an external ultrawide monitor with 3440x1440 (also running with
> scale 125%)

Seems like a rounding error of the size in the rendering due the the scale in QML.
I am guessing the bug will be in WallpaperDelegate.qml in plasma-workspace, something similar to:
https://invent.kde.org/plasma/plasma-workspace/-/commit/ff4fa345c5119000809c8bbb1357285cfd168a1e
Comment 5 Méven Car 2024-02-14 11:36:50 UTC
(In reply to Méven Car from comment #4)
> (In reply to Iyán Méndez Veiga from comment #2)
> > I just realized that I also cannot reproduce on the built-in laptop's
> > screen, which is 1920x1200 and I run with scale 125%. The screenshot was
> > taken with an external ultrawide monitor with 3440x1440 (also running with
> > scale 125%)
> 
> Seems like a rounding error of the size in the rendering due the the scale
> in QML.
> I am guessing the bug will be in WallpaperDelegate.qml in plasma-workspace,
> something similar to:
> https://invent.kde.org/plasma/plasma-workspace/-/commit/
> ff4fa345c5119000809c8bbb1357285cfd168a1e

Or in Kdeclarative QPixmapItem::paint or QPixmapItem::updatePaintedRect that doesn't seem to take into account devicepixelratio or where there could be a mismatch between the two.
Comment 6 Méven Car 2024-02-17 15:09:13 UTC
(In reply to Méven Car from comment #5)
> (In reply to Méven Car from comment #4)
> > (In reply to Iyán Méndez Veiga from comment #2)
> > > I just realized that I also cannot reproduce on the built-in laptop's
> > > screen, which is 1920x1200 and I run with scale 125%. The screenshot was
> > > taken with an external ultrawide monitor with 3440x1440 (also running with
> > > scale 125%)
> > 
> > Seems like a rounding error of the size in the rendering due the the scale
> > in QML.
> > I am guessing the bug will be in WallpaperDelegate.qml in plasma-workspace,
> > something similar to:
> > https://invent.kde.org/plasma/plasma-workspace/-/commit/
> > ff4fa345c5119000809c8bbb1357285cfd168a1e
> 
> Or in Kdeclarative QPixmapItem::paint or QPixmapItem::updatePaintedRect that
> doesn't seem to take into account devicepixelratio or where there could be a
> mismatch between the two.

Relevant prior work: https://phabricator.kde.org/D25685
Comment 7 Bug Janitor Service 2024-02-17 15:29:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kdeclarative/-/merge_requests/229
Comment 8 Nick 2024-03-23 06:46:30 UTC
*** Bug 483612 has been marked as a duplicate of this bug. ***
Comment 9 fanzhuyifan 2024-08-19 02:28:23 UTC
*** Bug 491862 has been marked as a duplicate of this bug. ***
Comment 10 Méven 2024-09-02 13:04:51 UTC
Git commit 6f3609a63e37e9332d580fd53ee52bfec5a3927e by Méven Car.
Committed on 02/09/2024 at 13:04.
Pushed by meven into branch 'master'.

QPixmapItem: Adjust rendering to dpr positioning

Push a bit further c3e6627e598ba25d2da87f5359aad194c122a6d9

M  +14   -8    src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.cpp

https://invent.kde.org/frameworks/kdeclarative/-/commit/6f3609a63e37e9332d580fd53ee52bfec5a3927e
Comment 11 musicalstrength27 2024-12-15 18:34:11 UTC
The error still occurs, but only on the virtual machine in VirtualBox or VMware Workstation Pro. I am using CachOS with KDE. I have an NVIDIA RTX 4070 card. Resolution: 1920x1080.

KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Session: Wayland
Resolution: 1920x1080