Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 283318

Summary: sys-power/acpid-1.0.10_p3 daemon crash
Product: Gentoo Linux Reporter: Anton Bolshakov <anton.bugs>
Component: Current packagesAssignee: Mobile Herd (OBSOLETE) <mobile+disabled>
Status: RESOLVED UPSTREAM    
Severity: normal CC: mikhail.krivtsov
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 303891    
Bug Blocks:    
Attachments: patch for acpid-1.0.10-netlink4 to survive input device removal

Description Anton Bolshakov 2009-08-31 11:45:55 UTC
acpid daemon crashes sometime (seems) then I turn off an external monitor by using:
xrandr --output LVDS --auto
xrandr --output VGA-0 --off
followed by usb mouse and keyboard unplugging.

Here is what I managed to capture so far:

/var/log/messages
Aug 30 22:51:12 ant su[4438]: pam_unix(su:session): session closed for user root
Aug 30 23:23:09 ant usb 2-1: USB disconnect, address 2
Aug 30 23:23:25 ant usb 2-2: USB disconnect, address 3
Aug 30 23:23:25 ant acpid: input layer read error: No such device (19)
Aug 30 23:23:25 ant acpid: input layer read error: No such device (19)
Aug 30 23:23:25 ant acpid: input layer read error: No such device (19)
Aug 30 23:23:25 ant acpid: input layer read error: No such device (19)
Aug 30 23:23:25 ant logger: Debug ACPI event: ac_adapter ac_adapter ACPI0003:00 00000080  ac_adapter ACPI0003:00 00000080 00000000
Aug 30 23:23:25 ant logger: ACPI event unhandled: ac_adapter ACPI0003:00 00000080 00000000
Aug 30 23:23:25 ant acpid: input layer read error: No such device (19)
Aug 30 23:23:25 ant acpid: too many errors reading input layer - aborting
Aug 31 00:35:03 ant dhcpcd[3736]: eth1: renewing lease of 192.168.1.241

/var/log/Xorg.0.log:
(II) RADEON(0):         004c41463034303539343332310a002f
(II) RADEON(0): EDID vendor "ACR", prod id 44463
(II) RADEON(0): Output: DVI-0, Detected Monitor Type: 0
(II) RADEON(0): Output: LVDS, Detected Monitor Type: 0
(II) RADEON(0): Added native panel mode: 1400x1050
(II) RADEON(0): Output: S-video, Detected Monitor Type: 0
disable primary dac
disable FP1
disable TV
(EE) Logitech USB-PS/2 Optical Mouse: Read error: No such device
(EE) Logitech Logitech Illuminated Keyboard: Read error: No such device
(EE) Logitech Logitech Illuminated Keyboard: Read error: No such device
(EE) Logitech USB-PS/2 Optical Mouse: Failed to reopen device after 10 attempts.
(EE) Logitech Logitech Illuminated Keyboard: Failed to reopen device after 10 attempts.
(EE) Logitech Logitech Illuminated Keyboard: Failed to reopen device after 10 attempts.
(II) config/hal: removing device Logitech USB-PS/2 Optical Mouse
(II) Logitech USB-PS/2 Optical Mouse: Close
(II) UnloadModule: "evdev"
(II) config/hal: removing device Logitech Logitech Illuminated Keyboard
(II) Logitech Logitech Illuminated Keyboard: Close
(II) UnloadModule: "evdev"
(II) config/hal: removing device Logitech Logitech Illuminated Keyboard
(II) Logitech Logitech Illuminated Keyboard: Close
(II) UnloadModule: "evdev"
(WW) Open ACPI failed (/var/run/acpid.socket) (Connection refused)
(WW) Open ACPI failed (/var/run/acpid.socket) (Connection refused)
(WW) Open ACPI failed (/var/run/acpid.socket) (Connection refused)
(WW) Open ACPI failed (/var/run/acpid.socket) (Connection refused)



emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-i686-Intel-R-_Pentium-R-_M_processor_1.70GHz-with-gentoo-2.0.0
Timestamp of tree: Sun, 30 Aug 2009 14:30:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.jaist.ac.jp/pub/Linux/Gentoo/"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en ru"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sectools /usr/local/portage"
SYNC="rsync://gentoo.o0o.nu/gentoo-portage"
USE="X a52 aac acl acpi aiglx alsa bash-completion berkdb bluetooth bzip2 cairo cdr cli cracklib crypt dbus dri dts dvb dvd eds emboss encode evo exif fam firefox flac fortran gdbm gif gpm hal iconv ipv6 isdnlog jpeg jpeg2k kde kdehiddenvisibility libnotify logrotate mad matroska mikmod mmx mng mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd theora thunar tiff truetype unicode usb vorbis wifi win32codecs x264 x86 xcomposite xml xorg xulrunner xv xvid zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="spca50x canon ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" LIRC_DEVICES="sir" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Let me know what other information would help.
Comment 1 Mikhail Krivtsov 2009-09-24 06:59:53 UTC
It doesn't crash. Due to input devices removal acpid silly exits ceasing to work. ;-)

When keyboard or mouse is unplugged corresponding /dev/input/event* item disappears and acpid starts complaining "acpid: input layer read error: No such device (19)" and then very soon exits with message "acpid: too many errors reading input layer - aborting".
Comment 2 Mikhail Krivtsov 2009-10-07 19:13:36 UTC
Created attachment 206356 [details, diff]
patch for acpid-1.0.10-netlink4 to survive input device removal
Comment 3 Anton Bolshakov 2009-10-08 00:35:08 UTC
Thank you, Mikhail.
Did you write it yourself? We'd need to submit it to upstream first then, before it could go to gentoo's portage ...
Comment 4 Mikhail Krivtsov 2009-10-08 05:14:36 UTC
Yes, I did it myself.
And I also posted the patch at https://sourceforge.net/projects/acpid/ (http://sourceforge.net/support/tracker.php?aid=2865548)
Comment 5 Gareth McClean 2010-03-09 22:21:23 UTC
This bug still exists in the current stable release of sys-power/acpid (1.0.10_p3). 

Any update of when the fix will become mainstream?

Its a bit of a pain on headless servers as when acpid stops working as you can no longer perform a soft power-down using the power-button. 
Comment 6 Anton Bolshakov 2010-03-10 03:29:34 UTC
(In reply to comment #5)
> Any update of when the fix will become mainstream?

Thanks to Mikhail, it's in the upstream since netlink5 and the latest version is:
acpid-2.0.2.tar.gz 
http://tedfelix.com/linux/acpid-netlink.html

Mobile Herd just need to bump the new version.