Bug 451591 - [kwin/display configuration] Multiple monitors with same name cause unintentional behavior
Summary: [kwin/display configuration] Multiple monitors with same name cause unintenti...
Status: RESOLVED FIXED
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.24.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
: 451462 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-03-16 20:44 UTC by Parker Reed
Modified: 2022-11-09 01:49 UTC (History)
5 users (show)

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


Attachments
Screenshot of fixed result (88.22 KB, image/png)
2022-03-16 20:44 UTC, Parker Reed
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Parker Reed 2022-03-16 20:44:53 UTC
Created attachment 147533 [details]
Screenshot of fixed result

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
When using more than one display with the same EDID name and multiple different rotations, display configuration will apply your changes but instantly think a change was made so there are TWO apply steps. 

Due to a hardware issue, sometimes my displays reconnect and the portrait rotation from the right monitor is applied to the left making the left upside down. I have to go in each time and reapply the rotation, apply twice, and then close out.

Confirmed on two different AMD GPU systems with the same monitor layout (One HDMI and two Displayport)

My fix was to create a specific EDID for each of the portrait monitors with their own name. Image attached showing the result of the fix.

STEPS TO REPRODUCE
1.  Have three monitors
2.  Arrange in one landscape, one portrait, and one reverse portrait
3.  Rotation applied incorrectly to one of the portrait montiors

OBSERVED RESULT

On display reconnect/resume, the wrong rotation is applied to one of the portrait monitors due to the naming of the display being the same between all.

EXPECTED RESULT

Displays to be treated separately (possibly by serial/unique identifier based on connection name)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Arch Linux 
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.92.0
Qt Version:  5.15.3+kde+r134-1


ADDITIONAL INFORMATION
Comment 1 Parker Reed 2022-03-16 21:29:34 UTC
Forgot to mention session type X11. 

I think the connector based layout is working but there's possibly a bug with two of the same name in portrait rotation.
Comment 2 Parker Reed 2022-03-19 21:23:03 UTC
Thanks to a wonderful contributor over on Reddit, finally realized what exposed this issue. 

My custom EDID setup was already in place when this started. The DisplayPort dock that I have will not drive to monitors at the full refresh rate. So I already had a custom EDID with a single mode single refresh rate set for both of those. Guess which two those were, both portrait. 

I used a basic EDID generator for the mode and refresh rate which doesn't set a serial number. On top of that I used the same file for both of them in the kernel command line, so to the system they were essentially the same monitor with an nulled out serial. 

My "solution" of creating to EDID with different names worked because Plasma then have something to differentiate them by even with a blank serial. 

Wayland with the same EDID works as it already names them as "unknown <connector type>" programmatically. 

For the X11 issue at hand, I get that it was my EDID with the same nulled serial causing the issue. I know those get used a lot so probably not the first to run into it. Will be interesting to see if there's anything that can be done there. 

Thanks.
Comment 3 Nate Graham 2022-03-26 15:31:12 UTC
Fascinating.
Comment 4 Nate Graham 2022-03-26 15:31:20 UTC
*** Bug 451462 has been marked as a duplicate of this bug. ***
Comment 5 f.kargl 2022-05-09 18:37:52 UTC
I'm experiencing the same issue. I have two identical external displays connected to my laptop. One of them is mounted horizontally (connected directly via hdmi), the other is rotated by 90° (connected via mini displayport -> hdmi adapter). After rebooting or disconnecting the displays, the rotation of the vertically mounted display is reset to horizontal. The configured display position stays the same.
Comment 6 Nate Graham 2022-11-08 23:02:15 UTC
This may have been fixed by a change to the duplicate detection algorithm in Plasma 5.26. Would you mind testing that and reporting back on whether it fixes the issue or not?

You may want to delete your kscreen configs in ~/.local/share/kscreen first to test it fresh.
Comment 7 Parker Reed 2022-11-08 23:23:10 UTC
I have been on 5.26 with the same setup without any modified EDID and it appears to be working as expected. I believe I changed the bottom option in display settings to remember it per monitor setup if that helps. I was on 5.23 shortly before this (Steam Deck) and I was experiencing the same rotation issue on the left hand monitor. After Steam Deck Main branch updated to 5.26, smooth sailing.
Comment 8 Nate Graham 2022-11-09 01:49:56 UTC
Great news! Thanks for following up.