Bug#345537: xserver-xorg: stopping acpid makes Xorg go crazy

2010-05-11 Thread Julien Cristau
tag 345537 - patch
tag 345537 unreproducible moreinfo
kthxbye

On Sun, Jan  1, 2006 at 17:07:26 +0100, Mattia Dongili wrote:

 I just noticed that Xorg uses ACPI's /proc/acpi/event. Now, when acpid
 is running Xorg is smart enough to read from its socket instead, and
 when you, brave user, stop acpid: kaboom!
 Xorg uses all my CPU leaving no option than restarting it.
 
 Disabling PM management (Option NoPM) obviously helps and also fixes
 xorg stealing /proc/acpi/event.
 
Hey Mattia,

is this bug still relevant?  X never uses /proc/acpi/event anymore
afaik, it only tries to use the acpid socket, and should generally
behave fine if that's not possible.

Cheers,
Julien


signature.asc
Description: Digital signature


Bug#345537: xserver-xorg: stopping acpid makes Xorg go crazy

2006-01-02 Thread Mattia Dongili
tags 345537 + patch
stop

On Sun, Jan 01, 2006 at 05:07:26PM +0100, Mattia Dongili wrote:
 Package: xserver-xorg
 Version: 6.9.0.dfsg.1-1
 Severity: normal
 
 Hello,
 
 I just noticed that Xorg uses ACPI's /proc/acpi/event. Now, when acpid
 is running Xorg is smart enough to read from its socket instead, and
 when you, brave user, stop acpid: kaboom!
 Xorg uses all my CPU leaving no option than restarting it.
 
 Disabling PM management (Option NoPM) obviously helps and also fixes
 xorg stealing /proc/acpi/event.

bug also found in xorg's bugzilla:
https://bugs.freedesktop.org/show_bug.cgi?id=5140

I've rolled a patch that works here (also submitted in the bugreport
above), it disables reading from acpid socket on any error (tested, works).

A different approach could implement (re)opening /proc/acpi/event on EOF as
that can only happen when using acpid socket because if ACPI is enabled
the /proc/acpi/event is always compiled in.
I'm also going to try this one.

-- 
mattia
:wq!
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 -  1.2
+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c  2 Jan 2006 
11:57:36 -
@@ -45,6 +45,13 @@
 memset(ev, 0, LINE_LENGTH);
 
 n = read( fd, ev, LINE_LENGTH );
+if (n = 0) {
+   xf86MsgVerb(X_WARNING,3,Error reading the ACPI Event handler, 
disabling.\n);
+   if (n  0)
+   xf86MsgVerb(X_WARNING,3,%s\n, strerror(errno));
+   lnxCloseACPI();
+   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);


Bug#345537: xserver-xorg: stopping acpid makes Xorg go crazy

2006-01-02 Thread Mattia Dongili
On Mon, Jan 02, 2006 at 05:52:52PM +0100, Mattia Dongili wrote:
[...]
 A different approach could implement (re)opening /proc/acpi/event on EOF as
 that can only happen when using acpid socket because if ACPI is enabled
 the /proc/acpi/event is always compiled in.
 I'm also going to try this one.

here[1] is it, tested and working here[2].

[1]: https://bugs.freedesktop.org/attachment.cgi?id=4217

[2]: Obviously this will prevent acpid (or any other acpi-event daemon)
 from restarting. /proc/acpi/event contention is really an ugly
 thing...

-- 
mattia
:wq!


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#345537: xserver-xorg: stopping acpid makes Xorg go crazy

2006-01-01 Thread Mattia Dongili
Package: xserver-xorg
Version: 6.9.0.dfsg.1-1
Severity: normal

Hello,

I just noticed that Xorg uses ACPI's /proc/acpi/event. Now, when acpid
is running Xorg is smart enough to read from its socket instead, and
when you, brave user, stop acpid: kaboom!
Xorg uses all my CPU leaving no option than restarting it.

Disabling PM management (Option NoPM) obviously helps and also fixes
xorg stealing /proc/acpi/event.

BTW: I'm stripping some of the package info below as they're not much of
use.

-- Package-specific info:
Contents of /var/lib/xfree86/X.roster:
xserver-xorg

/var/lib/xfree86/X.md5sum does not exist.

X server symlink status:
lrwxrwxrwx  1 root root 17 2005-08-10 19:41 /etc/X11/X - /usr/bin/X11/Xorg
-rwxr-xr-x  1 root root 1852284 2005-12-29 08:38 /usr/bin/X11/Xorg

Contents of /var/lib/xfree86/xorg.conf.roster:
xserver-xorg

VGA-compatible devices on PCI bus:
:01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M6 
LY

/var/lib/xfree86/xorg.conf.md5sum does not exist.

Xorg X server configuration file status:
-rw-r--r--  1 root root 4517 2006-01-01 16:24 /etc/X11/xorg.conf
[...]

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (300, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-rc5-mm3-1
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)

Versions of packages xserver-xorg depends on:
ii  debconf [debconf-2.0] 1.4.66 Debian configuration management sy
ii  libc6 2.3.5-8GNU C Library: Shared libraries an
ii  libgcc1   1:4.0.2-5  GCC support library
ii  libxau6   6.9.0.dfsg.1-1 X Authentication library
ii  libxdmcp6 6.9.0.dfsg.1-1 X Display Manager Control Protocol
ii  xserver-common6.9.0.dfsg.1-1 files and utilities common to all 
ii  zlib1g1:1.2.3-8  compression library - runtime

Versions of packages xserver-xorg recommends:
pn  discover | discover1  none (no description available)
ii  laptop-detect 0.12.1 attempt to detect a laptop
pn  mdetect   none (no description available)
ii  xlibs 6.9.0.dfsg.1-1 X Window System client libraries m
pn  xresprobe none (no description available)

-- debconf information excluded
-- 
mattia
:wq!


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]