After upgrading to gentoo-sources 2.6.36, /usr/bin/wmacpiload fails to load and exits with a segment fault and the text "No ACPI support in kernel". The upgrade was accomplished by coping ../linux/.config into the new kernel directory and doing a make oldconfig. Acpi is enabled in the kernel, and acpitools returns useful information. Reproducible: Always Steps to Reproduce: 1. Upgrade kernel from 2.6.34 to 2.6.36 2. run /usr/bin/wmacpiload Actual Results: wmacpiload reports "No ACPI support in kernel", and then it segment faults. Expected Results: The applet to appear in a docking window. It appears the special proc file /proc/acpi/info is now gone in the 2.6.36 kernel. In addition, there is also a bug in how the software (applet) adds a shutdown hook to close the window, yet does not check to see if it's internal variable of the display is 0x0 (null) or not.
Portage 2.1.9.42 (default/linux/x86/10.0, gcc-4.4.5, libc-0-r0, 2.6.36-gentoo-r5 i686) ================================================================= System uname: Linux-2.6.36-gentoo-r5-i686-Intel-R-_Core-TM-2_CPU_T7200_@_2.00GHz-with-gentoo-2.0.2 Timestamp of tree: Tue, 14 Jun 2011 05:00:02 +0000 distcc 3.1 i686-pc-linux-gnu [disabled] ccache version 2.4 [disabled] app-shells/bash: 4.1_p9 dev-java/java-config: 1.3.7-r1, 2.1.11-r3 dev-lang/python: 2.4.6, 2.5.4-r3, 2.6.6-r1, 2.7.1-r1, 3.1.3-r1 dev-util/ccache: 2.4-r9 dev-util/cmake: 2.8.4-r1 sys-apps/baselayout: 2.0.2 sys-apps/openrc: 0.8.2-r1 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.13::<unknown repository>, 2.65-r1 sys-devel/automake: 1.4_p6::<unknown repository>, 1.5::<unknown repository>, 1.6.3::<unknown repository>, 1.7.9-r1::<unknown repository>, 1.8.5-r3::<unknown repository>, 1.9.6-r3, 1.10.2, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.1.2::<unknown repository>, 4.3.4, 4.4.5 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.82 sys-kernel/linux-headers: 2.6.36.1 sys-libs/glibc: 2.12.2 virtual/os-headers: 0 ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-Os -march=i686 -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 /usr/share/gnupg/qualified.txt" 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" CXXFLAGS="-Os -march=i686 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo/ ftp://ftp.gtlib.gatech.edu/pub/gentoo/ http://gentoo.osuosl.org/" LANG="en_US.88591" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en_US en" MAKEOPTS="-j4" PKGDIR="/tmp/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" SYNC="rsync://gamedog/gentoo-portage" USE="X aac acpi aim alsa amr avi berkdb bzip2 cdr cli cracklib crypt cups cxx dell dga dri dts dv dvb dvd encode flac foomaticdb fortran gdbm gimp gnutls gpm gstreamer icecast iconv ipv6 java jpeg kerberos laptop lcms live logrotate lzma lzo mad midi mmap mmx modules mozilla mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre perl pic png ppds pppd python qt qt3support quicktime readline samba session skey smp socks5 sse sse2 ssl static-libs svga sysfs syslog tcpd threads tiff tk truetype unicode usb vorbis wifi win32codecs winbind x86 xml xmms xorg yahoo 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 cgi cgid 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" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" FOO2ZJS_DEVICES="hp1020" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="ati radeon fbdev vesa vga" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 277645 [details] wmacpiload-ac-0.2.0-r1.ebuild - new ebuild that applies a patch to fix the bug This is the ebuild that I modified from the original. I added the epatch section in order to apply the two lines of patches that fix the problem.
Created attachment 277647 [details, diff] kernel-2.6.36-acpi-segfaultfix.patch - two patched lines to fix the bug This is the patch that is basically two lines that fixes the bug. I added a test to display so that XCloseDisplay() would only run if the display variable wasn't null. I changed the path that it used to see if ACPI was enabled from /proc/acpi/info to /proc/acpi/battery.
After upgrading to kernel 2.6.38, I also noticed that the /proc/acpi/thermal_zone is now deprecated. The new attached ebuild and extra patch convert the "acpi thermal" code to use the "/sys/class/hwmon" files instead of the "/proc/acpi/thermal_zone" files.
Created attachment 278607 [details] wmacpiload-ac-0.2.0-r1.ebuild - new ebuild with hwmon patch This ebuild adds the new hwmon patch to convert the /proc/acpi/thermal_zone input data to use /sys/class/hwmon/*/temp1_input and /sys/class/hwmon/*/device/temp1_input.
Created attachment 278609 [details, diff] kernel-2.6.38-acpi-temp-hwmon.patch - patch to convert proc acpi calls to hwmon calls This patch changes the thermal code to read from /sys/class/hwmon instead of /proc/acpi/thermal_zone as the acpi thermal_zone is missing in kernel 2.6.38. This patch also adds the ability to search for the correct temperature monitoring file by trying ./hwmon?/temp1_input and then ./hwmon?/device/temp1_input files.
Added wmacpiload-ac-0.2.0-r1 to Portage, with both patches applied plus a third one to allow for battery values expressed in mWh (previously only mAh was accepted)