hal/tools hal-system-power-hibernate, 1.10, 1.11 hal-system-power-suspend, 1.10, 1.11

Richard Hughes hughsient at kemper.freedesktop.org
Thu Mar 30 11:21:31 PST 2006


Update of /cvs/hal/hal/tools
In directory kemper:/tmp/cvs-serv11221/tools

Modified Files:
	hal-system-power-hibernate hal-system-power-suspend 
Log Message:
2006-03-30  Richard Hughes <richard at hughsie.com>
 * tools/hal-system-power-hibernate, tools/hal-system-power-suspend: Refresh device types button, battery and ac_adapter on resume, as a suspend or hibernate can do funny things to ACPI. This fixes a common problem where HAL forgets the value of the lid button when it is resuming and may fix other related problems also.

Index: hal-system-power-hibernate
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-power-hibernate,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- hal-system-power-hibernate	26 Mar 2006 20:13:03 -0000	1.10
+++ hal-system-power-hibernate	30 Mar 2006 19:21:29 -0000	1.11
@@ -63,4 +63,15 @@
 		fi
 	fi
 
+#Refresh devices as a resume can do funny things
+for type in button battery ac_adapter
+do
+	devices=`hal-find-by-capability --capability $type`
+	for device in $devices
+	do
+		dbus-send --system --dest=org.freedesktop.Hal \
+			  $device org.freedesktop.Hal.Device.Rescan
+	done
+done
+
 exit $RET

Index: hal-system-power-suspend
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-power-suspend,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- hal-system-power-suspend	26 Mar 2006 20:13:03 -0000	1.10
+++ hal-system-power-suspend	30 Mar 2006 19:21:29 -0000	1.11
@@ -83,4 +83,15 @@
 	    fi
 	fi
 
+#Refresh devices as a resume can do funny things
+for type in button battery ac_adapter
+do
+	devices=`hal-find-by-capability --capability $type`
+	for device in $devices
+	do
+		dbus-send --system --dest=org.freedesktop.Hal \
+			  $device org.freedesktop.Hal.Device.Rescan
+	done
+done
+
 exit $RET




More information about the hal-commit mailing list