Bug 136695 - battstat applet missing on x86_64 (and possibly other 64b platforms)
battstat applet missing on x86_64 (and possibly other 64b platforms)
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: apmd (Show other bugs)
rawhide
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-21 15:21 EDT by Zack Cerza
Modified: 2014-03-16 22:49 EDT (History)
3 users (show)

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


Attachments (Terms of Use)
diff of i386 and x86_64 versions of gnome-applets (11.69 KB, text/plain)
2004-10-21 15:22 EDT, Zack Cerza
no flags Details
Build apmd on x86_64 too; split out libs & headers into a -devel package (1.48 KB, text/plain)
2005-01-02 18:44 EST, Richard Dawe
no flags Details
Require apmd-devel instead of apmd to build; include x86_64 in list of APM platforms (1.40 KB, patch)
2005-01-02 18:46 EST, Richard Dawe
no flags Details | Diff

  None (edit)
Description Zack Cerza 2004-10-21 15:21:54 EDT
The hammer version of gnome-applets has no battstat applet.
Comment 1 Zack Cerza 2004-10-21 15:22:56 EDT
Created attachment 105604 [details]
diff of i386 and x86_64 versions of gnome-applets

i386 is on the left.
Comment 2 Richard Dawe 2005-01-02 16:05:55 EST
battstat seems to require libapm.a to build, which is part of apmd.
Presumably it uses libapm to find out the current battery status.

apmd isn't supplied on x86_64, presumably because x86_64 BIOSes don't
support APM? It seems like only ARM and i386 can support it:

[rich@meelo linux-2.6.10]$ find . -name '*apm*'
./arch/arm/kernel/apm.c
./arch/i386/kernel/apm.c
./drivers/macintosh/apm_emu.c
./include/asm-i386/mach-default/apm.h
./include/asm-arm/apm.h
./include/linux/apm_bios.h

apmd isn't shipped on x86_64, so battstat is disabled and not built by
gnome-applets's build system.

battstat can use ACPI to determine the information. It seems like it
should use only ACPI on x86_64. I'm going to try to fix this and
submit a patch to the GNOME folks.
Comment 3 Richard Dawe 2005-01-02 18:44:43 EST
Created attachment 109242 [details]
Build apmd on x86_64 too; split out libs & headers into a -devel package
Comment 4 Richard Dawe 2005-01-02 18:46:15 EST
Created attachment 109243 [details]
Require apmd-devel instead of apmd to build; include x86_64 in list of APM platforms
Comment 5 Richard Dawe 2005-01-02 18:51:48 EST
After rebuilding apmd and gnome-applets (in that order) with the spec
files patched with the two attachments above, battstat now works on my
x86_64 laptop. The battery percentages agree with what I see under
/proc/acpi/battery. If I unplug the AC power, battstat picks it up
pretty quickly (< 1 sec). So it seems to be working fine to me. The
only thing it doesn't do is estimate the remaining time.

I have an Acer Aspire 1524WLMi
<http://homepages.nildram.co.uk/~phekda/richdawe/fedora/FC3/acer-1542wlmi.html>.
I only have one battery, so I can't test how it performs with multiple
batteries.

It seems like the requirement on libapm.a is unavoidable, since
battstat uses some data structures from apm.h internally. The ACPI
code in battstat fills some of these APM fields. So I guess the only
way to fix this properly is for battstat to properly abstract this, so
the dependency on APM can be removed.
Comment 6 Richard Dawe 2005-01-02 19:31:02 EST
If you want to download my updated rpms, you can find them here now:
http://homepages.nildram.co.uk/~phekda/richdawe/fedora/FC3/
Comment 7 Mark McLoughlin 2005-01-05 05:51:45 EST
Okay, moving to apmd - open a new bug with the gnome-applets fix when
the apmd side is sorted out.
Comment 8 Mark McLoughlin 2005-01-05 05:53:44 EST
Oh, just noticed that gnome-panel.spec would need to be updated to
include x86_64 too in order to get the applet on the panel by default.
Comment 9 Bill Nottingham 2005-03-09 14:06:09 EST
If it's an implementation detail of the applet code that it uses a
structure, it should just include those bits itself. Moreover, there's
already some code in the upstream applet to do this; ergo, that should
be used/fixed.

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