Bug 136695
Summary: | battstat applet missing on x86_64 (and possibly other 64b platforms) | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Zack Cerza <zcerza> |
Component: | apmd | Assignee: | Bill Nottingham <notting> |
Status: | CLOSED WONTFIX | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | markmc, rich, rvokal |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-03-09 19:06:09 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Attachments: |
Description
Zack Cerza
2004-10-21 19:21:54 UTC
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*' ./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. 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 <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. If you want to download my updated rpms, you can find them here now: http://homepages.nildram.co.uk/~phekda/richdawe/fedora/FC3/ 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 be used/fixed. |