Bug 510077 - Monitor output order inconsistent when using Thunderbolt dock
Summary: Monitor output order inconsistent when using Thunderbolt dock
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (other bugs)
Version First Reported In: 6.4.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-30 00:25 UTC by J. B. Crawford
Modified: 2025-10-01 14:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Display configuration before redocking (225.36 KB, image/png)
2025-09-30 16:32 UTC, J. B. Crawford
Details
Display configuration after redocking (173.67 KB, image/png)
2025-09-30 16:33 UTC, J. B. Crawford
Details

Note You need to log in before you can comment on or make changes to this bug.
Description J. B. Crawford 2025-09-30 00:25:50 UTC
SUMMARY

When a Thunderbolt dock with multiple monitors is connected, each time the system wakes up and connects to the dock, the identity of the monitors may change. This leads to monitor layout changing (e.g. the monitors swapping places), custom tiling layouts swapping monitors or disappearing, and related issues.

STEPS TO REPRODUCE
1. Connect at least two monitors via a Thunderbolt dock (my suspicion is that USB-C dock will behave the same but I don't have a ready way to test)
2. Configure a monitor layout
3. Put the system to sleep
4. Wake the system up

OBSERVED RESULT

There's a significant change that the two monitors will swap. In fact, it seems to be more likely than 50%, as oddly enough the two monitors seem to randomly rotate between more than two "identities." See below.

EXPECTED RESULT

I would expect the monitors to successfully be identified as the same monitors that were connected when the system was previously awake.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 42 KDE Plasma Desktop Edition
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2

ADDITIONAL INFORMATION

This occurs on an Intel Core 5 Ultra using embedded graphics and the i915 driver. The same problem occurs on previous versions of KDE as well (at least on 6.3.1).

Below is partial output from "kscreen-doctor -o" run three times, with the system sleeping and waking between each. I have removed the first output which is the laptop embedded screen, and a lot of lines for brevity.

Output: 2 DP-2 a4190ae4-f929-47d8-ba94-6dfcff2c5caf
        Geometry: 3200,0 3200x1800
Output: 3 DP-3 254ea6ce-56aa-4634-8cd3-a7d4af556d68
        Geometry: 0,0 3200x1800
(sleep/wake cycle)
Output: 2 DP-3 254ea6ce-56aa-4634-8cd3-a7d4af556d68
        Geometry: 3200,0 3200x1800
Output: 3 DP-2 6ce750ab-ba0d-4cf3-ac95-d8a93999bb56
        Geometry: 0,0 3200x1800
(sleep/wake cycle)
Output: 2 DP-3 254ea6ce-56aa-4634-8cd3-a7d4af556d68
        Geometry: 0,0 3200x1800
Output: 3 DP-2 6ce750ab-ba0d-4cf3-ac95-d8a93999bb56
        Geometry: 3200,0 3200x1800

Note that sometimes we get DP-2 and then DP-3, but sometimes we get DP-3 and then DP-2. Further, despite there being two monitors, we see at least three different GUIDs. There seem to be three different saved custom tiling layouts to match. I think two different things are happening: first, the order of the monitors in terms of output numbers is random rather than deterministic. Second, something is sometimes happening that causes KDE to think that one of the monitors is a totally different monitor than it was before.

I would be happy to provide more information, I'm not sure what else would be useful for diagnostics. I did find the following interesting in dmesg, from the same sleep/wake cycles as above.

[  164.524808] rc rc0: DP-3 as /devices/pci0000:00/0000:00:02.0/rc/rc0
[  164.524839] input: DP-3 as /devices/pci0000:00/0000:00:02.0/rc/rc0/input22
[  164.707432] rc rc1: DP-2 as /devices/pci0000:00/0000:00:02.0/rc/rc1
[  164.707459] input: DP-2 as /devices/pci0000:00/0000:00:02.0/rc/rc1/input23
[  170.268142] rc rc1: DP-2 as /devices/pci0000:00/0000:00:02.0/rc/rc1
[  170.268172] input: DP-2 as /devices/pci0000:00/0000:00:02.0/rc/rc1/input34
[ 1005.010674] rc rc1: DP-2 as /devices/pci0000:00/0000:00:02.0/rc/rc1
[ 1005.010704] input: DP-2 as /devices/pci0000:00/0000:00:02.0/rc/rc1/input35
[ 1138.544100] rc rc1: DP-2 as /devices/pci0000:00/0000:00:02.0/rc/rc1
[ 1138.544129] input: DP-2 as /devices/pci0000:00/0000:00:02.0/rc/rc1/input36
[ 1310.053770] rc rc1: DP-2 as /devices/pci0000:00/0000:00:02.0/rc/rc1
[ 1310.053797] input: DP-2 as /devices/pci0000:00/0000:00:02.0/rc/rc1/input37
Comment 1 TraceyC 2025-09-30 15:25:47 UTC
I've not noticed this with a very similar setup - Two monitors connected to a Thunderbolt dock that my laptop is plugged into. (On git-master or Plasma 6.4.5).

Please run the following command when the bug happens, and paste the output into this report (or attach it).

kscreen-doctor -o

Then, please run it again after setting the monitors to their correct layout and paste that. Thanks!
Comment 2 J. B. Crawford 2025-09-30 16:31:43 UTC
Did some further poking around today. First thing: I noticed that in Display Configuration, both monitors are displayed with the same serial number. That seems suspicious and like it might be contributing to the problem. I will attach a couple of screenshots of Display Configuration before/after sleep because I'm not totally sure if the serial number that shows up is "stable" either.

I wanted to check and make sure that something bizarre wasn't happening with my dock or video adapter, so I checked the EDID by hand (e.g. cat /sys/class/drm/card1-DP-3/edid  | edid-decode). That way, DP-2 and DP-3 indeed have to different serial numbers... but the one displayed by Display Configuration for both monitors is the serial number on DP-2 (they are identical monitors so EDID data is otherwise the same).

And here's what's interesting: I disconnected and reconnected the dock, and now see two different serial numbers in Display Configuration. The problem hasn't recurred; I'm getting consistent monitor layout and custom tiling setups each time.

So I think the root cause of this might be mixing up EDID info on the two devices so that they both have the same serial number as far as KDE is concerned, and can't be told apart. Later when I have some time I am going to do some repeated dock/undock cycles to see if the serial number confusion is consistent.
Comment 3 J. B. Crawford 2025-09-30 16:32:40 UTC
Created attachment 185401 [details]
Display configuration before redocking

Note that KDE thinks the two monitors have the same serial number.
Comment 4 J. B. Crawford 2025-09-30 16:33:27 UTC
Created attachment 185402 [details]
Display configuration after redocking

The two displays now have their correct serial numbers, so I think that the serial number confusion is something that only happens a portion of the times that the dock is connected.
Comment 5 J. B. Crawford 2025-09-30 17:25:34 UTC
After a sleep cycle, the monitors didn't want to wake up, so I unplugged and replugged the dock. This happens infrequently and I'm not sure of the cause besides that the whole Thunderbolt dock thing feels just a little bit unstable in general.

Now they're the wrong way around again, both in terms of arrangement and custom tiling layouts. kscreen-doctor output:

Output: 1 eDP-1 6c3da0b2-5005-49bc-8417-cfca4f772804
        disabled
        connected
        priority 0
        Panel
        replication source:0
        Modes:  1:1920x1200@60*!  2:1920x1200@48  3:1600x1200@60  4:1280x1024@60  5:1024x768@60  6:1280x800@60  7:1920x1080@60  8:1600x900@60  9:1368x768@60  10:1280x720@60 
        Geometry: 0,0 1920x1200
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 100% and dimming to 100%
        Color resolution: automatic (10), range: [6; 12] bits per color
        Allow EDR: always
Output: 2 DP-2 e5d4223a-61a4-43c5-a56d-40534a9e03ad
        enabled
        connected
        priority 1
        DisplayPort
        replication source:0
        Modes:  11:3840x2160@60*!  12:3840x2160@60  13:3840x2160@60  14:3840x2160@50  15:3840x2160@30  16:3840x2160@30  17:3840x2160@30  18:2560x1440@60  19:1920x1080@60  20:1920x1080@60  21:1920x1080@60  22:1920x1080@50  23:1920x1080@50  24:1680x1050@60  25:1600x900@60  26:1280x1024@75  27:1280x1024@60  28:1440x900@60  29:1280x800@60  30:1152x864@75  31:1280x720@60  32:1280x720@60  33:1280x720@60  34:1280x720@50  35:1024x768@75  36:1024x768@70  37:1024x768@60  38:832x624@75  39:800x600@75  40:800x600@72  41:800x600@60  42:800x600@56  43:720x576@50  44:720x480@60  45:720x480@60  46:640x480@75  47:640x480@73  48:640x480@67  49:640x480@60  50:640x480@60  51:720x400@70 
        Geometry: 1920,0 3200x1800
        Scale: 1.2
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: disabled
        Wide Color Gamut: disabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 10% and dimming to 100%
        DDC/CI: allowed
        Color resolution: automatic (10), range: [6; 12] bits per color
        Allow EDR: unsupported
Output: 3 DP-3 254ea6ce-56aa-4634-8cd3-a7d4af556d68
        enabled
        connected
        priority 2
        DisplayPort
        replication source:0
        Modes:  52:3840x2160@60*!  53:3840x2160@60  54:3840x2160@60  55:3840x2160@50  56:3840x2160@30  57:3840x2160@30  58:3840x2160@30  59:2560x1440@60  60:1920x1080@60  61:1920x1080@60  62:1920x1080@60  63:1920x1080@50  64:1920x1080@50  65:1680x1050@60  66:1600x900@60  67:1280x1024@75  68:1280x1024@60  69:1440x900@60  70:1280x800@60  71:1152x864@75  72:1280x720@60  73:1280x720@60  74:1280x720@60  75:1280x720@50  76:1024x768@75  77:1024x768@70  78:1024x768@60  79:832x624@75  80:800x600@75  81:800x600@72  82:800x600@60  83:800x600@56  84:720x576@50  85:720x480@60  86:720x480@60  87:640x480@75  88:640x480@73  89:640x480@67  90:640x480@60  91:640x480@60  92:720x400@70 
        Geometry: 5120,0 3200x1800
        Scale: 1.2
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: disabled
        Wide Color Gamut: disabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 100% and dimming to 100%
        DDC/CI: allowed
        Color resolution: automatic (10), range: [6; 12] bits per color
        Allow EDR: unsupported

Now I fix the layout with the Display Configuration dialog, noting that it *does* currently show two different serial numbers for the two displays. This fixes the layout, but doesn't fix the custom tiling layout, which is still the "wrong way around." However the custom tiling layouts are mapped to displays clearly has the same inconsistency.

kscreen-doctor output after fixing layout:

Output: 1 eDP-1 6c3da0b2-5005-49bc-8417-cfca4f772804
        disabled
        connected
        priority 0
        Panel
        replication source:0
        Modes:  1:1920x1200@60*!  2:1920x1200@48  3:1600x1200@60  4:1280x1024@60  5:1024x768@60  6:1280x800@60  7:1920x1080@60  8:1600x900@60  9:1368x768@60  10:1280x720@60 
        Geometry: 0,0 1920x1200
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 100% and dimming to 100%
        Color resolution: automatic (10), range: [6; 12] bits per color
        Allow EDR: always
Output: 2 DP-2 e5d4223a-61a4-43c5-a56d-40534a9e03ad
        enabled
        connected
        priority 1
        DisplayPort
        replication source:0
        Modes:  11:3840x2160@60*!  12:3840x2160@60  13:3840x2160@60  14:3840x2160@50  15:3840x2160@30  16:3840x2160@30  17:3840x2160@30  18:2560x1440@60  19:1920x1080@60  20:1920x1080@60  21:1920x1080@60  22:1920x1080@50  23:1920x1080@50  24:1680x1050@60  25:1600x900@60  26:1280x1024@75  27:1280x1024@60  28:1440x900@60  29:1280x800@60  30:1152x864@75  31:1280x720@60  32:1280x720@60  33:1280x720@60  34:1280x720@50  35:1024x768@75  36:1024x768@70  37:1024x768@60  38:832x624@75  39:800x600@75  40:800x600@72  41:800x600@60  42:800x600@56  43:720x576@50  44:720x480@60  45:720x480@60  46:640x480@75  47:640x480@73  48:640x480@67  49:640x480@60  50:640x480@60  51:720x400@70 
        Geometry: 3200,0 3200x1800
        Scale: 1.2
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: disabled
        Wide Color Gamut: disabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 10% and dimming to 100%
        DDC/CI: allowed
        Color resolution: automatic (10), range: [6; 12] bits per color
        Allow EDR: unsupported
Output: 3 DP-3 254ea6ce-56aa-4634-8cd3-a7d4af556d68
        enabled
        connected
        priority 2
        DisplayPort
        replication source:0
        Modes:  52:3840x2160@60*!  53:3840x2160@60  54:3840x2160@60  55:3840x2160@50  56:3840x2160@30  57:3840x2160@30  58:3840x2160@30  59:2560x1440@60  60:1920x1080@60  61:1920x1080@60  62:1920x1080@60  63:1920x1080@50  64:1920x1080@50  65:1680x1050@60  66:1600x900@60  67:1280x1024@75  68:1280x1024@60  69:1440x900@60  70:1280x800@60  71:1152x864@75  72:1280x720@60  73:1280x720@60  74:1280x720@60  75:1280x720@50  76:1024x768@75  77:1024x768@70  78:1024x768@60  79:832x624@75  80:800x600@75  81:800x600@72  82:800x600@60  83:800x600@56  84:720x576@50  85:720x480@60  86:720x480@60  87:640x480@75  88:640x480@73  89:640x480@67  90:640x480@60  91:640x480@60  92:720x400@70 
        Geometry: 0,0 3200x1800
        Scale: 1.2
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: disabled
        Wide Color Gamut: disabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 100% and dimming to 100%
        DDC/CI: allowed
        Color resolution: automatic (10), range: [6; 12] bits per color
        Allow EDR: unsupported

Then I put the system to sleep and wake it up again. On wake, everything is now correct - the monitors have not changed layout since I fixed them, but the custom tiling layout has once again swapped left and right monitors.

kscreen-doctor output:

Output: 1 eDP-1 6c3da0b2-5005-49bc-8417-cfca4f772804
        disabled
        connected
        priority 0
        Panel
        replication source:0
        Modes:  1:1920x1200@60*!  2:1920x1200@48  3:1600x1200@60  4:1280x1024@60  5:1024x768@60  6:1280x800@60  7:1920x1080@60  8:1600x900@60  9:1368x768@60  10:1280x720@60 
        Geometry: 4518,71 1920x1200
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 100% and dimming to 100%
        Color resolution: automatic (10), range: [6; 12] bits per color
        Allow EDR: always
Output: 2 DP-3 254ea6ce-56aa-4634-8cd3-a7d4af556d68
        enabled
        connected
        priority 2
        DisplayPort
        replication source:0
        Modes:  11:640x480@60  12:3840x2160@60*!  13:3840x2160@60  14:3840x2160@60  15:3840x2160@50  16:3840x2160@30  17:3840x2160@30  18:3840x2160@30  19:2560x1440@60  20:1920x1080@60  21:1920x1080@60  22:1920x1080@60  23:1920x1080@50  24:1920x1080@50  25:1680x1050@60  26:1600x900@60  27:1280x1024@75  28:1280x1024@60  29:1440x900@60  30:1280x800@60  31:1152x864@75  32:1280x720@60  33:1280x720@60  34:1280x720@60  35:1280x720@50  36:1024x768@75  37:1024x768@70  38:1024x768@60  39:832x624@75  40:800x600@75  41:800x600@72  42:800x600@60  43:800x600@56  44:720x576@50  45:720x480@60  46:720x480@60  47:640x480@75  48:640x480@73  49:640x480@67  50:640x480@60  51:640x480@60  52:720x400@70 
        Geometry: 3200,0 3200x1800
        Scale: 1.2
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: disabled
        Wide Color Gamut: disabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 100% and dimming to 100%
        DDC/CI: allowed
        Color resolution: automatic (10), range: [6; 12] bits per color
        Allow EDR: unsupported
Output: 3 DP-2 6ce750ab-ba0d-4cf3-ac95-d8a93999bb56
        enabled
        connected
        priority 1
        DisplayPort
        replication source:0
        Modes:  53:3840x2160@60*!  54:3840x2160@60  55:3840x2160@60  56:3840x2160@50  57:3840x2160@30  58:3840x2160@30  59:3840x2160@30  60:2560x1440@60  61:1920x1080@60  62:1920x1080@60  63:1920x1080@60  64:1920x1080@50  65:1920x1080@50  66:1680x1050@60  67:1600x900@60  68:1280x1024@75  69:1280x1024@60  70:1440x900@60  71:1280x800@60  72:1152x864@75  73:1280x720@60  74:1280x720@60  75:1280x720@60  76:1280x720@50  77:1024x768@75  78:1024x768@70  79:1024x768@60  80:832x624@75  81:800x600@75  82:800x600@72  83:800x600@60  84:800x600@56  85:720x576@50  86:720x480@60  87:720x480@60  88:640x480@75  89:640x480@73  90:640x480@67  91:640x480@60  92:640x480@60  93:720x400@70 
        Geometry: 0,0 3200x1800
        Scale: 1.2
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: disabled
        Wide Color Gamut: disabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: unsupported
        DDC/CI: allowed
        Color resolution: automatic (10), range: [6; 12] bits per color
        Allow EDR: unsupported
Comment 6 TraceyC 2025-10-01 14:40:01 UTC
Thanks for the additional troubleshooting. I'll let the kwin developers take it from here.