Bug 427545 - Dual DisplayPort monitors (tiled, MST, e.g. 5k) are not supported by KWin
Summary: Dual DisplayPort monitors (tiled, MST, e.g. 5k) are not supported by KWin
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (show other bugs)
Version: 6.2.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
: 435631 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-11 14:12 UTC by Andrej Podzimek
Modified: 2025-03-04 10:18 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
vlad.zahorodnii: Wayland+
vlad.zahorodnii: X11-


Attachments
Two 5k HP monitors (2 tiles each, quad 2560x2880 altogether) shown in Systemsettings (53.16 KB, image/png)
2020-10-11 14:12 UTC, Andrej Podzimek
Details
Current status of 5k monitors (765.30 KB, image/jpeg)
2024-10-03 18:03 UTC, SimplyCorbett
Details
drm_info of HP all-in-one concerned (12.87 KB, application/zip)
2025-03-04 10:18 UTC, Méven
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Podzimek 2020-10-11 14:12:08 UTC
Created attachment 132274 [details]
Two 5k HP monitors (2 tiles each, quad 2560x2880 altogether) shown in Systemsettings

SUMMARY

With both Wayland and X11, window maximization on dual DisplayPort monitors doesn't work.
While the problem can be hacked around using hax11 on X11 (https://github.com/CyberShadow/hax11), there seems to be no solution for Wayland.


STEPS TO REPRODUCE

1. Connect a dual DisplayPort monitor (sometimes called tiled); examples:
   * HP Z27q (a classical old 5k monitor)
   * LG 27MD5KL (a Thunderbolt 5k monitor with two virtual DisplayPorts/tiles)

2. Start KDE and maximize a window.


OBSERVED RESULT

Windows are maximized over a single 2560x2880 tile.
(While normal windows can be enlarged over both tiles manually, there is no way to make full-screen video maximize correctly.)


EXPECTED RESULT

Windows (and full-screen videos) should be maximized over the entire 5120x2880 monitor.


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: ArchLinux, kernel 5.8.14
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1


ADDITIONAL INFORMATION

This problem exists on all major GPUs (tried AMD (Radeon Pro W5700), Nvidia (Quadro P5000)  Intel (UHD Graphics 620 in i7-8665U)).
X11 is affected in all 3 cases. Wayland is affected on Intel and AMD (and doesn't work on NVidia).

For the record, a possible hax11 workaround for X11 is described at the bottom of my comment here: https://gitlab.freedesktop.org/drm/intel/-/issues/27#note_463683

Unfortunately, I haven't been able to find a workaround for kwin_wayland.

I tried KWin scripting, but that didn't work for multiple reasons:

1. workspace.clientList() contains a volatile list of 1-2 windows that seem to be the Plasma desktop instances only, guessing from their .geometry.{x,y,width,height}; no other windows are listed.

2. The geometry property appears to be clobbered:
   * It contains resolutions divided by the scaling factor (2), i.e., 1280x1440 instead of 2560x2880.
   * On a dual 5k layout (10240x2880 altogether, 5120x1440 when divided by 2, the Wayland style), the 'x' property never exceeds 1280 (which it should exceed, because the Plasma desktop appears on all 4 monitors (2 physical monitors times 2 tiles)). (But there are at most 2 items in clientList() at all times.)

3. This "reference" (well ... a list of identifiers), is very hard to follow: https://techbase.kde.org/Development/Tutorials/KWin/Scripting/API_4.9 So there may be a way to tell KWin how to maximize windows correctly, but I just couldn't find it. A bit of advice would help a lot in this case.
Comment 1 Vlad Zahorodnii 2020-10-12 07:51:09 UTC
Yes, kwin doesn't support tiled monitors yet.

Regarding the issues you mentioned.

(1) it should be fixed in 5.20
(2) windows have their geometry in device independent pixels
(3) if you maximize a window, it will be constrained to only one monitor. In order to make a window cover several monitors, you need to set the geometry
Comment 2 Andrej Podzimek 2021-04-29 09:33:39 UTC
Even on 5.21 I still have no clue how to make this work. The problem with setting the geometry is that windows don't seem to get maximized "for real" (i.e. they keep their margins / decorations etc.) and full-screen video is not treated nicely either.
Comment 3 Andrej Podzimek 2021-06-14 23:19:22 UTC
For reference: https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-65457

The recent Qt changes linked from the bug might be (very distantly) relevant for this issue. (But this is likely not something that could be magically solved by Qt alone.)
Comment 4 Zamundaaa 2021-09-13 15:03:04 UTC
It seems like the BUG keyword didn't work for some reason. Nothing in Qt or anything like that is involved; here's the MR: https://invent.kde.org/plasma/kwin/-/merge_requests/1174

I'll rebase it later today so that it can be tested; it may be too late for 5.23 though
Comment 5 David Redondo 2022-04-19 13:58:31 UTC
*** Bug 435631 has been marked as a duplicate of this bug. ***
Comment 6 SimplyCorbett 2024-08-22 19:15:43 UTC
Is this going to get fixed? Currently on Gentoo with KDE 6.1.4 there are still issues supporting monitors such as the LG 5k. It defaults to a 4k resolution (with another 2k beside it that isn't visible on the monitor). If I set them both to the same default 2k resolution (or w/e the default is) the display works, but KDE panels are only on the left side. In addition, when there is a window between the two monitors, one side is higher than the other, despite the displays being lined up in the display area.

For comparison gnome handles this perfectly, the monitor is shown as one monitor and everything just works.

I.... really would prefer to not use gnome.

Thanks!
Comment 7 Zamundaaa 2024-08-22 21:15:11 UTC
Yes, this is still planned. Fixing it just requires a lot of changes in KWin.
Comment 8 SimplyCorbett 2024-10-03 18:02:39 UTC
Any updates?

This kind of works on KDE wayland but two issues:

A) Games don't have correct resolutions listed.

B) The middle tears when moving windows/watching videos/playing games.
Comment 9 SimplyCorbett 2024-10-03 18:03:09 UTC
Created attachment 174377 [details]
Current status of 5k monitors
Comment 10 SimplyCorbett 2024-10-22 21:51:06 UTC
Hi!

For anyone currently using the LG 5K monitor specifically. With fractional scaling at 125%-150% you can disable one of the input signals and use full 4k on the other.

Yeah, it's not 5k. But it still looks good.

Fingers crossed this will be added to KDE at some point soon..
Comment 11 Tyler 2025-01-08 01:41:58 UTC
I'm going to make an assumption that the reason this hasn't been fixed is the developers simply do not have the hardware.

Is there anything needed from us to debug this issue?

Thank you!
Comment 12 Dmitry 2025-03-04 06:59:10 UTC
I have same issue: https://discuss.kde.org/t/two-displays-one-screen/30989
Comment 13 Méven 2025-03-04 10:18:06 UTC
Created attachment 179103 [details]
drm_info of HP all-in-one concerned

From https://discuss.kde.org/t/two-displays-one-screen/30989/4?u=meven