diff --git a/src/backends/drm/drm_gpu.cpp b/src/backends/drm/drm_gpu.cpp index dac72f3d85..dbb3b7fed9 100644 --- a/src/backends/drm/drm_gpu.cpp +++ b/src/backends/drm/drm_gpu.cpp @@ -702,6 +702,12 @@ void DrmGpu::setActive(bool active) } // while the session was inactive, the output list may have changed m_platform->updateOutputs(); + for (const auto &output : std::as_const(m_drmOutputs)) { + // force a modeset with legacy, we can't reliably know if one is needed + if (!atomicModeSetting()) { + output->pipeline()->forceLegacyModeset(); + } + } } else { for (const auto &output : std::as_const(m_drmOutputs)) { output->renderLoop()->inhibit(); diff --git a/src/backends/drm/drm_pipeline.h b/src/backends/drm/drm_pipeline.h index c438d6523e..36645b88c4 100644 --- a/src/backends/drm/drm_pipeline.h +++ b/src/backends/drm/drm_pipeline.h @@ -72,6 +72,7 @@ public: Error present(); bool testScanout(); bool maybeModeset(); + void forceLegacyModeset(); bool needsModeset() const; void applyPendingChanges(); diff --git a/src/backends/drm/drm_pipeline_legacy.cpp b/src/backends/drm/drm_pipeline_legacy.cpp index c7b0776221..9925e63239 100644 --- a/src/backends/drm/drm_pipeline_legacy.cpp +++ b/src/backends/drm/drm_pipeline_legacy.cpp @@ -43,6 +43,11 @@ DrmPipeline::Error DrmPipeline::presentLegacy() return Error::None; } +void DrmPipeline::forceLegacyModeset() +{ + legacyModeset(); +} + DrmPipeline::Error DrmPipeline::legacyModeset() { uint32_t connId = m_connector->id();