Bug 424265 - can't horizontally align laptop and external monitor, always 1 pixel off
Summary: can't horizontally align laptop and external monitor, always 1 pixel off
Status: RESOLVED DUPLICATE of bug 455394
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kscreen (show other bugs)
Version: 5.23.2
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-15 23:03 UTC by skierpage
Modified: 2022-11-12 14:32 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Display Configuration tooltip shows 1-pixel x offset of laptop screen. (71.27 KB, image/png)
2020-07-15 23:03 UTC, skierpage
Details

Note You need to log in before you can comment on or make changes to this bug.
Description skierpage 2020-07-15 23:03:15 UTC
Created attachment 130152 [details]
Display Configuration tooltip shows 1-pixel x offset of laptop screen.

SUMMARY
I have a 1920x1200 external display arranged above my 1920x1080 laptop display. While troubleshooting bug 422717 I noticed a screenshot of my desktop is 1921 pixels wide (see its attachment); `xwininfo` reports my laptop screen is
   0x2400062 (has no name): ()  1920x1080+1+1200  +1+1
note +1 x alignment. The two monitors are somehow 1 pixel out of horizontal alignment on the x axis.

No problem, I'll just drag the representation of my laptop sideways slightly in Display Configuration (kcm_kscreen). The two screens look perfectly aligned, but when I start to drag it the tooltip shows (1,1200) showing they're not precisely aligned (see attachment). However, no matter what I do I can't align both displays to x=0. If I drag the laptop screen representation to the side and then back under, it resets to (0,1200) but now the external monitor is at (1,0), and if I drag the external display back to (0,0), the laptop is back to offset of (1,1200). OCD triggered 😉

STEPS TO REPRODUCE
1. Poisition external 1920x1200 monitor above HD laptop monitor in Display Configuration
2. Notice they're 1 pixel out of alignment
3. Try to fix in Display Configuration system settings module.

OBSERVED RESULT
Always one monitor is 1 pixel off in x direction.

EXPECTED RESULT
They should both snap into horizontal alignment at x=0.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma:
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2 xcb

ADDITIONAL INFORMATION
My laptop monitor is physically smaller than the external display despite the same horizontal resolution. I've scaled the laptop monitor larger in the past to compensate, so maybe there's a slight scale mismatch in some configuration file, but currently Display configuration shows both monitors have Global scale of 100%.
Comment 1 skierpage 2020-11-12 03:12:05 UTC
I live booted a Fedora-KDE-Live-x86_64-Rawhide-20201101.n.0.iso USB and had the same 1-pixel misalignment when I repositioned screens (without fiddling with scaling). I think that had KDE Frameworks 5.75 and Plasma 5.20, should I update the version here?
Comment 2 skierpage 2021-06-09 22:36:48 UTC
As a workaround I ran `xrandr --output eDP-1 --below DP-1` to force alignment and that seems remembered across reboots and even into Wayland (I'm now on Fedora 34). But if I swap my top and bottom monitors in Display Configuration, once again one of them is always 1 pixel out of horizontal alignment.

Perhaps not surprisingly, xrandr doesn't work to set alignments under Wayland, it either fails silently or prints "X Error of failed request:  BadMatch (invalid parameter attributes)". https://arewewaylandyet.com/ lists some Wayland equivalents for xrandr, I haven't tried them.
Comment 3 Jason Tibbitts 2021-06-09 22:55:21 UTC
I've had a rather similar problem for several releases.  Currently running Fedora 34 with plasma 5.21.5 under wayland, but the problem has existed previously under X.

I have three 16:10 monitors: two stacked vertically with the top one upside down, and one to the left in portrait mode.  For some reason I simply cannot use the display confguration dialog to properly align the bottom monitor in the vertical stack.  It snaps to exactly 1199,1200.  The top monitor is at 1200,0.

The one pixel overlap seems to convince some portions of the system that the monitors are in clone mode.  This auto-disables some notifications.
Comment 4 Antonia Carrier 2021-11-08 19:13:16 UTC
I made an account just now to report that same bug… I've found an admittedly tedious, but one-time fix. I had a minor issue this morning which had me go through this again, so I'll update the bug report's KDE version to 5.23.2. (Sourced from the Arch Linux packages) You can edit the config files in "~/.local/share/kscreen/", look for the one(s) with the unwanted offsets (The numbers are the same ones you see in the display settings when clicking on a display) and then do the simple math to adjust their positions in the text file so that they line up properly.
Comment 5 Nate Graham 2022-11-12 14:32:49 UTC

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