Skip to content

Draft: Workaround for a weird DisplayPort behavior on X11

Marco Martin requested to merge work/mart/weirdDPbehaviorworkaround into master

This has been observed happening at least with integrated AMD gpu on a workstation, where every screen can be disconnected.

On X11 with DisplayPort connectors, sometimes the following happens:

  • Disconnecting the only displayport connector will actually add a new QScreen called "DisplayPort-0"
  • Then the old QScreen is renamed to ":0.0" becoming the usual fake screen
  • But the assumption that when there is nothing connected there is only a fake QScreen gets broken
  • When the connector gets connected again, ":0.0" gets removed, but this assertion fails because there was another screen in m_size
  • Afterwards that other "DisplayPort-0" screen gets recycled and becomes the unique QScreen
  • ScreenPool works anyways, because when ":0.0" gets removed, its containments get reassigned to "DisplayPort-0"
  • Unfortunately an extra unneded desktop containment may have been created in the meantime This doesn't happen on wayland, where that extra screen does not get created

See https://crash-reports.kde.org/organizations/kde/issues/3211/?project=9&query=release.version%3A5.81.80&referrer=issue-stream&statsPeriod=14d&stream_index=3

Merge request reports