tag 510268 + patch thanks Here's a fix for this bug. I can't commit it at the moment as I'm on the road, away from my PGP key. :)
-- Sam Morris <s...@robots.org.uk>
Index: debian/patches/09-sensible-backlight-delta.patch =================================================================== --- debian/patches/09-sensible-backlight-delta.patch (revision 0) +++ debian/patches/09-sensible-backlight-delta.patch (revision 0) @@ -0,0 +1,57 @@ +commit 04f16626bf296e103b7a6eb867d581a3569c6ab6 +Author: rhughes <rhug...@defc9950-da25-0410-834b-a0a062d1b5ee> +Date: Fri Jan 2 09:28:52 2009 +0000 + + 2009-01-02 Richard Hughes <rich...@hughsie.com> + + * src/gpm-brightness-xrandr.c: (gpm_brightness_xrandr_output_set): + Don't step through each brightness state when we fade modes, some + devices using XRandR have an insane number of steps. Use the step + value we calculated for the _up and _down logic. + Fixes #566095 + + + git-svn-id: svn+ssh://svn.gnome.org/svn/gnome-power-manager/tr...@3142 defc9950-da25-0410-834b-a0a062d1b5ee + +Index: gnome-power-manager-2.24.2/src/gpm-brightness-xrandr.c +=================================================================== +--- gnome-power-manager-2.24.2.orig/src/gpm-brightness-xrandr.c 2009-01-03 00:39:42.000000000 +0000 ++++ gnome-power-manager-2.24.2/src/gpm-brightness-xrandr.c 2009-01-03 00:41:16.000000000 +0000 +@@ -306,6 +306,7 @@ + guint min, max; + gint i; + gint shared_value_abs; ++ guint step; + + g_return_val_if_fail (GPM_IS_BRIGHTNESS_XRANDR (brightness), FALSE); + +@@ -333,8 +334,13 @@ + + /* step the correct way */ + if (cur < shared_value_abs) { ++ ++ /* some adaptors have a large number of steps */ ++ step = gpm_brightness_get_step (shared_value_abs - cur); ++ egg_debug ("using step of %i", step); ++ + /* going up */ +- for (i=cur; i<=shared_value_abs; i++) { ++ for (i=cur; i<=shared_value_abs; i+=step) { + ret = gpm_brightness_xrandr_output_set_internal (brightness, output, i); + if (!ret) { + break; +@@ -344,8 +350,13 @@ + } + } + } else { ++ ++ /* some adaptors have a large number of steps */ ++ step = gpm_brightness_get_step (cur - shared_value_abs); ++ egg_debug ("using step of %i", step); ++ + /* going down */ +- for (i=cur; i>=shared_value_abs; i--) { ++ for (i=cur; i>=shared_value_abs; i-=step) { + ret = gpm_brightness_xrandr_output_set_internal (brightness, output, i); + if (!ret) { + break; Index: debian/patches/series =================================================================== --- debian/patches/series (revision 18128) +++ debian/patches/series (working copy) @@ -4,4 +4,5 @@ 06-bugreport-debian.patch 07-bugreport-shebang.patch 08-desktop-bugreport-path.patch +09-sensible-backlight-delta.patch 70_relibtoolize.patch Index: debian/changelog =================================================================== --- debian/changelog (revision 18128) +++ debian/changelog (working copy) @@ -1,3 +1,12 @@ +gnome-power-manager (2.24.2-3) UNRELEASED; urgency=low + + * Non-maintainer upload. + * 09-sensible-backlight-delta.patch: cope with backlights that have a lot of + backlight levels when dimming due to being on battery power. Taken from + upstream SVN revision 3142 (closes: #510268). + + -- Sam Morris <s...@robots.org.uk> Sat, 03 Jan 2009 00:44:27 +0000 + gnome-power-manager (2.24.2-2) experimental; urgency=low * Switch to quilt to manage patches; build-depend on quilt.