https://bugs.kde.org/show_bug.cgi?id=525693

            Bug ID: 525693
           Summary: On a laptop docked via a Dell WD19 (Thunderbolt 3 /
                    Titan Ridge), connecting a SECOND external DisplayPort
                    monitor results in that output being detected by the
                    kernel (DRM connector = "connected") but never enabled
                    by KWin. The session becomes effectively
    Classification: Plasma
           Product: kwin
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: platform-drm
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

Title: KWin stores errno values as output mstPath, breaking identification of
       multiple DP outputs behind a dock (output stays disabled, config
unappliable)

SUMMARY
On a laptop docked via a Dell WD19 (Thunderbolt 3 / Titan Ridge), connecting a
SECOND external DisplayPort monitor results in that output being detected by
the
kernel (DRM connector = "connected") but never enabled by KWin. The session
becomes effectively unusable: the compositor falls back to extremely slow
rendering (~6 fps) and no display configuration can be applied afterwards.

Root cause appears to be that KWin persists a failed property-read return value
as the output's mstPath identifier.

SOFTWARE
  KWin / Plasma:   6.6.6
  Distro:          Ubuntu 26.04 (Kubuntu), Wayland session
  Kernels tested:  7.0.0-31-generic and mainline 7.1.13  (identical behaviour)
  Qt:              6.10

HARDWARE
  Laptop: Dell Latitude 5411, Intel CometLake-H GT2 (i915)
  Dock:   Dell WD19, connected through Intel JHL7540 Titan Ridge TB3 controller
  Displays: 2 external DP monitors (non-MST, direct connectors) + internal
eDP-1

EVIDENCE 1 — errno values stored as mstPath
~/.config/kwinoutputconfig.json, "outputs" section:

    "connectorName": "eDP-1",  "mstPath": null        <- correct (internal
panel)
    "connectorName": "DP-4",   "mstPath": "-1\u0000"  <- errno, with embedded
NUL
    "connectorName": "DP-6",   "mstPath": "-3\u0000"  <- errno, with embedded
NUL

The values are negative integers with a trailing NUL byte: -1, -2, -3 were
observed (-2 = ENOENT, -3 = ESRCH). These connectors are NOT MST: the kernel
exposes no "path" attribute for them (/sys/class/drm/card1-DP-*/path absent).
KWin appears to take the error return of the PATH property read and serialize
it
as the path string instead of treating it as "no MST path".

EVIDENCE 2 — the identifier is not stable across reconnects
The same physical monitor was recorded with different mstPath values on
successive dock connections:

    connect #1:  DP-5 -> "-2\u0000"
    connect #2:  DP-4 -> "-1\u0000"

Connector numbering also shifts between reconnects (DP-4 / DP-5 for the same
panel). Since output matching relies on this identifier, identity is
effectively
randomised on every dock event.

EVIDENCE 3 — resulting invalid runtime state
As soon as the second external monitor appears, every output receives a
replicationSource equal to the id of the newly appeared output, which is itself
disabled (self-referencing replica):

    eDP-1 | id=1 | enabled=True  | replicationSource=3
    DP-6  | id=2 | enabled=True  | replicationSource=3
    DP-4  | id=3 | enabled=False | replicationSource=3

EVIDENCE 4 — this permanently blocks reconfiguration
With that state, ANY attempt to change the configuration is rejected, because
the
position of a replica output is computed as INT_MIN:

    $ kscreen-doctor output.DP-4.enable
    applying config failed! Position of enabled output eDP-1 is negative
    (-2147483647, -2147482207)

STEPS TO REPRODUCE
1. Boot a Wayland Plasma session on a laptop with an internal panel.
2. Connect a Dell WD19 dock with ONE external DP monitor -> works correctly.
3. Connect a SECOND external monitor to the dock.

ACTUAL RESULT
The second output is detected (DRM connector "connected", stable, no hotplug
flapping) but stays enabled=false. All outputs get a self-referencing
replicationSource. Compositing degrades to a few frames per second and the
display configuration can no longer be changed by any means.

EXPECTED RESULT
Both external monitors are enabled with a normal extended layout.

RULED OUT DURING INVESTIGATION
- Not kernel related: identical on 7.0.0-31 and on mainline 7.1.13.
- Not the dock/link: the DRM connector stays "connected" and stable for
minutes;
  the kernel reports no link-training or MST errors at all.
- Not bandwidth: reproduced with both monitors lowered to 1920x1080@60.
- Not port specific: reproduced with monitors on HDMI+DP and on DP+DP.
- Not stale configuration: reproduced after deleting kwinoutputconfig.json
  entirely and logging out/in, i.e. with KWin generating the config from
scratch.
- Not output count: reproduced with the lid closed (internal panel off), so
with
  only the two dock monitors present.
- Connecting the monitors sequentially (waiting for the first to settle) does
not
  help either.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to