From c8c5560916d53a150648768cce39f5e62a46bfa6 Mon Sep 17 00:00:00 2001 From: Dallas Strouse Date: Wed, 18 Oct 2023 17:34:15 -0400 Subject: [PATCH] backends/native: Main thread rt-scheduler: experimental feature no more To paraphrase jadahl: we have a dedicated KMS thread now, which also has realtime scheduling enabled unconditionally. realtime scheduling on the main thread isn't too great of an idea, considering GC can take a hot minute. And to quote rmader: we most likely won't be able to make the main thread rt as long as we use GJS and thus have GC. So let's get rid of it! It's just been breaking things anyways. This just ignores the setting; we'll fully remove it when GNOME 46 comes around. Part-of: --- data/org.gnome.mutter.gschema.xml.in | 6 +--- src/backends/meta-settings-private.h | 3 +- src/backends/meta-settings.c | 2 -- src/backends/native/meta-backend-native.c | 36 ----------------------- 4 files changed, 2 insertions(+), 45 deletions(-) diff --git a/data/org.gnome.mutter.gschema.xml.in b/data/org.gnome.mutter.gschema.xml.in index 5d56ae2d3..fa8cf95dd 100644 --- a/data/org.gnome.mutter.gschema.xml.in +++ b/data/org.gnome.mutter.gschema.xml.in @@ -3,8 +3,7 @@ - - + post_init (backend); - if (meta_settings_is_experimental_feature_enabled (settings, - META_EXPERIMENTAL_FEATURE_RT_SCHEDULER)) - { - g_autoptr (MetaDBusRealtimeKit1) rtkit_proxy = NULL; - g_autoptr (GError) error = NULL; - - rtkit_proxy = - meta_dbus_realtime_kit1_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, - G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | - G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS | - G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, - "org.freedesktop.RealtimeKit1", - "/org/freedesktop/RealtimeKit1", - NULL, - &error); - - if (rtkit_proxy) - { - uint32_t priority; - - priority = sched_get_priority_min (SCHED_RR); - meta_dbus_realtime_kit1_call_make_thread_realtime_sync (rtkit_proxy, - gettid (), - priority, - NULL, - &error); - } - - if (error) - { - g_dbus_error_strip_remote_error (error); - g_message ("Failed to set RT scheduler: %s", error->message); - } - } - #ifdef HAVE_REMOTE_DESKTOP maybe_disable_screen_cast_dma_bufs (backend_native); #endif