[SOLVED] AwesomeWM Battery Meter

Hello all,
I've been rewriting my rc.lua on my netbook for Awesome, and my head is probably just drawing a blank, but I'm having a problem getting the battery meter to show something other than 0% Battery.
This is the code for my vicious widget:
http://pastebin.com/Bt60surG
and I do have the widget showing, it's just always red and says 0%.
I have the acpi package installed, and it works through terminal, and starts on boot, wasn't sure if it was necessary though.
like I said, probably overlooking something, but I have been hacking at it for a couple hours, searching around and what not, and I was like "yeah... forum time" Lol
So yeah.. Any ideas?
Last edited by themattbeballin (2011-11-12 22:49:44)

anrxc wrote:Default battery widget reads /sys/class/power_supply/<your battery ID>. Check that you have provided the correct ID.
If you did get it right check that the data in that directory is complete. Does "present" file contain 1? Does "charge_now"
contain a charge other than 0? If not you could get support for your battery from /proc with batproc widget or worst case
from batacpi widget that uses acpitool. But likely that is not the case, most likely you got the ID wrong.
Wow. That fixed it... When I was looking at it... ACPI was reading BAT0 but /proc was saying BAT1.
Worked. Thanks!

Similar Messages

  • How can I recalibrate or reconfigure my Treo Pro's battery meter ?

    Hello ! I've got a problem with my Treo Pro and I'd like to get more information about the solution.
    I've bought a new extended battery (2400mAh). It works very well, but my phone's battery meter doesn't give me correct datas about charging level of the extended battery. I've heard about the same problem on other forums from other people who use extended batteries. Independent on the manufacturers, they have the same problem with their Treo Pros. Please, help me. We have to use extended batteries, because the Palm's original battery (I think it is a 1500mAh) isn't fit to anything (my 1 month old phone works with its original new battery for a 3 days). My phone works very well with the extended battery for about 6 days. During this period in the first 3 days the battery meter runs from 100% to 0%, remain on 0% in the next 3-4 days until it depleptes and it annoy me with its messages (please charge the battery avoid losing datas and so on).
    So I'm searching for any registry hack, recalibrate phisical methods, idea or any other way to reconfigure the battery bar. Please, help me or give me more information about the developer's e-mail or developer's forum.I'd like to solve this problem.
    Thank you for your help.
    Post relates to: Treo Pro T850U (Unlocked)

    iOS: Using FaceTime

  • Lying Battery Meter...any suggestions?

    Hi,
    I have a silver 2nd Gen iPod mini, 8 months old. Its battery meter lies to me. For example, once, it said that it was almost full; but it died after 10 minutes of usage, and when I turned it on, the battery icon came up and the screen read "please connnect iPod to power." how would I solve this problem? any suggestions welcome
    thanks

    oh..ic..
    but is the latest updaters reliable? because I've came across many posts where owners of all iPods were outraged by the new updater...I personally had some trouble with it too, but I got it all sorted out.
    By the way, this lying meter has been doing this since when I got it (I'm sure) but I've only started paying attention in the past 4 months. I've done several updates to the iPod since when I got it, and its still lying...but I'll try the latest updater again.
    thanks

  • Battery meter haywire

    Today, I was using my iPhone 3GS (3.1.2) regularly and I eventually found myself down to 11% by mid-afternoon (under this exact same usage per day, I am often around 60%).
    I shut off my iPhone, and turned it back on, thinking this would solve the problem but it did not. Next, I plugged it into my charger and watched it charge rapidly to 19% within 2 minutes. Then, I disconnected it and played some music and it stayed at 19% even after five minutes of music playing (which is a good sign since a full charge should net 30 hours of audio playback).
    I plugged it back into my charger and right in front of my eyes, I saw the battery meter jump from 19% to 55%. Instantaneously.
    Is there a physical component of the battery meter gauge that could have gone bad? Is my battery going bad, after only a few months of use?

    I'm not going to discount the "you have a bad battery" or "You have push applications draining the battery" theories. However, if the iPhone is not getting physically warm to the touch, then I'd discount the high-drain theories.
    I've had battery gauge wierdness myself, with the % available plummeting very rapidly down to single digits, then *staying there* for hours.
    In my case, this happened not long after I'd completely discharged the phone, then had a failure to re-start during the mandatory 10-min waiting with low battery sign as it was plugged in. I got a white-screen boot, which a hard reset (hold power and home button) fixed. But after that, battery gauge wierdness...
    In my case, I did a restore-from-backup as a new phone with firmware reload, and then did a couple of complete charge-discharge cycles, and now the gauge is behaving relatively sanely.
    I hypothesise that something in the firmware "learns" the battery charge characteristics and uses that to display percentage remaining, and that whatever code / data is associated with this is vulnerable to "mis-learning" or corruption.
    In short: I don't think the battery gauge is always correct, but I don't think that this actually affects the battery life you get out of the phone too much.

  • Battery meter not registering correct power remaining?

    I have an iPhone 3G 8GB, it has been working fine until recently. Yesterday, I charged it over night and the battery meter was at full green. I had used it a bit throughout the day. I got a phone call around noon and suddenly the phone shut off and showed the battery in the red with the "charge" symbol below it. I plugged it in and charged it back to 100%. This morning, I've already used the phone quite a bit and the bar is still at full green, which is very unusual. I have powered off a few times to see if that worked to get the meter to read correctly and it still shows full charge.
    Is there anything I can do to get it to show the correct battery life again?

    Do you have an exchange account set up? If yes, delete it and set it up again.
    Try to restore the phone "as new iphone" to make sure no corrupt data is copied back and see if this solves the issue. If not, you'll have to see your next Apple Store or call Apple to get it serviced.

  • Frozen battery-meter and clock

    Every now and then (quite often, actually) - the menu-bar at the top of my screen freezes - making the clock stop and the battery-meter freeze. This means from time to time I have no idea that my battery is running out of power, and the macbook suddenly shuts down! The last time this happened it went on for about 3 hours without being able to update the battery-meter or clock!
    What can I do?

    I was able to figure out the cause and solve this issue on my end.
    I opened Activity Monitor and saw "SystemUIServer (Not Responding)", so I looked up process:
    http://guides.macrumors.com/SystemUIServer
    Apparently, SystemUIServer manages the 'menu extras' on the upper right-hand side of the menu bar. There was also this other useful tidbit of information:
    "A bad hardware state may cause the SystemUIServer to hang. Often, unplugging the external device will unhang the SystemUIServer"
    "The SystemUIServer is owned by the logged in user (as opposed to root) and automatically restarts if it crashes or is force quit."
    I had recently started using on of my older iPods again, so I guessed that maybe it was the device in a "bad hardware state", so I unplugged iPod (super old 3rd gen 15 gig...formatted originally on Windows...back when I was a PC)
    Right away the SystemUIServer process unfroze in Activity Monitor and the upper right hand menue items are no longer hanging.
    So my advice to others with this problem is to unplug devices from USB (iPod, etc...) and see if it eventually unfreezes.
    I've seen iPods hang Mac OS during bootup as well, but this is a new one for me.

  • Why is the battery meter so annoyin?

    Ok heres the thin, i got my 5g black 30gig ipod two weeks ago...everythin was fine, until after the first full charge i noticed after about an hour of music the battery meter was down to 3/4 of a charge and kept goin down dramatically, after reading some of the disscussions i did the update and charged it untill it said full, so then after about 4 1/2 hours its in the red, so obviously it still goes down quite fast, to calibrate it at the moment by runnin it till dead, so has anybody else had this problem, and what happened to you....another thing what is the best way to charge it...through an ac adapter or computer.

    ok...using my ipod normally (between .5 and 1 hour a day right now) the battery lasted about 8 hours....so it ran for 3.5 hours in the red...this is really dissapointing although it says that it will run 8-12 hours, but also realizing that was the first time doin a charge discharge cycle to try and calibrate it but after charging it the meter is doin the exact same thing...after fully chargin it, the second i start playin music the meter goes down...now the backlight timer is 2 seconds, the eq is off, and the library is on shuffle...and i only change songs once in a while...so why am i only gettin 8 hours?

  • Battery meter reads only 0-1%, or 99%.

    OK, well this a little hard to explain but I'll try my best:
    Basically, one day a couple weeks ago I took my PowerBook to school and had it in class and basically drained the battery completely to 0%, managing to still continue working about 30-35 minutes after reading 0%. OK, so it powers itself off and goes to sleep. Understandable. I put it away and charged it back up at home later that night.
    The problem now is that the battery meter up at top no longer gives me accurate readings on the battery. When the battery has been charging for about as long as it usually would take for it to say 100%, it stays at like 2%. Sometimes, it'll just jump right from 1 all the way to 99%. Ok, like right now it said 2% but now went to 1% even though the AC adapter is still connected and the light has remained on. I have not seen the percentage say anything between 3 and 98% ever since the day I used it in class. It will go from 0-2%, then occasionally to 99% and back to 2, 1, 0. To make this problem seem even a little more strange, before this problem started showing, the computer would rarely start itself up again in the morning without being plugged into the wall first. Essentially, it would become "cold" overnight, and I'd have to plug it in first to the wall to start up. NOW, this thing always wakes up from sleep in the morning or basically whenever no matter how little battery life I think it has.
    I got my computer in Jan/2004 and it still has the original battery. Needless to say, I was already getting some pretty short battery life. I'm not sure what the proper procedure on batteries in these things are, if I should have replaced it by now with a new one?
    HELP!
    --DANIEL
    (FYI, the meter has now been stuck back at 2% for about the last 10 minutes.)

    Try resetting the PMU…
    http://docs.info.apple.com/article.html?artnum=14449
    … and then subsequently calibrating your battery…
    http://docs.info.apple.com/article.html?artnum=86284

  • 2.1 firmware update displays incorrect battery meter

    After installing firmware 2.1 on my iphone I started noticing my battery meter displaying the incorrect charge level. I charged it in full yesterday, and this morning I still had more than half the battery meter. I checked 10 minutes later and the meter was now showing 10% left with the red battery meter.
    I went ahead and charged it again , used it for a while and now noticed that the battery meter is not only showing the incorrect amount left (still) but shows a different battery status on different menu screens. Shows battery meter to be full in the home screen and half the meter on an app, email ,etc.
    Firmware 2.1 has definitely messed up the meter!
    inaccurate reading on the battery meter , someone else has to be experiencing this same problem.
    let me know if someone else has this same problem !

    try draining out the battery first and then recharge it, see if that shows an accurate. I had that happen to me on the 2.02 update. The battery meter was inaccurate. Like when i reached 20% it was actually at 50% when i plug it in to charge. So i did sent them a feedback about it. So I'm hoping that the 2.1 fixes this issue. So far my battery is showing at 100%.
    Usually for me at the end of the day after a full charge in the morning, the battery meter would go down 1 bar. So i'll have to wait and see.

  • IOS 4.1 on 3G - Battery Meter Wrong

    Has anyone had problems with the battery meter after updating to 4.1? The meter is correct while discharging, but not while charging. To get an accurate reading after a charge, the only solution I've found is rebooting the phone. I've tried several times with the same result. Also, I've tried draining to see if recalibration was needed or something. Any help would be appreciated.

    Greetings,
    There is likely no issue with your phone/software, other than you may need to calibrate the meter. That old phone can have a meter go out of calibration with the installation of iOS 4.1, especially if you are going straight from 3.13.
    All you have to do is to charge it up overnight, then run it down all the way until it shuts itself all the way off, not just go to sleep. After that let it rest a half hour or so, and fully charge it, without using it. It's best to plug it in, and then do a full shut down, and let it charge fully. The meter should be in calibration, after that.
    I've seen some folks have to do this a couple of times, if they continually short charge it, but once is usually enough.
    I wouldn't pay too much attention to what the meter says while it's charging, as other things are going on that will make the meter fluctuate a bit, since it's on.
    Cheers,
    M.

  • Ibook g4 that does not  display the battery meter, sound volume, tim

    I have an ibook g4 that does not display the battery meter, sound volume, time & day.When i move cursor over the area where they should be I see a spinning beach ball beach ball

    Choose Go to Folder from the Finder's Go menu and enter ~/Library/Preferences/ as the folder's path. Locate the item named com.apple.systemuiserver with or without a plist at the end, and drag it to the desktop.
    (10471)

  • Does anyone know the name of the app to change my battery meter etc.

    I cannot remember what it was called but someone told me that i could personalize my battery meter his was a pitbull that changed colors . can anyone help pls ?

    i think it is a hack app. or something like that .

  • Time, airport, battery meter will not display.

    Hey I have an ibook g4 that does not want to display the battery meter, sound volume, time & day. for some reason. I have looked all over system prefs and got nowhere fast. If someone can let me know whats up...please do. I have tried to right click over it and everything. thanks.
    -@

    I'm not interested in ascribing blame either but waiting for Apple to fix something that isn't broken will only divert attention from seeking the problem's underlying cause. Assuming the AirPort Utility app on your Mac remains unaltered, it's exactly the same one everyone else is using. Should there be any doubt about that, reinstalling OS X will obviate any concern.
    I suggest the following for you to consider as you deem appropriate.
    Apple's Wireless Diagnostics may supply some additional helpful information.
    To use it, hold an option key while you click your Mac's Wi-Fi icon, and choose Open Wireless Diagnostics...
    The following authentication dialog will appear:
    Authenticate with your Admin password, then click the Continue button in the following:
    The network analysis and diagnostic tests will take several minutes to complete:
    When it completes, if your wireless network is functioning properly the following will result:
    If something is amiss, supposedly the results will be different and you will be presented with helpful information.
    Assuming your connection is "working as expected" select Continue to summary and click Continue:
    Ignore the pre-populated text field, which is provided as a place for you to type in additional information should Apple ask for it in the course of obtaining technical assistance from them. Apple has no way of knowing where your router is located in your home, and certainly doesn't know if you even have an upstairs bedroom closet.
    Click Continue.
    The next step will also take a few minutes:
    When it finishes, you will be presented with a summary that may or may not be useful to you. Let me know if it is.
    The WirelessDiagnostics-xxx.tar.gz file deposited on your Desktop can be dragged to the Trash, or you may wish expand it and examine its contents. It's up to you.

  • What does the circled lock icon represent next to the battery meter?

    What does the circled lock icon represent.  It's located next to the battery meter.

    Page 12 and 13 of the iPhone user guide.
    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf

  • Clamshell - battery meter problem?

    Somebody has to be able to explain this one to me...
    I bought a used graphite 466 to hold me over until I can save up for a brand new laptop. It was running like a dream, at least until...
    I turned it on one morning, as I usually do... and the battery meter was acting really weird... I still got my 4 hours of use out of it, but the meter very slowly ticked down to about 95%, then took a huge nosedive down to just 5% in an instant... I was forced to run off the adapter until my class was finished, and I brought it home...
    I was at home, adapter hooked up so I could recharge it while I continued using it. The charge slowly crept up to maybe 9 or 10%, then jumped straight to fully charged. That was the point where I realized something was very wrong... so I scoured the support pages, and the discussions, to try to find something that matched what was happening with mine.
    I did the PMU button, reset the NVRAM through open firmware... I even let the battery run down fully and took it out of the laptop for the night...but there was no change...
    Next, I decided to download one of those programs to check the battery... and either I'm very confused, or the numbers just dont add up.
    According to XBattery, my battery stats right now (fully charged and running off the adapter) are:
    installed: yes
    charging: no
    charger: yes
    battery %: 100
    (so far, all makes sense... what a fully charged battery should say, I would think... but then it gets weird)
    Max. cap: 3.600Ah
    Curr. cap: 64.860Ah
    Charge: 64.860Ah
    (this part makes me think maybe the labels for these numbers are mixed up somehow... how could my current capacity be that far above the max?)
    voltage: 16.858v (the adapter itself says it should be 18v, but this is close enough)
    amperage: 0 (it's not currently drawing any power from the battery... i guess?)
    cycles: 80 (charge cycles, I guess...sounds way too low for it to be a battery problem... )
    Flags: 2d000005 (no clue... I'm sure they mean something, but I don't know what...)
    Now, I'm no expert as to what all those numbers really mean, but my impression is that it's not a battery problem per se....
    Anybody have any idea what's wrong with my machine? Is there something simple that I'm missing here?

    I ran a terminal command to show my battery information:
    "IOBatteryInfo" = ({"Capacity"=64860,"Amperage"=0,"Cycle Count"=90,"Current"=3363,"Voltage"=16415,"Flags"=754974725,"AbsoluteMaxCapacity "=3600})
    While I'm no expert, I think I have at least some grasp of what it's saying...
    Capacity is 64860mAh, which XBattery lists as 64.860Ah... different units, same thing...
    Cycle Count is now up to 90... that's fine... I've charged and discharged a few times since last time I checked the count...
    Amperage is at 0, even though the menu says it's charging... not sure how that is true...
    Voltage is 16.415... not too far off from the 18v listed on the outside of the power adapter... that's acceptable...
    For the flags, 754974725 in decimal is the same as 2d000005 in hex, which matches XBattery...
    The part I don't get is... if I'm showing a charge of 3363 out of a max of 3600, why is it only at 5%? The only way it could be was if it was comparing the charge to the current capacity... 3363/64860, which is about 5.2%...
    For some reason, the computer is not giving it more power, because it's so close to that 'assumed' capacity... 3600 space left on a 64860 battery, which would be around 95% charged... and that's before counting the 3363 I 'persuaded' the battery to accept... But when it checks capacity after I unplug the adapter, it is nowhere close to what the machine was 'assuming' while the adapter was connected...
    I would think my computer (or any computer for that matter) would be smart enough to at least pose the question as to why the 'max capacity' is so far below the 'current capacity'... It's like saying 'This basket holds 36 apples maximum, but currently, it's holding 640+ apples... it doesn't really make much sense... There is no situation in which both statements could EVER be true for that one single basket, or my battery in this case...
    You'd think an error screen would pop up or something: "The battery is currently sending unreliable and conflicting capacity data, so therefore, time and charge percentage are unable to be calculated in any reliable fashion..." Then it should instruct me on what to do to correct it... Or, at the very least, suggest that I call for assistance... right?
    This issue has evolved from weird to downright annoying... I just wish I knew what the real problem was so I could fix it already!

Maybe you are looking for

  • Issue with my podcast not updating to subscribers

    Hi, I recently took over podcast duties for our podcast.  And around a month before I took over (mid-march)  I began recieving complaints that the podcast wasn't updating to subscribers.  It seems to be mostly from people using the IOS podcast ap.  I

  • Hi i installed wrong iousbfamily on osx and now my login screen is frozen, keyboard and mouse not working plz help

    hi i installed wrong iousbfamily on osx and now my login screen is frozen, keyboard and mouse not working plz help

  • 8i Enterprise on NT4 Workstation

    We can install 8i Enterprise (8.16) on an NT4 server, but so far, all our installs on Workstations (256 meg, 12 gig HD, SP 5 and 6a) to support OWB (Warehouse Builder) have disappeared during the install with no errors in the log (it stops after it b

  • Procedure or function

    Hi! My description might not be clear at first sight, but I will try to explain: Introduction: We have a master flight information table that stores information about each flight including the flight date, i.e. Flight master table Flight_no From Leav

  • Problems with Timecode in FCP

    Hi there, It's 2 am and Im stuck at my edit suite trying to recapture some footage which was shot in HDV 1080i60i, I've captured all the tapes in DV NTSC and am now trying to Online the footage in UNCOMPRESSED 10 bit but apparently some of the footag