Red Hat Bugzilla – Bug 136695
battstat applet missing on x86_64 (and possibly other 64b platforms)
Last modified: 2014-03-16 22:49:44 EDT
The hammer version of gnome-applets has no battstat applet.
Created attachment 105604 [details]
diff of i386 and x86_64 versions of gnome-applets
i386 is on the left.
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*'
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.
Created attachment 109242 [details]
Build apmd on x86_64 too; split out libs & headers into a -devel package
Created attachment 109243 [details]
Require apmd-devel instead of apmd to build; include x86_64 in list of APM platforms
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
I only have one battery, so I can't test how it performs with multiple
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.
If you want to download my updated rpms, you can find them here now:
Okay, moving to apmd - open a new bug with the gnome-applets fix when
the apmd side is sorted out.
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.
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