[gnome-settings-daemon/gnome-3-24] power: Call backlight_enable() after session setup



commit 5c5abaf5bc05393c41c08531e5791c6b1859f419
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Aug 11 17:33:13 2017 +0200

    power: Call backlight_enable() after session setup
    
    backlight_enable() does 2 things, fiddle with the DPMS as well
    as attempt to claim the light sensor. But the light sensor
    claim attempt will always fail as the "session_is_active" variable
    has not been initialised yet. So just try a tad later for it
    to work as soon as you've logged into the session.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786164

 plugins/power/gsd-power-manager.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 98ac83d..f05b285 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2402,9 +2402,6 @@ on_rr_screen_acquired (GObject      *object,
         /* check whether a backlight is available */
         manager->priv->backlight_available = backlight_available (manager->priv->rr_screen);
 
-        /* ensure the default dpms timeouts are cleared */
-        backlight_enable (manager);
-
         /* Set up a delay inhibitor to be informed about suspend attempts */
         g_signal_connect (manager->priv->logind_proxy, "g-signal",
                           G_CALLBACK (logind_proxy_signal_cb),
@@ -2465,6 +2462,9 @@ on_rr_screen_acquired (GObject      *object,
         engine_coldplug (manager);
         idle_configure (manager);
 
+        /* ensure the default dpms timeouts are cleared */
+        backlight_enable (manager);
+
         manager->priv->xscreensaver_watchdog_timer_id = gsd_power_enable_screensaver_watchdog ();
 
         /* don't blank inside a VM */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]