Bug 464132 - One pixel overlap when disabling and enabling screen which can cause panel widgets to open on the wrong location or the wrong screen
Summary: One pixel overlap when disabling and enabling screen which can cause panel wi...
Status: RESOLVED DUPLICATE of bug 455394
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.27.0
Platform: Other Linux
: HI normal
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-11 08:12 UTC by Linus Kardell
Modified: 2023-04-21 14:07 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Linus Kardell 2023-01-11 08:12:01 UTC
SUMMARY
When enabling a new monitor, it overlaps the old one by one pixel column.

STEPS TO REPRODUCE
1. Have one monitor enabled
2. Enable another monitor

OBSERVED RESULT
The new monitor overlaps the old one with one pixel. So if the first monitor as is 2560x1440, the new monitor ends up at coordinate 2559,0. Then, when maximizing a window on the left monitor, the rightmost pixel column of the window will also be shown on the left edge of the right monitor.

EXPECTED RESULT
The new monitor should not overlap with the old one.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230108
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 6.1.3-1-default (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 62.7 Gibyte of RAM
Graphics Processor: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2
Manufacturer: ASUS
Comment 1 Nate Graham 2023-01-11 18:59:09 UTC
This is fixed already for Plasma 5.27, thankfully.
Comment 2 Linus Kardell 2023-02-15 07:45:20 UTC
I just got Plasma 5.27, and I still have this issue.
Comment 3 Michael Butash 2023-02-17 01:44:58 UTC
Oddly I saw this today testing 5.27.0 on arch enabling multiple displays they were misplacing off by one pixel in alignment as a snap-to.  I would have never noticed if I weren't looking at settings in nvidia-settings right next to it.  Monitor placement is always really weird and difficult to place displays even manually dragging them (still in 5.27, maybe eventually they'll fix this), but really wacky things happen when you get those overlaps, so really hurts when the settings is doing this to you in the first place.
Comment 4 Nate Graham 2023-02-17 18:41:57 UTC
Do you have 3 screens? I just found out that the prohibition on overlapping only takes effect for 2 screens.
Comment 5 Michael Butash 2023-02-17 19:13:14 UTC
Yes, 4 actually.  It only seemed to happen on the last, but I didn't test how commonly it would occur if adding them incrementally.
Comment 6 Linus Kardell 2023-02-17 19:44:56 UTC
I have two screens
Comment 7 Nate Graham 2023-02-21 17:23:36 UTC
Ok Michael, then your thing is a different bug. Let's focus on Linus' issue here.
Comment 8 Nate Graham 2023-02-21 17:24:05 UTC
Linus, can you re-arrange the screens in the Display Configuration page in System Settings to remove the overlap?
Comment 9 Linus Kardell 2023-02-21 17:46:57 UTC
Yes, I can. In fact, I can't not remove the overlap when rearranging them.

When I first enable the second monitor, the rearrangement thing (when clicking and holding without moving the mouse) shows both of them as being at coordinate 0,0, even though they're shown side-by-side. If I save, exit the configuration, and return, the second one will then be at 2559,0. But if I move either monitor, the second monitor snaps to 2560,0. I can't make the screens overlap if I drag them, it only happens if I save without dragging them.
Comment 10 Nate Graham 2023-02-21 21:16:40 UTC
Ok, so once you've dragged to remove the overlap and then saved, does it then avoid overlapping in the future? Or does the overlap return?
Comment 11 Linus Kardell 2023-02-22 08:14:57 UTC
The overlap returns if I disable the second screen, saves, and reenables it again.
Comment 12 Nate Graham 2023-02-22 20:30:02 UTC
Ok, thanks. We prevented manual overlapping in the UI, but it looks like this one-pixel overlap can still happen with the automatic positioning. Can you paste the output of `kscreen-doctor -o` before and after the overlap happens?
Comment 13 Linus Kardell 2023-02-23 17:41:16 UTC
Before enabling second monitor (DP-4):

Output: 444 DP-0 enabled connected priority 1 DisplayPort Modes: 445:2560x1440@60! 446:2560x1440@170 447:2560x1440@144* 448:2560x1440@120 449:2560x1440@100 450:1920x1080@144 451:1920x1080@60 452:1920x1080@60 453:1920x1080@50 454:1680x1050@60 455:1440x900@60 456:1280x1024@75 457:1280x1024@60 458:1280x960@60 459:1280x800@60 460:1280x720@60 461:1280x720@60 462:1280x720@50 463:1152x864@75 464:1024x768@75 465:1024x768@70 466:1024x768@60 467:800x600@75 468:800x600@72 469:800x600@60 470:800x600@56 471:720x576@50 472:720x480@60 473:640x480@75 474:640x480@73 475:640x480@60 476:640x480@60 Geometry: 0,0 2560x1440 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 477 DP-1 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 478 HDMI-0 disabled disconnected priority 0 HDMI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 479 DP-2 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 480 DP-3 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 481 DP-4 disabled connected priority 0 DisplayPort Modes: 451:1920x1080@60 452:1920x1080@60 453:1920x1080@50 454:1680x1050@60 455:1440x900@60 456:1280x1024@75 461:1280x720@60 462:1280x720@50 464:1024x768@75 465:1024x768@70 466:1024x768@60 467:800x600@75 468:800x600@72 469:800x600@60 470:800x600@56 471:720x576@50 472:720x480@60 473:640x480@75 474:640x480@73 475:640x480@60 476:640x480@60 482:2560x1440@60! 483:2560x1440@144 484:2560x1440@120 485:1920x1080@144 486:1920x1080@120 487:1680x1050@120 488:1440x900@120 489:1440x576@50 490:1440x480@60 491:1280x1024@120 492:1280x720@120 Geometry: 0,0 2560x1440 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 493 DP-5 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 494 USB-C-0 disabled disconnected priority 0 Unknown Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown

After enabling second monitor, without moving it:

Output: 444 DP-0 enabled connected priority 1 DisplayPort Modes: 445:2560x1440@60! 446:2560x1440@170 447:2560x1440@144* 448:2560x1440@120 449:2560x1440@100 450:1920x1080@144 451:1920x1080@60 452:1920x1080@60 453:1920x1080@50 454:1680x1050@60 455:1440x900@60 456:1280x1024@75 457:1280x1024@60 458:1280x960@60 459:1280x800@60 460:1280x720@60 461:1280x720@60 462:1280x720@50 463:1152x864@75 464:1024x768@75 465:1024x768@70 466:1024x768@60 467:800x600@75 468:800x600@72 469:800x600@60 470:800x600@56 471:720x576@50 472:720x480@60 473:640x480@75 474:640x480@73 475:640x480@60 476:640x480@60 Geometry: 0,0 2560x1440 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 477 DP-1 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 478 HDMI-0 disabled disconnected priority 0 HDMI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 479 DP-2 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 480 DP-3 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 481 DP-4 enabled connected priority 2 DisplayPort Modes: 451:1920x1080@60 452:1920x1080@60 453:1920x1080@50 454:1680x1050@60 455:1440x900@60 456:1280x1024@75 461:1280x720@60 462:1280x720@50 464:1024x768@75 465:1024x768@70 466:1024x768@60 467:800x600@75 468:800x600@72 469:800x600@60 470:800x600@56 471:720x576@50 472:720x480@60 473:640x480@75 474:640x480@73 475:640x480@60 476:640x480@60 482:2560x1440@60! 483:2560x1440@144* 484:2560x1440@120 485:1920x1080@144 486:1920x1080@120 487:1680x1050@120 488:1440x900@120 489:1440x576@50 490:1440x480@60 491:1280x1024@120 492:1280x720@120 Geometry: 2559,0 2560x1440 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 493 DP-5 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 494 USB-C-0 disabled disconnected priority 0 Unknown Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown

After moving second monitor:

Output: 444 DP-0 enabled connected priority 1 DisplayPort Modes: 445:2560x1440@60! 446:2560x1440@170 447:2560x1440@144* 448:2560x1440@120 449:2560x1440@100 450:1920x1080@144 451:1920x1080@60 452:1920x1080@60 453:1920x1080@50 454:1680x1050@60 455:1440x900@60 456:1280x1024@75 457:1280x1024@60 458:1280x960@60 459:1280x800@60 460:1280x720@60 461:1280x720@60 462:1280x720@50 463:1152x864@75 464:1024x768@75 465:1024x768@70 466:1024x768@60 467:800x600@75 468:800x600@72 469:800x600@60 470:800x600@56 471:720x576@50 472:720x480@60 473:640x480@75 474:640x480@73 475:640x480@60 476:640x480@60 Geometry: 0,0 2560x1440 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 477 DP-1 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 478 HDMI-0 disabled disconnected priority 0 HDMI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 479 DP-2 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 480 DP-3 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 481 DP-4 enabled connected priority 2 DisplayPort Modes: 451:1920x1080@60 452:1920x1080@60 453:1920x1080@50 454:1680x1050@60 455:1440x900@60 456:1280x1024@75 461:1280x720@60 462:1280x720@50 464:1024x768@75 465:1024x768@70 466:1024x768@60 467:800x600@75 468:800x600@72 469:800x600@60 470:800x600@56 471:720x576@50 472:720x480@60 473:640x480@75 474:640x480@73 475:640x480@60 476:640x480@60 482:2560x1440@60! 483:2560x1440@144* 484:2560x1440@120 485:1920x1080@144 486:1920x1080@120 487:1680x1050@120 488:1440x900@120 489:1440x576@50 490:1440x480@60 491:1280x1024@120 492:1280x720@120 Geometry: 2560,0 2560x1440 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 493 DP-5 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 494 USB-C-0 disabled disconnected priority 0 Unknown Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Comment 14 Nate Graham 2023-02-27 19:12:24 UTC
Yup. Before:
> Geometry: 0,0 2560x1440
After:
> Geometry: 2559,0 2560x1440
Another question: when the screens are in "one pixel overlap" state, do you by any chance see panel pop-ups opening on the wrong screen?
Comment 15 Linus Kardell 2023-02-27 21:11:59 UTC
Yes, if I open a panel pop-up on the far left end of the panel (the start menu) on the right screen while there is an overlap, the pop-up shows up on the right side of the left screen instead.
Comment 16 Nate Graham 2023-02-28 18:46:49 UTC
Thanks!
Comment 17 Nate Graham 2023-03-15 17:23:55 UTC
*** Bug 467367 has been marked as a duplicate of this bug. ***
Comment 18 Nate Graham 2023-04-04 23:21:08 UTC
*** Bug 467776 has been marked as a duplicate of this bug. ***
Comment 19 Nate Graham 2023-04-21 14:07:05 UTC
Same root cause as Bug 455394; will be fixed by https://invent.kde.org/plasma/kscreen/-/merge_requests/204!

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