diff --git a/src/backends/drm/drm_gpu.cpp b/src/backends/drm/drm_gpu.cpp index 07b30dee10..d3a54a2408 100644 --- a/src/backends/drm/drm_gpu.cpp +++ b/src/backends/drm/drm_gpu.cpp @@ -250,6 +250,7 @@ bool DrmGpu::updateOutputs() } // check for added and removed connectors + QVector addedOutputs; QVector removedConnectors = m_connectors; for (int i = 0; i < resources->count_connectors; ++i) { const uint32_t currentConnector = resources->connectors[i]; @@ -284,6 +285,7 @@ bool DrmGpu::updateOutputs() auto output = new DrmOutput(conn->pipeline()); m_drmOutputs << output; m_outputs << output; + addedOutputs << output; Q_EMIT outputAdded(output); } } @@ -332,6 +334,11 @@ bool DrmGpu::updateOutputs() for (const auto &pipeline : qAsConst(m_pipelines)) { pipeline->revertPendingChanges(); } + for (const auto &output : qAsConst(addedOutputs)) { + output->setEnabled(false); + output->pipeline()->pending.enabled = false; + output->pipeline()->applyPendingChanges(); + } } m_leaseDevice->setDrmMaster(true); return true;