You are not logged in.

#1 2011-11-19 16:46:35

myrlin
Member
Registered: 2010-06-11
Posts: 267

Fbpanel Battery Plugin

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

#2 2011-11-20 07:15:19

empthollow
Member
Registered: 2009-09-26
Posts: 168

Re: Fbpanel Battery Plugin

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

#3 2011-11-21 11:29:54

myrlin
Member
Registered: 2010-06-11
Posts: 267

Re: Fbpanel Battery Plugin

'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

#4 2011-11-21 15:22:54

empthollow
Member
Registered: 2009-09-26
Posts: 168

Re: Fbpanel Battery Plugin

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

#5 2011-11-21 17:20:56

myrlin
Member
Registered: 2010-06-11
Posts: 267

Re: Fbpanel Battery Plugin

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

#6 2011-11-21 17:51:23

empthollow
Member
Registered: 2009-09-26
Posts: 168

Re: Fbpanel Battery Plugin

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

#7 2011-11-22 12:07:57

myrlin
Member
Registered: 2010-06-11
Posts: 267

Re: Fbpanel Battery Plugin

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

#8 2014-01-07 00:18:36

chekmarev.alex
Member
Registered: 2014-01-07
Posts: 1

Re: Fbpanel Battery Plugin

Hi, myrlin
If you still need it, here is the patch fixing this issue. https://bugzilla.redhat.com/show_bug.cgi?id=982593

Offline

#9 2014-01-07 11:18:55

myrlin
Member
Registered: 2010-06-11
Posts: 267

Re: Fbpanel Battery Plugin

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

#10 2015-09-06 03:40:05

faber235
Member
Registered: 2015-09-06
Posts: 1

Re: Fbpanel Battery Plugin

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

https://drive.google.com/file/d/0ByTsbD … sp=sharing

Offline

Board footer

Powered by FluxBB