Summary: | On wayland, Maximized window on external monitor set to 175% scale sometimes has large vertical gap at top with certain display configurations | ||
---|---|---|---|
Product: | [Plasma] KScreen | Reporter: | fanzhuyifan |
Component: | common | Assignee: | fanzhuyifan |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | miranda, nate, xaver.hugl |
Priority: | NOR | Keywords: | qt6, wayland |
Version: | git | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=464842 https://bugs.kde.org/show_bug.cgi?id=482539 |
||
Latest Commit: | https://invent.kde.org/plasma/kscreen/-/commit/cff5739c872393bfbfe9bca43a5763f4d9ec3e6e | Version Fixed In: | 6.0 |
Attachments: | maximize has vertical space |
Description
fanzhuyifan
2023-11-30 19:11:36 UTC
Created attachment 163665 [details]
maximize has vertical space
black part is caused by misalignment of the screens and does not actually show up on the physical screen.
Not sure why, but I cannot reproduce this on neon unstable on the same machine. Main difference is nvidia driver version--arch is on 545, while neon unstable is still on 535. Will check if that makes a difference. On arch where I observed this, this was not consistently reproducible. It only happens some of the time. Cannot reproduce at all with an Intel iGPU. I would add that in the screen configuration mentioned above, this happens when the scale of the external monitor is set to 175%, but not when it is set to 170%. I am using intel iGPU with NVIDIA dGPU On a different external monitor, can also be triggered with this screen configuration: (external monitor set to 110% scale). There is also a vertical gap above maximized windows in the external screen. Output: 1 eDP-2 enabled connected priority 1 Panel Modes: 0:2560x1600@240*! 1:2560x1600@60 2:1600x1200@60 3:1280x1024@60 4:1024x768@60 5:2560x1600@60 6:1920x1200@60 7:1280x800@60 8:2560x1440@60 9:1920x1080@60 10:1600x900@60 11:1368x768@60 12:1280x720@60 Geometry: 1745,97 1707x1067 Scale: 1.5 Rotation: 1 Overscan: 0 Vrr: Automatic RgbRange: Automatic HDR: incapable Wide Color Gamut: incapable ICC profile: none Output: 2 HDMI-A-1 enabled connected priority 2 HDMI Modes: 0:1920x1080@60*! 1:1920x1080@72 2:1920x1080@60 3:1920x1080@50 4:1680x1050@60 5:1600x900@60 6:1280x1024@60 7:1440x900@60 8:1280x800@60 9:1280x720@60 10:1280x720@60 11:1280x720@50 12:1024x768@70 13:1024x768@60 14:800x600@72 15:800x600@60 16:800x600@56 17:720x576@50 18:720x480@60 19:640x480@73 20:640x480@60 Geometry: 0,0 1745x982 Scale: 1.1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown HDR: incapable Wide Color Gamut: incapable ICC profile: none Observation (assuming some fractional scaling that can trigger this bug): This gap at the top of the external monitor only appear when there is a top panel in the other monitor set to always visible. In this case, the vertical gap scales with the vertical offset between the two monitors -- the lower the position of the screen with the top panel, the bigger the vertical gap. This issue also disappears when I manually set the two screens to have a gap of 1 pixel between them. These suggest that this bug has the same root cause as 464842 -- under fractional scaling, content on one screen can have an impact on the other screen. A possibly relevant merge request was started @ https://invent.kde.org/plasma/libkscreen/-/merge_requests/172 A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreen/-/merge_requests/264 Git commit 6f797a908360de5c9654cd6cbd1dcc170b35207c by Yifan Zhu. Committed on 10/12/2023 at 04:33. Pushed by zamundaaa into branch 'master'. Round up output geometry Under fractional scaling, output screens can have non-integral sizes. Previous code uses QSizeF::toSize(), which rounds to the nearest integer. This sometimes results in different screens sharing one pixel at the edge, which causes BUG 464842 and BUG 477791. Implement Output::explicitLogicalSizeInt() and Config::logicalSizeForOutputInt to explicitly round up non-integral sizes, and use them in calculating output geometry. Related: bug 464842 M +1 -1 autotests/testscreenconfig.cpp M +7 -1 src/config.cpp M +7 -0 src/config.h M +7 -1 src/output.cpp M +11 -0 src/output.h https://invent.kde.org/plasma/libkscreen/-/commit/6f797a908360de5c9654cd6cbd1dcc170b35207c Git commit cff5739c872393bfbfe9bca43a5763f4d9ec3e6e by Xaver Hugl, on behalf of Yifan Zhu. Committed on 11/12/2023 at 15:23. Pushed by zamundaaa into branch 'master'. Round up output geometry Under fractional scaling, output screens can have non-integral sizes. Previous code uses QSizeF::toSize(), which rounds to the nearest integer. This sometimes results in different screens sharing one pixel at the edge, which causes BUG 464842 and BUG 477791. Use the new Output::explicitLogicalSizeInt() and Config::logicalSizeForOutputInt functions to explicitly round up non-integral sizes. Related: bug 464842 M +6 -6 kcm/output_model.cpp https://invent.kde.org/plasma/kscreen/-/commit/cff5739c872393bfbfe9bca43a5763f4d9ec3e6e |