Bug 11919 - apmd does not work
apmd does not work
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
6.2
i386 Linux
high Severity high
: ---
: ---
Assigned To: Michael K. Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-06-06 01:24 EDT by scot
Modified: 2008-05-01 11:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-06-12 17:31:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description scot 2000-06-06 01:24:55 EDT
apmd does not work on IBM Thinkpad 385D with 2.2.15 kernel; it reports
incorrect AC/Battery status.  This is what it says with the AC cord plugged
into an outlet.  It says the same thing if I unplug the cord from the wall
socket.  I've tried building the latest Rawhide apmd from src rpm but it's
still broken.

$ rpm -qa|grep apmd
apmd-3.0final-3

$ apm -v
APM BIOS 1.2 (kernel driver 1.12)
AC off-line, battery status high: 80%

This model of Thinkpad is limited in that it shows only 10%, 80% or 100%
battery capacity.  Under RedHat 5.2, apm worked ok correctly showing AC or
Battery status.  

'shutdown -h 0' does power the machine off though.
Comment 1 Bernhard Rosenkraenzer 2000-06-12 16:52:21 EDT
This seems to be a kernel issue rather than an apmd issue (apmd does little more
than querying the values reported by the kernel).

Does /proc/apm have the correct value?
Does it work with a different OS or version right now (might be a bug in an
updated BIOS etc)?
Comment 2 scot 2000-06-12 17:31:02 EDT
This is what apm currently reports:  

$ cat /proc/apm 
1.12 1.2 0x03 0x01 0x00 0x01 100% -1 ?

$ apm -v
APM BIOS 1.2 (kernel driver 1.12)
AC on-line, battery status high: 100%

The problem I have is that it still reports "AC on-line" even if I pull the plug
from the wall.  I left the machine unplugged until the battery was almost empty,
and apm still reported "AC on-line".  I think the BIOS is ok because it worked
fine under RedHat 5.2 with 2.0.38 kernel.  Also the BIOS does blink the battery
LED and beeps when the machine is about out of juice; this still happens under
RedHat 6.2 and 2.2.15 kernel but apm doesn't seem to know about it.  

If I start out on AC, boot up, 'apm -v' shows I'm on AC.  I then pull the plug,
'apm -v' still shows on AC.  If I then reboot, as the machine is booting, and
apm starts it shows on-battery.  It would appear that apm is only reading the
power status after a reboot.  I've tried stopping and restarting apmd via init
scripts but that doesn't seem to work.  Only after a reboot does it appear to
know what the current state is.
Comment 3 scot 2000-06-13 01:48:34 EDT
apmd seems to be working now.  Here's what I did: downloaded the latest src.rpm
from rawhide and compiled _on_the_laptop.  I normally do my compiles on another
machine (desktop) and then just install the binary rpms.  In this case, the
other machine does not have apm support in the kernel so, eventhough the binary
rpm builds ok, it doesn't work on my laptop.  Not sure why the original rpm that
came with 6.2 distribution didn't work.
Comment 4 scot 2000-06-13 01:51:23 EDT
p.s. I still use xapm and would like it left in the rpm; I know you're trying to
get rid of fvwm 1, but it's probably the smallest memory footprint of the window
managers out there.  I've been using it since RedHat 3.03 and swear by it.

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