backport some more upstream power fixes

This commit is contained in:
Adam Williamson 2011-10-12 20:38:48 -07:00
parent a266f8091a
commit ff3fa28638
3 changed files with 88 additions and 1 deletions

View File

@ -0,0 +1,39 @@
From aaae8e5e9deae04d0d1980f8e70f64db428f6a5f Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
Date: Mon, 03 Oct 2011 15:31:07 +0000
Subject: power: Ensure the DPMS state is 'on' at startup
This also has the side-effect of disabling the default DPMS timeouts the session may have set.
Resolves https://bugzilla.gnome.org/show_bug.cgi?id=660482
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 9ffe07f..d0fe7c2 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -3265,6 +3265,8 @@ gboolean
gsd_power_manager_start (GsdPowerManager *manager,
GError **error)
{
+ gboolean ret;
+
g_debug ("Starting power manager");
gnome_settings_profile_start (NULL);
@@ -3410,6 +3412,13 @@ gsd_power_manager_start (GsdPowerManager *manager,
if (manager->priv->x11_screen == NULL)
return FALSE;
+ /* ensure the default dpms timeouts are cleared */
+ ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
+ GNOME_RR_DPMS_ON,
+ error);
+ if (!ret)
+ return FALSE;
+
/* coldplug the engine */
engine_coldplug (manager);
idle_evaluate (manager);
--
cgit v0.9.0.2

View File

@ -0,0 +1,41 @@
From 378e3037ac09b8851ad83261930295f3eceb590c Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
Date: Thu, 29 Sep 2011 14:04:22 +0000
Subject: power: Do not sleep-on-idle by default
We do not actually read the boolean keys in gnome-settings-daemon due to
a mixup when the UI was re-designed. We can just change the default of
the timeout key (that we do read...) to zero to change "never" to be
the default.
Note: we're not actually going to remove the unused keys from the schema
like we did in master, otherwise upgrading the g-s-d package whilst
the control center is open is going to make it explode.
Resolves https://bugzilla.gnome.org/show_bug.cgi?id=660395
---
diff --git a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
index 665192f..d2d4b48 100644
--- a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
+++ b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
@@ -46,7 +46,7 @@
<description>Whether to put the computer to sleep when inactive on AC power.</description>
</key>
<key name="sleep-inactive-ac-timeout" type="i">
- <default>1800</default>
+ <default>0</default>
<summary>Sleep timeout computer when on AC</summary>
<description>The amount of time in seconds the computer on AC power needs to be inactive before it goes to sleep.</description>
</key>
@@ -61,7 +61,7 @@
<description>Whether to put the computer to sleep when inactive on battery power.</description>
</key>
<key name="sleep-inactive-battery-timeout" type="i">
- <default>1800</default>
+ <default>0</default>
<summary>Sleep timeout computer when on battery</summary>
<description>The amount of time in seconds the computer on battery power needs to be inactive before it goes to sleep.</description>
</key>
--
cgit v0.9.0.2

View File

@ -1,6 +1,6 @@
Name: gnome-settings-daemon Name: gnome-settings-daemon
Version: 3.2.0 Version: 3.2.0
Release: 2%{?dist} Release: 3%{?dist}
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
Group: System Environment/Daemons Group: System Environment/Daemons
@ -11,6 +11,8 @@ Source: http://download.gnome.org/sources/%{name}/3.1/%{name}-%{version}
# post-3.2.0 fixes; remove these when 3.2.1 is released # post-3.2.0 fixes; remove these when 3.2.1 is released
Patch0: %{name}-3.2.0-power-restore_only_if_set.patch Patch0: %{name}-3.2.0-power-restore_only_if_set.patch
Patch1: %{name}-3.2.0-power-revert_only_if_dimming.patch Patch1: %{name}-3.2.0-power-revert_only_if_dimming.patch
Patch2: gnome-settings-daemon-3.2.0-no_default_sleep.patch
Patch3: gnome-settings-daemon-3.2.0-dpms_on.patch
# post-3.20 fixes # post-3.20 fixes
Requires(pre): GConf2 >= 2.14 Requires(pre): GConf2 >= 2.14
@ -67,6 +69,8 @@ developing applications that use %{name}.
%setup -q %setup -q
%patch0 -p1 -b .restore_only_if_set %patch0 -p1 -b .restore_only_if_set
%patch1 -p1 -b .revert_only_if_dimming %patch1 -p1 -b .revert_only_if_dimming
%patch2 -p1 -b .no_default_sleep
%patch3 -p1 -b .dpms_on
# autoreconf -i -f # autoreconf -i -f
@ -222,6 +226,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_datadir}/gnome-settings-daemon-3.0/input-device-example.sh %{_datadir}/gnome-settings-daemon-3.0/input-device-example.sh
%changelog %changelog
* Wed Oct 12 2011 Adam Williamson <awilliam@redhat.com> - 3.2.0-3
- backports: another brightness fix and no idle sleep
* Thu Oct 6 2011 Michel Salim <salimma@fedoraproject.org> - 3.2.0-2 * Thu Oct 6 2011 Michel Salim <salimma@fedoraproject.org> - 3.2.0-2
- Backport brightness fixes for power plugin - Backport brightness fixes for power plugin