diff options
author | Colin Walters <walters@verbum.org> | 2013-03-26 11:35:25 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-03-26 11:35:25 -0400 |
commit | cdb55fc928c106346bd14c4badf63c14be803290 (patch) | |
tree | 7dda50286cd682ab5179955341466471471524a7 | |
parent | ce86f098c1d4608a8cf5aa24f2f2213346421cad (diff) | |
download | gnome-settings-daemon-cdb55fc928c106346bd14c4badf63c14be803290.tar.gz |
power: Don't change active state variable in VM
The intent of the virtual machine detection was to avoid changing
power states; however, while we avoided some parts of the code, we
still ended up flipping the state variable to which other parts of the
code reacted.
With this patch, in a VM, we remain GSD_POWER_IDLE_MODE_NORMAL
permanently.
https://bugzilla.gnome.org/show_bug.cgi?id=696500
-rw-r--r-- | 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 73b72149..2c8b6ed7 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) { |