Index: src/gpm-brightness.c
===================================================================
RCS file: /cvs/gnome/gnome-power-manager/src/gpm-brightness.c,v
retrieving revision 1.11
diff -u -r1.11 gpm-brightness.c
--- src/gpm-brightness.c	16 Apr 2006 10:12:54 -0000	1.11
+++ src/gpm-brightness.c	30 Apr 2006 22:50:08 -0000
@@ -58,6 +58,7 @@
 struct GpmBrightnessPrivate
 {
 	gboolean    has_hardware;
+	gboolean    does_own_updates; /* keys are hardwired */
 	int	    current_hw;
 	int	    saved_value_hw;
 	int	    levels;
@@ -139,6 +140,11 @@
 
 	brightness->priv->has_hardware = TRUE;
 
+	/* We only want to change the brightness if the machine does not
+	   do it on it's own updates, as this can make the panel flash in a
+	   feedback loop. Required TRUE for IBM Thinkpad x31 and maybe more */
+	brightness->priv->does_own_updates = FALSE;
+
 	/* We only want first laptop_panel object (should only be one) */
 	brightness->priv->udi = g_strdup (names[0]);
 	gpm_hal_free_capability (names);
@@ -280,7 +286,13 @@
 	if (! brightness->priv->has_hardware) {
 		return;
 	}
-	gpm_brightness_level_set_hw (brightness, brightness->priv->current_hw + 1);
+
+	/* Do we find the new value, or set the new value */
+	if (brightness->priv->does_own_updates) {
+		gpm_brightness_level_update_hw (brightness);
+	} else {
+		gpm_brightness_level_set_hw (brightness, brightness->priv->current_hw + 1);
+	}
 
 	int percentage;
 	percentage = gpm_brightness_hw_to_percent (brightness->priv->current_hw,
@@ -301,7 +313,14 @@
 	if (! brightness->priv->has_hardware) {
 		return;
 	}
-	gpm_brightness_level_set_hw (brightness, brightness->priv->current_hw - 1);
+
+	/* Do we find the new value, or set the new value */
+	if (brightness->priv->does_own_updates) {
+		gpm_brightness_level_update_hw (brightness);
+	} else {
+		gpm_brightness_level_set_hw (brightness, brightness->priv->current_hw - 1);
+	}
+
 	int percentage;
 	percentage = gpm_brightness_hw_to_percent (brightness->priv->current_hw,
 						   brightness->priv->levels);
