mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 00:50:42 -05:00
native: add some logging spew
hopefully this will help us get to the bottom of why jkoten's machine isn't fixed.
This commit is contained in:
parent
b79e74f13f
commit
31c3695314
@ -611,7 +611,15 @@ inhibit_sleep (MetaBackend *backend)
|
|||||||
int handle, fd;
|
int handle, fd;
|
||||||
|
|
||||||
if (priv->inhibit_sleep_fd >= 0)
|
if (priv->inhibit_sleep_fd >= 0)
|
||||||
|
{
|
||||||
|
g_warning ("tried to inhibit suspend when already inhibited");
|
||||||
|
|
||||||
|
if (priv->inhibit_sleep_fd == 0)
|
||||||
|
g_warning ("but, really, something went wrong, the fd is 0");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_warning ("inhibiting suspend temporarily");
|
||||||
|
|
||||||
if (!login1_manager_call_inhibit_sync (priv->logind_proxy,
|
if (!login1_manager_call_inhibit_sync (priv->logind_proxy,
|
||||||
"sleep",
|
"sleep",
|
||||||
@ -645,6 +653,16 @@ uninhibit_sleep (MetaBackend *backend)
|
|||||||
{
|
{
|
||||||
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
|
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
|
||||||
|
|
||||||
|
if (priv->inhibit_sleep_fd < 0)
|
||||||
|
{
|
||||||
|
g_warning ("tried to uninhibit suspend when not inhibited");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (priv->inhibit_sleep_fd == 0)
|
||||||
|
g_warning ("uninhibiting suspend but suspend fd is 0!");
|
||||||
|
else
|
||||||
|
g_warning ("uninhibiting suspend");
|
||||||
|
|
||||||
close (priv->inhibit_sleep_fd);
|
close (priv->inhibit_sleep_fd);
|
||||||
priv->inhibit_sleep_fd = -1;
|
priv->inhibit_sleep_fd = -1;
|
||||||
}
|
}
|
||||||
@ -654,14 +672,18 @@ prepare_for_sleep_cb (MetaBackend *backend,
|
|||||||
gboolean suspending)
|
gboolean suspending)
|
||||||
{
|
{
|
||||||
if (suspending) {
|
if (suspending) {
|
||||||
|
g_warning ("preparing to suspend");
|
||||||
g_signal_emit (backend, signals[SUSPENDING], 0);
|
g_signal_emit (backend, signals[SUSPENDING], 0);
|
||||||
|
g_warning ("suspending");
|
||||||
uninhibit_sleep (backend);
|
uninhibit_sleep (backend);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_warning ("preparing to resume");
|
||||||
inhibit_sleep (backend);
|
inhibit_sleep (backend);
|
||||||
g_signal_emit (backend, signals[RESUMING], 0);
|
g_signal_emit (backend, signals[RESUMING], 0);
|
||||||
meta_idle_monitor_reset_idletime (meta_idle_monitor_get_core ());
|
meta_idle_monitor_reset_idletime (meta_idle_monitor_get_core ());
|
||||||
|
g_warning ("resuming");
|
||||||
}
|
}
|
||||||
|
|
||||||
static Login1Manager *
|
static Login1Manager *
|
||||||
|
@ -646,7 +646,12 @@ meta_backend_native_pause (MetaBackendNative *native)
|
|||||||
meta_backend_native_get_instance_private (native);
|
meta_backend_native_get_instance_private (native);
|
||||||
|
|
||||||
if (priv->is_paused)
|
if (priv->is_paused)
|
||||||
|
{
|
||||||
|
g_warning ("tried to pause when already paused\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_warning ("pausing\n");
|
||||||
|
|
||||||
clutter_evdev_release_devices ();
|
clutter_evdev_release_devices ();
|
||||||
clutter_egl_freeze_master_clock ();
|
clutter_egl_freeze_master_clock ();
|
||||||
@ -673,14 +678,25 @@ void meta_backend_native_resume (MetaBackendNative *native)
|
|||||||
MetaIdleMonitor *idle_monitor;
|
MetaIdleMonitor *idle_monitor;
|
||||||
|
|
||||||
if (!priv->is_paused)
|
if (!priv->is_paused)
|
||||||
|
{
|
||||||
|
g_warning ("tried to resume when not paused\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
g_warning ("resuming\n");
|
||||||
|
|
||||||
if (cogl_has_feature (cogl_context, COGL_FEATURE_ID_UNSTABLE_TEXTURES))
|
if (cogl_has_feature (cogl_context, COGL_FEATURE_ID_UNSTABLE_TEXTURES))
|
||||||
{
|
{
|
||||||
|
g_warning ("purging glphy cache\n");
|
||||||
clutter_clear_glyph_cache ();
|
clutter_clear_glyph_cache ();
|
||||||
|
g_warning ("refreshing cursor\n");
|
||||||
meta_screen_update_cursor (display->screen);
|
meta_screen_update_cursor (display->screen);
|
||||||
|
g_warning ("redrawing window and background textures\n");
|
||||||
g_signal_emit_by_name (display, "gl-video-memory-purged");
|
g_signal_emit_by_name (display, "gl-video-memory-purged");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_warning ("gpu doesn't have unstable textures problem, so we're good there\n");
|
||||||
|
}
|
||||||
|
|
||||||
meta_monitor_manager_kms_resume (monitor_manager_kms);
|
meta_monitor_manager_kms_resume (monitor_manager_kms);
|
||||||
|
|
||||||
|
@ -280,14 +280,25 @@ sync_active (MetaLauncher *self)
|
|||||||
gboolean active = login1_session_get_active (LOGIN1_SESSION (self->session_proxy));
|
gboolean active = login1_session_get_active (LOGIN1_SESSION (self->session_proxy));
|
||||||
|
|
||||||
if (active == self->session_active)
|
if (active == self->session_active)
|
||||||
|
{
|
||||||
|
g_warning ("tried to sync activeness when already in sync");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_warning ("syncing activeness");
|
||||||
self->session_active = active;
|
self->session_active = active;
|
||||||
|
|
||||||
if (active)
|
if (active)
|
||||||
|
{
|
||||||
|
g_warning ("inactive -> active");
|
||||||
meta_backend_native_resume (backend_native);
|
meta_backend_native_resume (backend_native);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
g_warning ("active -> inactive");
|
||||||
meta_backend_native_pause (backend_native);
|
meta_backend_native_pause (backend_native);
|
||||||
|
}
|
||||||
|
g_warning ("activeness synced");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -296,6 +307,7 @@ on_active_changed (Login1Session *session,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
MetaLauncher *self = user_data;
|
MetaLauncher *self = user_data;
|
||||||
|
g_warning ("got active changed notification");
|
||||||
sync_active (self);
|
sync_active (self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user