Bug 470718 - Display configuration layout is scrambled randomly when using DP Daisy chain with same monitors
Summary: Display configuration layout is scrambled randomly when using DP Daisy chain ...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 5.27.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-06 20:13 UTC by sunny.tree4731
Modified: 2023-10-26 10:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0
Sentry Crash Report:


Attachments
Journalctl output after reconnecting displays (7.35 KB, text/plain)
2023-06-06 20:13 UTC, sunny.tree4731
Details
Correct layout (18.05 KB, image/png)
2023-06-06 20:14 UTC, sunny.tree4731
Details
Wrong layout after reconecting (18.24 KB, image/png)
2023-06-06 20:14 UTC, sunny.tree4731
Details
drm_info output before (68.32 KB, text/plain)
2023-06-07 12:09 UTC, sunny.tree4731
Details
drm_info after (70.56 KB, text/plain)
2023-06-07 12:10 UTC, sunny.tree4731
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sunny.tree4731 2023-06-06 20:13:09 UTC
Created attachment 159501 [details]
Journalctl output after reconnecting displays

SUMMARY
When using multiple same monitor connect via display port daisy chaining, layout is randomly scrambled and DP ports are changed

STEPS TO REPRODUCE
1. Connect two identical monitors via DP daisy chaining
2. Set display configuration layout (two monitors side by side and one different bellow)
3. Go to sleep, hibernation, turn off display, disconnect and connect displays or reboot

OBSERVED RESULT
Layout is scrambled - usually the two identical monitors switched and the bottom different one offset to left
After boot the monitors have DP-5 and DP-4 after scrambling its usually DP-6 and DP-7

EXPECTED RESULT
Layout stays same as before.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.3.5-zen2-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
Manufacturer: Dell Inc.
Product Name: G5 5587
ADDITIONAL INFORMATION
Journal log in attachment
Comment 1 sunny.tree4731 2023-06-06 20:14:12 UTC
Created attachment 159502 [details]
Correct layout
Comment 2 sunny.tree4731 2023-06-06 20:14:31 UTC
Created attachment 159503 [details]
Wrong layout after reconecting
Comment 3 Zamundaaa 2023-06-07 11:57:09 UTC
Please attach the output of drm_info from before and after the change
Comment 4 sunny.tree4731 2023-06-07 12:09:44 UTC
Created attachment 159516 [details]
drm_info output before
Comment 5 sunny.tree4731 2023-06-07 12:10:01 UTC
Created attachment 159517 [details]
drm_info after
Comment 6 Zamundaaa 2023-06-07 17:41:11 UTC
okay, so I assume the EDID of the two screens is identical, so KScreen uses the connector name as a fallback way of identifying the monitors. Due to MST weirdness and possibly some kernel bug, the old connectors stick around and thus the "new" detected outputs get different connector names - so KScreen considers them as different screens.

We can maybe work around this by adding the MST path identifier to the connector name. A more proper fix will have to be Plasma 6 only though
Comment 7 Nate Graham 2023-06-07 18:34:32 UTC
Sounds similar to Bug 470590.
Comment 8 Bug Janitor Service 2023-10-13 16:50:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4501
Comment 9 Zamundaaa 2023-10-25 15:10:29 UTC
Git commit 7db4df991542843c0bb22aa3abe2030a005dadda by Xaver Hugl.
Committed on 25/10/2023 at 16:58.
Pushed by zamundaaa into branch 'master'.

outputconfigurationstore: differentiate between outputs with their mst path

The DisplayPort multi stream path should be more stable in comparison to
connector names, so prefer that for differentiating between outputs with
the same EDID.

M  +24   -0    src/backends/drm/drm_connector.cpp
M  +6    -0    src/backends/drm/drm_connector.h
M  +1    -0    src/backends/drm/drm_output.cpp
M  +5    -0    src/core/output.cpp
M  +5    -0    src/core/output.h
M  +30   -4    src/outputconfigurationstore.cpp
M  +2    -0    src/outputconfigurationstore.h

https://invent.kde.org/plasma/kwin/-/commit/7db4df991542843c0bb22aa3abe2030a005dadda
Comment 10 sunny.tree4731 2023-10-26 10:58:18 UTC
Thank you