You are not logged in.
I have Openbox/fbpanel installed on my EeePC laptop.
The battery icon appears in fbpanel, but always reports "Running on ac - no battery found". I have acpi installed, and start acpid in the daemons section of rc.conf.
Can anyone help?
Thanks in advance.
Offline
check the output of 'acpi -b' to see if it is a problem with acpi or a problem with the fbpanel plugin. If you get correct battery info with this command, then perhaps there is a variable in the config file that needs to be changed i.e. BAT0 to BAT1.
--empthollow
Check out my Arch based live distro http://fluxcapacity.99k.org
Offline
'acpi -b' gives the correct output, and 'acpi -V' shows BAT0. This gave me some clues, and I downloaded the sources from abs and looked at those relating to the battery plugin.
/fbpanel/src/fbpanel-6.1/plugins/battery/os_linux.c includes the following:
#include <string.h>
#include <ctype.h>
#define LEN 100
#define PROC_ACPI "/proc/acpi/battery/"
which implies that it is looking for battery information in /proc/acpi/battery/BAT0, whereas it is actually in either /sys/class/power_supply/BAT0 and /sys/device/LNXSYSTM/device:00/PNP0A08:00/PNP0C0A:00/power_supply/BAT0 on my machine.
This plugin does not seem to have any configuration options, so it does not seem possible to change the target directory for battery information.
I guess I need to make some changes to the sources, then re-compile, but I am definately NOT a programmer, so I would appreciate any advice on where to go form here.
Last edited by myrlin (2011-11-21 11:36:03)
Offline
That particular path has changed to /sys/class/power_supply. if you change the path in that file and recompile I think you will be good. I know little about C but based on what I do know that line is defining PROC_ACPI so only change the actual path, not the PROC_ACPI.
--empthollow
Check out my Arch based live distro http://fluxcapacity.99k.org
Offline
I'll give it a go and report back.
Just so I'm sure, does the "#" have a diffferent meaning in C, or is this line commented out (meaning that I need to remove it)?
Very many thanks for your help, empthollow
Offline
It is not commented, it is part of the declare statement. Cents in c are somethong like:
// this is a comment
Last edited by empthollow (2011-11-22 01:27:04)
--empthollow
Check out my Arch based live distro http://fluxcapacity.99k.org
Offline
I changed the offending line in os_linux.c,= to /sys/class/power_supply and re-compiled (using makepkg -e), but without success. I still get "Running on AC No battery found"
Does anyone have any other ideas I might try?
Offline
Hi, myrlin
If you still need it, here is the patch fixing this issue. https://bugzilla.redhat.com/show_bug.cgi?id=982593
Offline
Hi Alex,
Many thanks for this.
I had long since given up on fbpanel's battery monitor being fixed, so I disabled it and replaced it with ibamtray as a workaround.
It would be good to have the original working, though, so I will apply the patch when I have time, and report back.
Thanks again for following up on such an old thread.
Offline
If somebody need this plugin yet I applied a patch to the source, here is the source patched and is included a webpage with indications to compile, (sorry webpage is in spanish, but it is easy to undestand) is a nice plugin, it is a pitty that it is not manteined.
regards
Fabian
Offline