After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 696500 - power isn't totally a no-op if VM
power isn't totally a no-op if VM
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Richard Hughes
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-24 17:33 UTC by Colin Walters
Modified: 2013-03-26 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Colin Walters 2013-03-24 17:33:08 UTC
This looks like a bug to me:

diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 73b7214..2c8b6ed 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2474,9 +2474,6 @@ idle_set_mode (GsdPowerManager *manager, GsdPowerIdleMode mode)
                 return;
         }
 
-        manager->priv->current_idle_mode = mode;
-        g_debug ("Doing a state transition: %s", idle_mode_to_string (mode));
-
         /* don't do any power saving if we're a VM */
         if (manager->priv->is_virtual_machine) {
                 g_debug ("ignoring state transition to %s as virtual machine",
@@ -2484,6 +2481,9 @@ idle_set_mode (GsdPowerManager *manager, GsdPowerIdleMode mode)
                 return;
         }
 
+        manager->priv->current_idle_mode = mode;
+        g_debug ("Doing a state transition: %s", idle_mode_to_string (mode));
+
         /* if we're moving to an idle mode, make sure
          * we add a watch to take us back to normal */
         if (mode != GSD_POWER_IDLE_MODE_NORMAL) {
Comment 1 Bastien Nocera 2013-03-26 15:18:05 UTC
Looks good to commit to master and gnome-3-8, thanks.