Bug 100540 - battery monitoring applet crashes on severn
battery monitoring applet crashes on severn
Product: Red Hat Raw Hide
Classification: Retired
Component: acpid (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Mike McLean
: 102735 (view as bug list)
Depends On:
Blocks: CambridgeBlocker
  Show dependency treegraph
Reported: 2003-07-23 03:56 EDT by Trond Eivind Glomsrød
Modified: 2014-03-16 22:37 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-09-22 04:40:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Trond Eivind Glomsrød 2003-07-23 03:56:52 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703

Description of problem:
(beta component doesn't show up in bugzilla... the step by step bug entry form
sucks bigtime, btw)

When trying to add the battery monitoring applet to the gnome panel in a full
severn install, the applet (/usr/libexec/battstat-applet-2) crashes (as does bug
buddy when using that to get details :D ) immediately.

It's worth noting that the laptop (a centrino laptop) doesn't have APM support -
it uses ACPI for everything of that nature (and thus, the battery info is found

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Add battery monitoring applet to gnome panel.

Actual Results:  It crashed.

Expected Results:  It shouldn't crash.

Additional info:
Comment 1 John Beimler 2003-07-24 12:29:08 EDT
It appears you *must* have all the correct ACPI modules loaded, otherwise it 
won't work. 

After running:

# modprobe ac
# modprobe battery

the applet runs and does not crash.

It appears that somehow the install needs to figure out ACPI needs to be on and
adds the appropriate modules when the system boots. 

I added them to the /etc/init.d/acpid
--- acpid.orig  2003-07-24 12:28:11.000000000 -0400
+++ acpid       2003-07-24 12:27:49.000000000 -0400
@@ -27,6 +27,10 @@
        if [ ! -f /var/lock/subsys/$PROGNAME ]; then
            echo -n $"Starting acpi daemon: "
            modprobe button > /dev/null 2>&1
+            modprobe battery > /dev/null 2>&1
+            modprobe ac > /dev/null 2>&1
+            modprobe processor > /dev/null 2&1
+            modprobe thermal > /dev/null 2&1
            daemon /usr/sbin/$PROGNAME
            [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$PROGNAME
Comment 2 Trond Eivind Glomsrød 2003-07-29 07:14:37 EDT
Using those modules does solve the problem...
Comment 3 John Beimler 2003-07-29 07:36:16 EDT
One thing I have noticed though is that battstat-applet-2 consumes 10-15% of the
processor though. It appears that it is the polling of the /proc interface that
causes it, although I have not had time to test that yet.
Comment 4 John Beimler 2003-08-01 01:19:12 EDT
Ok, the cpu problem is just accessing the /proc/acpi information. 

Should I change the topic on this, or create a new incident?

On my Dell Latitude C400, accessing the ACPI information spikes the proccessor
up to 10%-15%.

I tested this by running:
$ watch "cat /proc/acpi/ac_adapter/AC/state ; cat /proc/acpi/battery/BAT0/state"

I then watched the cpu usage every second, and it would fluctuate from around
1%-2% when /proc/acpi entries were not being accessed to 10%-15% when they were.
I watched by using top and gnome-system-monitor.
Comment 5 Bill Nottingham 2003-08-01 11:54:36 EDT
Yes, the cpu issue should be a  different bug; that's a kernel issue.
Comment 6 Laur Ivan 2003-08-05 08:19:05 EDT
Yep, over the weekend I reached a similar config. One needs to load the
battery/ac modules.
Comment 7 Bill Nottingham 2003-08-20 17:32:37 EDT
*** Bug 102735 has been marked as a duplicate of this bug. ***
Comment 8 Warren Togami 2003-09-21 07:31:49 EDT
This is perhaps 3 or 4 separate bugs.
1) Crashing of applet which shouldn't happen.  It should warn that the kernel
modules are not loaded so it cannot query battery info.
2) Kernel modules should be loaded automatically?
3) Too much overhead/too expensive when reading battery state from /proc.  I've
seen older versions of 2.4.x with ACPI lockup completely or lose PS/2 devices
after polling the battery state in /proc several times.  The kernel just isn't
handling this situation well.
4) The gnome applet is polling too quickly.  It is nowhere near this bad with
the KDE battery applet.

Should we file the sub-bugs?
Comment 9 Trond Eivind Glomsrød 2003-09-22 04:40:19 EDT
Closing the original bug as it is fixed... when the kernel changed to acpi to
default to off (I thought it was just a broken kernel for a while), the applet
didn't crash. File the rest separately.

Note You need to log in before you can comment on or make changes to this bug.