ALT Linux Bugzilla
– Attachment 1191 Details for
Bug 8228
X server eats 100% CPU after acpid restart
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
acpi.patch
xorg-x11-6.8.99.900-alt-acpi.patch (text/plain), 1.73 KB, created by
Valery Inozemtsev
on 2005-10-16 15:24:04 MSD
(
hide
)
Description:
acpi.patch
Filename:
MIME Type:
Creator:
Valery Inozemtsev
Created:
2005-10-16 15:24:04 MSD
Size:
1.73 KB
patch
obsolete
>--- xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c~ 2005-08-22 16:05:18 +0400 >+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c 2005-10-16 12:47:04 +0400 >@@ -13,7 +13,6 @@ > #include <errno.h> > > #define ACPI_SOCKET "/var/run/acpid.socket" >-#define ACPI_EVENTS "/proc/acpi/event" > > #define ACPI_VIDEO_NOTIFY_SWITCH 0x80 > #define ACPI_VIDEO_NOTIFY_PROBE 0x81 >@@ -46,6 +45,13 @@ > > n = read( fd, ev, LINE_LENGTH ); > >+ if (n <= 0) { >+ lnxCloseACPI(); >+ sleep (3); >+ lnxACPIOpen(); >+ return 0; >+ } >+ > /* Check that we have a video event */ > if (strstr(ev, "video") == ev) { > char *video = NULL; >@@ -129,24 +135,17 @@ > addr.sun_family = AF_UNIX; > strcpy(addr.sun_path, ACPI_SOCKET); > if ((r = connect(fd, (struct sockaddr*)&addr, sizeof(addr))) == -1) { >- shutdown(fd, 2); >- fd = -1; >- } >- } >- >- /* acpid's socket isn't available, so try going direct */ >- if (fd == -1) { >- if ((fd = open(ACPI_EVENTS, O_RDONLY)) < 0) { >- xf86MsgVerb(X_WARNING,3,"Open ACPI failed (%s) (%s)\n", ACPI_EVENTS, >+ close(fd); >+ xf86MsgVerb(X_WARNING,3,"Open ACPI failed (%s) (%s)\n", ACPI_SOCKET, > strerror(errno)); > return NULL; >- } >+ } > } > > xf86PMGetEventFromOs = lnxACPIGetEventFromOs; > xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs; > ACPIihPtr = xf86AddInputHandler(fd,xf86HandlePMEvents,NULL); >- xf86MsgVerb(X_INFO,3,"Open ACPI successful (%s)\n", (r != -1) ? ACPI_SOCKET : ACPI_EVENTS); >+ xf86MsgVerb(X_INFO,3,"Open ACPI successful (%s)\n", ACPI_SOCKET); > > return lnxCloseACPI; > } >@@ -161,7 +160,7 @@ > #endif > if (ACPIihPtr) { > fd = xf86RemoveInputHandler(ACPIihPtr); >- shutdown(fd, 2); >+ close(fd); > ACPIihPtr = NULL; > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 8228
:
1185
| 1191