Skip to content

backends/drm: don't remove connectors the kernel doesn't consider removed

Xaver Hugl requested to merge work/zamundaaa/lost-connector into master

Removing connectors that are still powered leads to a mismatch in atomic commits: the crtc is still powered, but the connector also still there. If KWin afterwards tries to disable those crtcs, the atomic commits fail because the connector needs to be disabled at the same time and it's not included in the atomic commit.

To fix this, whenever we fail to fetch information or get wrong data from the kernel (like 0 modes), use the cached information instead and keep the connector.

This fixes a very annoying and weird problem where amdgpu temporarily detects my monitor as having 0 modes (and still exposes that to userspace for some reason?) whenever powerdevil turns my monitor off and I turn it on later, causing KWin to completely lock up. It should also prevent all similar issues from happening as we only consider the connector removed once the kernel actually tells us it's gone.

BUG: 456298

Edited by Xaver Hugl

Merge request reports