SOURCES: X11-acpi_event_loop_fix.patch (NEW) hacky workaround for ...
arekm
arekm at pld-linux.org
Tue Jan 24 21:21:53 CET 2006
Author: arekm Date: Tue Jan 24 20:21:53 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
hacky workaround for X eating cpu with acpid
---- Files affected:
SOURCES:
X11-acpi_event_loop_fix.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/X11-acpi_event_loop_fix.patch
diff -u /dev/null SOURCES/X11-acpi_event_loop_fix.patch:1.1
--- /dev/null Tue Jan 24 21:21:53 2006
+++ SOURCES/X11-acpi_event_loop_fix.patch Tue Jan 24 21:21:48 2006
@@ -0,0 +1,37 @@
+This fixes issues with the server choking when it's listening to acpid and
+acpid is shut down. See https://bugs.freedesktop.org/show_bug.cgi?id=5140
+and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=345537.
+
+This patch by Mattia Dongili.
+
+Index: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c
+===================================================================
+RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c,v
+retrieving revision 1.2
+diff -u -r1.2 lnx_acpi.c
+--- xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c 31 Oct 2005 05:45:40 -0000 1.2
++++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c 2 Jan 2006 17:17:29 -0000
+@@ -45,6 +45,13 @@
+ memset(ev, 0, LINE_LENGTH);
+
+ n = read( fd, ev, LINE_LENGTH );
++ if (n <= 0) {
++ /* can only happen when reading from acpid socket */
++ xf86MsgVerb(X_WARNING,3,"ACPI Event handler disappeared, reopening.\n");
++ lnxCloseACPI();
++ lnxACPIOpen();
++ return 0;
++ }
+
+ /* Check that we have a video event */
+ if (strstr(ev, "video") == ev) {
+@@ -160,6 +167,9 @@
+ #ifdef DEBUG
+ ErrorF("ACPI: Closing device\n");
+ #endif
++ xf86PMGetEventFromOs = NULL;
++ xf86PMConfirmEventToOs = NULL;
++
+ if (ACPIihPtr) {
+ fd = xf86RemoveInputHandler(ACPIihPtr);
+ shutdown(fd, 2);
================================================================
More information about the pld-cvs-commit
mailing list