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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3296>
This commit is contained in:
parent
ecdd2aeb85
commit
c8c5560916
@ -3,8 +3,7 @@
|
|||||||
<flags id="org.gnome.mutter.MetaExperimentalFeature">
|
<flags id="org.gnome.mutter.MetaExperimentalFeature">
|
||||||
<value nick="scale-monitor-framebuffer" value="1"/>
|
<value nick="scale-monitor-framebuffer" value="1"/>
|
||||||
<value nick="kms-modifiers" value="2"/>
|
<value nick="kms-modifiers" value="2"/>
|
||||||
<value nick="rt-scheduler" value="4"/>
|
<value nick="autoclose-xwayland" value="4"/>
|
||||||
<value nick="autoclose-xwayland" value="8"/>
|
|
||||||
</flags>
|
</flags>
|
||||||
|
|
||||||
<schema id="org.gnome.mutter" path="/org/gnome/mutter/"
|
<schema id="org.gnome.mutter" path="/org/gnome/mutter/"
|
||||||
@ -126,9 +125,6 @@
|
|||||||
supported by the driver. Requires a
|
supported by the driver. Requires a
|
||||||
restart.
|
restart.
|
||||||
|
|
||||||
• “rt-scheduler” — makes mutter request a low priority
|
|
||||||
real-time scheduling. Requires a restart.
|
|
||||||
|
|
||||||
• “autoclose-xwayland” — automatically terminates Xwayland if all
|
• “autoclose-xwayland” — automatically terminates Xwayland if all
|
||||||
relevant X11 clients are gone.
|
relevant X11 clients are gone.
|
||||||
Requires a restart.
|
Requires a restart.
|
||||||
|
@ -30,8 +30,7 @@ typedef enum _MetaExperimentalFeature
|
|||||||
META_EXPERIMENTAL_FEATURE_NONE = 0,
|
META_EXPERIMENTAL_FEATURE_NONE = 0,
|
||||||
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0),
|
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0),
|
||||||
META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 1),
|
META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 1),
|
||||||
META_EXPERIMENTAL_FEATURE_RT_SCHEDULER = (1 << 2),
|
META_EXPERIMENTAL_FEATURE_AUTOCLOSE_XWAYLAND = (1 << 2),
|
||||||
META_EXPERIMENTAL_FEATURE_AUTOCLOSE_XWAYLAND = (1 << 3),
|
|
||||||
} MetaExperimentalFeature;
|
} MetaExperimentalFeature;
|
||||||
|
|
||||||
typedef enum _MetaXwaylandExtension
|
typedef enum _MetaXwaylandExtension
|
||||||
|
@ -292,8 +292,6 @@ experimental_features_handler (GVariant *features_variant,
|
|||||||
feature = META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER;
|
feature = META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER;
|
||||||
else if (g_str_equal (feature_str, "kms-modifiers"))
|
else if (g_str_equal (feature_str, "kms-modifiers"))
|
||||||
feature = META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS;
|
feature = META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS;
|
||||||
else if (g_str_equal (feature_str, "rt-scheduler"))
|
|
||||||
feature = META_EXPERIMENTAL_FEATURE_RT_SCHEDULER;
|
|
||||||
else if (g_str_equal (feature_str, "autoclose-xwayland"))
|
else if (g_str_equal (feature_str, "autoclose-xwayland"))
|
||||||
feature = META_EXPERIMENTAL_FEATURE_AUTOCLOSE_XWAYLAND;
|
feature = META_EXPERIMENTAL_FEATURE_AUTOCLOSE_XWAYLAND;
|
||||||
|
|
||||||
|
@ -216,45 +216,9 @@ static void
|
|||||||
meta_backend_native_post_init (MetaBackend *backend)
|
meta_backend_native_post_init (MetaBackend *backend)
|
||||||
{
|
{
|
||||||
MetaBackendNative *backend_native = META_BACKEND_NATIVE (backend);
|
MetaBackendNative *backend_native = META_BACKEND_NATIVE (backend);
|
||||||
MetaSettings *settings = meta_backend_get_settings (backend);
|
|
||||||
|
|
||||||
META_BACKEND_CLASS (meta_backend_native_parent_class)->post_init (backend);
|
META_BACKEND_CLASS (meta_backend_native_parent_class)->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
|
#ifdef HAVE_REMOTE_DESKTOP
|
||||||
maybe_disable_screen_cast_dma_bufs (backend_native);
|
maybe_disable_screen_cast_dma_bufs (backend_native);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user