diff options
author | Chris Ball <cjb@laptop.org> | 2007-07-18 14:14:03 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2007-07-18 14:14:03 +0100 |
commit | 5156925fcc558c3e9be52922f63a8ed0c7da08a2 (patch) | |
tree | f9edba0f1a184625bd27a8ac41fc08e10105e2e1 | |
parent | 598d8589791c0a46918539b585760e5bf3d0a63e (diff) |
Turn DPMS off (put the DCON to sleep) when going into suspend
-rw-r--r-- | plugins/policy/suspend/ohm-plugin-suspend.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/policy/suspend/ohm-plugin-suspend.c b/plugins/policy/suspend/ohm-plugin-suspend.c index 1e08298..712464d 100644 --- a/plugins/policy/suspend/ohm-plugin-suspend.c +++ b/plugins/policy/suspend/ohm-plugin-suspend.c @@ -44,6 +44,9 @@ system_suspend (OhmPlugin *plugin) gboolean ret; gint retval; + /* Tell the DPMS plugin to kill the backlight. */ + ohm_plugin_conf_set_key (plugin, "backlight.state", 0); + connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL); /* reuse the connection from HAL */ @@ -64,6 +67,10 @@ system_suspend (OhmPlugin *plugin) g_error_free (error); } g_object_unref (proxy); + + /* We've resumed now. Bring the backlight back. */ + ohm_plugin_conf_set_key (plugin, "backlight.state", 1); + return ret; } |