Topic: [Resolved]Conky battery status shows wrong

Hi I got this in my concky rc file:

Battery: ${battery_percent BAT0}% ${alignr}${battery_bar 8,60 BAT0}

Machine is a HP 6910P.

On desktop battery shows 0% always.
I got one battery only.

Can someone point me in right direction to fix this small issue?

Thanks in advance
/j

Last edited by janne5011 (2009-01-21 18:38:35)

2 nas nslu2 debian arm runs a online wheaterstation
one HP 6910 #! -DELL 4100 ubuntu server
one old  dualnas grmbl-popcornhour and dlinkDSM320rd
http://3secs.ownit.nu/ws.html

Re: [Resolved]Conky battery status shows wrong

Can you post what you get when you run this in the terminal?

acpi -b
All in an effort to learn...
Delves deeper into code...

Re: [Resolved]Conky battery status shows wrong

That should work hmm

Does it change when you are running on battery power? Mine shows 115% whilst on mains power, then displays correctly when on battery....

Arch64/Xmonad | @mo6020 on Identica

"Every normal man must be tempted at times to spit on his hands, hoist the black flag, and begin to slit throats." - H. L. Mencken

Re: [Resolved]Conky battery status shows wrong

look in your /proc/acpi/battery directory. you may need to put BAT1 instead of BAT0 even if you only have one battery

I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Re: [Resolved]Conky battery status shows wrong

I remember that ${battery_time BAT0} would never display a correct time. It would always show "unknown".
So what I did as a workaround, was made a script call "acpi -b" and used sed to get the time left.
If you like, I can make a modified script for your case.

All in an effort to learn...
Delves deeper into code...

Re: [Resolved]Conky battery status shows wrong

Just had the same issue on my missus's laptop

If you go to /proc/acpi/battery like iggykoopa said, and then look for folders within there

mine where C1C4 and C1C5, if you look in the 'state' file one will be filled with info, and that folder name is then your battery name

example: 

battery_percent C1C5
Asus 4G EEE - Crunchee
Dual Core watercooled - Crunch and Xubuntu
2 x Nas with 2tb storage - FreeNas
1x Compaq hp - Xubuntu

Re: [Resolved]Conky battery status shows wrong

output acpi -b:
Battery 0: Discharging, 96%, 00:02:30 remaining

when dc is off it still:: shows 0%

In /proc/acpi/battery I have 2 folders I looked but I cant see any hint of bat0 or bat1. theres 3 files alarm,info and state

2 nas nslu2 debian arm runs a online wheaterstation
one HP 6910 #! -DELL 4100 ubuntu server
one old  dualnas grmbl-popcornhour and dlinkDSM320rd
http://3secs.ownit.nu/ws.html

Re: [Resolved]Conky battery status shows wrong

janne5011 wrote:

Battery 0: Discharging, 96%, 00:02:30 remaining

O.o Yeah. Something is wrong if you only have 2 minutes left @ 96%.

Then what folders do you have in /proc/acpi/battery ?

You can try cat /proc/acpi/battery/%foldername%/state where %foldername% is one of the two folders that you have in /proc/acpi/battery

All in an effort to learn...
Delves deeper into code...

Re: [Resolved]Conky battery status shows wrong

n1ick thanks that solved it. smile

thanks all

(missed your post last time)

Last edited by janne5011 (2009-01-21 18:27:40)

2 nas nslu2 debian arm runs a online wheaterstation
one HP 6910 #! -DELL 4100 ubuntu server
one old  dualnas grmbl-popcornhour and dlinkDSM320rd
http://3secs.ownit.nu/ws.html