diff --git a/src/backends/native/meta-monitor-manager-kms.c b/src/backends/native/meta-monitor-manager-kms.c index cc3c2dc4d..5f953f1cc 100644 --- a/src/backends/native/meta-monitor-manager-kms.c +++ b/src/backends/native/meta-monitor-manager-kms.c @@ -281,6 +281,14 @@ meta_monitor_manager_kms_apply_monitors_config (MetaMonitorManager *manager if (!config) { + if (!manager->in_init) + { + MetaBackend *backend = meta_get_backend (); + MetaRenderer *renderer = meta_backend_get_renderer (backend); + + meta_renderer_native_reset_modes (META_RENDERER_NATIVE (renderer)); + } + manager->screen_width = META_MONITOR_MANAGER_MIN_SCREEN_WIDTH; manager->screen_height = META_MONITOR_MANAGER_MIN_SCREEN_HEIGHT; meta_monitor_manager_rebuild (manager, NULL); diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c index 91f213ad8..2de461bc5 100644 --- a/src/backends/native/meta-renderer-native.c +++ b/src/backends/native/meta-renderer-native.c @@ -3744,6 +3744,21 @@ on_power_save_mode_changed (MetaMonitorManager *monitor_manager, meta_kms_discard_pending_page_flips (kms); } +void +meta_renderer_native_reset_modes (MetaRendererNative *renderer_native) +{ + MetaRenderer *renderer = META_RENDERER (renderer_native); + MetaBackend *backend = meta_renderer_get_backend (renderer); + MetaBackendNative *backend_native = META_BACKEND_NATIVE (backend); + MetaKms *kms = meta_backend_native_get_kms (backend_native); + MetaKmsUpdate *kms_update; + + kms_update = unset_disabled_crtcs (backend, kms); + + if (kms_update) + post_pending_update (kms); +} + static MetaGpuKms * choose_primary_gpu_unchecked (MetaBackend *backend, MetaRendererNative *renderer_native) diff --git a/src/backends/native/meta-renderer-native.h b/src/backends/native/meta-renderer-native.h index c0357a7d8..466d8d3a6 100644 --- a/src/backends/native/meta-renderer-native.h +++ b/src/backends/native/meta-renderer-native.h @@ -55,6 +55,8 @@ MetaGpuKms * meta_renderer_native_get_primary_gpu (MetaRendererNative *renderer_ void meta_renderer_native_finish_frame (MetaRendererNative *renderer_native); +void meta_renderer_native_reset_modes (MetaRendererNative *renderer_native); + gboolean meta_renderer_native_use_modifiers (MetaRendererNative *renderer_native); gboolean meta_onscreen_native_is_buffer_scanout_compatible (CoglOnscreen *onscreen,