GNOME Bugzilla – Bug 751794
Add "power-save-mode" property
Last modified: 2015-07-02 17:13:08 UTC
This would allow the orientation plugin to stop monitoring the accelerometer when the tablet's screen is off, and start again when it's on.
Created attachment 306553 [details] [review] gnome-rr: Add dpms-mode property So that other parts of the desktop environment can monitor the state of the power saving mode, and disable their own power consuming tasks when the screens are off.
Review of attachment 306553 [details] [review]: ::: libgnome-desktop/gnome-rr-private.h @@ +47,3 @@ GdkWindow * gdk_root; ScreenInfo * info; + GnomeRRDpmsMode dpms_mode; Looks like we don't need this since the value is always cached in the MetaDBusDisplayConfig proxy ::: libgnome-desktop/gnome-rr.c @@ +679,3 @@ + GnomeRRScreen *self) +{ + g_object_notify (object, "dpms-mode"); s/object/self @@ +899,3 @@ + GNOME_RR_DPMS_UNKNOWN, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | not construct only, copy/paste ? @@ +1184,2 @@ meta_dbus_display_config_set_power_save_mode (screen->priv->proxy, power_save); + screen->priv->dpms_mode = power_save; not needed @@ +2240,3 @@ + { GNOME_RR_DPMS_SUSPEND, "GNOME_RR_DPMS_SUSPEND", "suspend" }, + { GNOME_RR_DPMS_OFF, "GNOME_RR_DPMS_OFF", "off" }, + { GNOME_RR_DPMS_DISABLED, "GNOME_RR_DPMS_DISABLED", "disabled" }, I had never noticed we had this DISABLED value. And we don't use it anywhere, I think it's better to remove it in a patch before this one. If it gets passed in to _set_dpms_mode() for instance, it will trigger an assert.
Created attachment 306627 [details] [review] gnome-rr: Remove unused GNOME_RR_DPMS_DISABLED GNOME_RR_DPMS_DISABLED is one of the possible values of GnomeRRDpmsMode that's not currently used, and would trigger an assertion if passed to gnome_rr_screen_set_dpms_mode().
Created attachment 306628 [details] [review] gnome-rr: Add dpms-mode property So that other parts of the desktop environment can monitor the state of the power saving mode, and disable their own power consuming tasks when the screens are off.
Review of attachment 306627 [details] [review]: Anyway, sure ::: configure.ac @@ +29,3 @@ # - If the interface is the same as the previous version, change to C:R+1:A +LT_VERSION=12:0:0 We just bumped this for tiled monitor support and there hasn't been a release yet, do we really need this?
Review of attachment 306628 [details] [review]: ++
(In reply to Rui Matos from comment #5) > Review of attachment 306627 [details] [review] [review]: > > Anyway, sure > > ::: configure.ac > @@ +29,3 @@ > # - If the interface is the same as the previous version, change to C:R+1:A > > +LT_VERSION=12:0:0 > > We just bumped this for tiled monitor support and there hasn't been a > release yet, do we really need this? We bumped C and A for the tiled monitor support, because it's binary compatible (just new symbols). This breaks ABI.
Added some code to gnome-rr-debug.c as well, and fixed a compilation warning. Attachment 306627 [details] pushed as cb29d64 - gnome-rr: Remove unused GNOME_RR_DPMS_DISABLED Attachment 306628 [details] pushed as 367bfb7 - gnome-rr: Add dpms-mode property