backport some important pm fixes from 3.2 branch
This commit is contained in:
parent
5e2533cdae
commit
40e622c766
50
gnome-settings-daemon-3.2.0-dont_restore_brightness.patch
Normal file
50
gnome-settings-daemon-3.2.0-dont_restore_brightness.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
From 7e9ff82377c6ada10554037c873f53b0fd8fe949 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Richard Hughes <richard@hughsie.com>
|
||||||
|
Date: Fri, 23 Sep 2011 11:21:51 +0000
|
||||||
|
Subject: power: Don't restore the brightness if it's never been set
|
||||||
|
|
||||||
|
---
|
||||||
|
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
|
||||||
|
index b528a97..f118642 100644
|
||||||
|
--- a/plugins/power/gsd-power-manager.c
|
||||||
|
+++ b/plugins/power/gsd-power-manager.c
|
||||||
|
@@ -2743,15 +2743,18 @@ idle_set_mode (GsdPowerManager *manager, GsdPowerIdleMode mode)
|
||||||
|
g_clear_error (&error);
|
||||||
|
}
|
||||||
|
|
||||||
|
- ret = backlight_set_abs (manager,
|
||||||
|
- manager->priv->pre_dim_brightness,
|
||||||
|
- &error);
|
||||||
|
- if (!ret) {
|
||||||
|
- g_warning ("failed to restore backlight to %i: %s",
|
||||||
|
- manager->priv->pre_dim_brightness,
|
||||||
|
- error->message);
|
||||||
|
- g_error_free (error);
|
||||||
|
- return;
|
||||||
|
+ /* reset brightness if we dimmed */
|
||||||
|
+ if (manager->priv->pre_dim_brightness >= 0) {
|
||||||
|
+ ret = backlight_set_abs (manager,
|
||||||
|
+ manager->priv->pre_dim_brightness,
|
||||||
|
+ &error);
|
||||||
|
+ if (!ret) {
|
||||||
|
+ g_warning ("failed to restore backlight to %i: %s",
|
||||||
|
+ manager->priv->pre_dim_brightness,
|
||||||
|
+ error->message);
|
||||||
|
+ g_error_free (error);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -3298,7 +3301,7 @@ gsd_power_manager_start (GsdPowerManager *manager,
|
||||||
|
manager);
|
||||||
|
|
||||||
|
manager->priv->kbd_brightness_old = -1;
|
||||||
|
- manager->priv->pre_dim_brightness = 100;
|
||||||
|
+ manager->priv->pre_dim_brightness = -1;
|
||||||
|
manager->priv->settings = g_settings_new (GSD_POWER_SETTINGS_SCHEMA);
|
||||||
|
g_signal_connect (manager->priv->settings, "changed",
|
||||||
|
G_CALLBACK (engine_settings_key_changed_cb), manager);
|
||||||
|
--
|
||||||
|
cgit v0.9.0.2
|
||||||
|
|
39
gnome-settings-daemon-3.2.0-dpms_on.patch
Normal file
39
gnome-settings-daemon-3.2.0-dpms_on.patch
Normal 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
|
||||||
|
|
29
gnome-settings-daemon-3.2.0-idle_brightness_revert.patch
Normal file
29
gnome-settings-daemon-3.2.0-idle_brightness_revert.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 51ba98ff6346007d252b2450ed4c1a479c41fb19 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Richard Hughes <richard@hughsie.com>
|
||||||
|
Date: Thu, 29 Sep 2011 13:32:17 +0000
|
||||||
|
Subject: power: Do not revert to the pre-idle brightness if idle dimming is disabled
|
||||||
|
|
||||||
|
We want to set manager->priv->pre_dim_brightness = -1 to indicate that we're
|
||||||
|
restored the value and that no further restoration is required, as the user may
|
||||||
|
have already altered the level.
|
||||||
|
|
||||||
|
This will only happen if you disable dimming at runtime after having dimmed at
|
||||||
|
least once.
|
||||||
|
|
||||||
|
Resolves https://bugzilla.gnome.org/show_bug.cgi?id=660434
|
||||||
|
---
|
||||||
|
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
|
||||||
|
index f3c5ffe..5fbf42e 100644
|
||||||
|
--- a/plugins/power/gsd-power-manager.c
|
||||||
|
+++ b/plugins/power/gsd-power-manager.c
|
||||||
|
@@ -2733,6 +2733,7 @@ idle_set_mode (GsdPowerManager *manager, GsdPowerIdleMode mode)
|
||||||
|
g_error_free (error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
+ manager->priv->pre_dim_brightness = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
cgit v0.9.0.2
|
||||||
|
|
41
gnome-settings-daemon-3.2.0-no_default_sleep.patch
Normal file
41
gnome-settings-daemon-3.2.0-no_default_sleep.patch
Normal 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
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: gnome-settings-daemon
|
Name: gnome-settings-daemon
|
||||||
Version: 3.2.0
|
Version: 3.2.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?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
|
||||||
@ -9,6 +9,12 @@ URL: http://download.gnome.org/sources/%{name}
|
|||||||
#VCS: git:git://git.gnome.org/gnome-settings-daemon
|
#VCS: git:git://git.gnome.org/gnome-settings-daemon
|
||||||
Source: http://download.gnome.org/sources/%{name}/3.1/%{name}-%{version}.tar.xz
|
Source: http://download.gnome.org/sources/%{name}/3.1/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
|
# These are all 3.2.1 backports to be dropped when building 3.2.1
|
||||||
|
Patch0: gnome-settings-daemon-3.2.0-dont_restore_brightness.patch
|
||||||
|
Patch1: gnome-settings-daemon-3.2.0-idle_brightness_revert.patch
|
||||||
|
Patch2: gnome-settings-daemon-3.2.0-no_default_sleep.patch
|
||||||
|
Patch3: gnome-settings-daemon-3.2.0-dpms_on.patch
|
||||||
|
|
||||||
Requires(pre): GConf2 >= 2.14
|
Requires(pre): GConf2 >= 2.14
|
||||||
Requires(preun): GConf2 >= 2.14
|
Requires(preun): GConf2 >= 2.14
|
||||||
Requires(post): GConf2 >= 2.14
|
Requires(post): GConf2 >= 2.14
|
||||||
@ -58,6 +64,10 @@ developing applications that use %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
# autoreconf -i -f
|
# autoreconf -i -f
|
||||||
|
|
||||||
@ -213,6 +223,10 @@ 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-2
|
||||||
|
- backport some greatest hits from git to stop the same bugs being
|
||||||
|
reported over and over (all will be in 3.2.1)
|
||||||
|
|
||||||
* Tue Sep 27 2011 Ray <rstrode@redhat.com> - 3.2.0-1
|
* Tue Sep 27 2011 Ray <rstrode@redhat.com> - 3.2.0-1
|
||||||
- Update to 3.2.0
|
- Update to 3.2.0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user