# My battery info and battery not reporting what I want

## LIsLinuxIsSogood

Hello,

Working to try and figure out why the battery is only reporting 95% power and stuck after that.  I don't want to test again right now, but I will, which is how fast it goes to 0 and powers off...maybe i will just let it go down for 30 minutes and report back.  

Also, I am curious to know why if the kernel supports acpi battery functions that I do not see the battery status information anywhere in the /proc filesystem.  What's up with that?  Why do I have to go digging deep into the /sys/class/.../../.. to find this information I thought that was somewhat of an outdated tool to go finding the information that I found.  Anyhow, please advice...i am not sure what triggered the problem to start, but I do know that there is a lot of stuff recently changed on my laptop.

However, when looking up this kind of information in a basic google search what I found was situations of another person who complained about this, couldn't get support to fix it, and then the problem went away (on its own.)  

My own expectation would be to try and determine definitively if this is something wrong with the kernel, laptop, battery, or whatever else it could be.

----------

## LIsLinuxIsSogood

I am on HP Pavilion Notebook 17-g053us, with 8GB RAM

Power

45W AC adapter

4-cell 41WHr 2.8Ah lithium-ion battery

those are the power specs from HP website for my laptop

HERE'S THE RESULT OF THE LAST HALF HOUR...

After running on battery power, it only drained the battery to 73.77% not bad right?  Wrong.  Because now that ac adapter says online, it does not look like it going up at all for the last 5 minutes.  I will set another timer though for 10 mintes and make sure.  But this is just really annoying, and I would like some help if possible.  Either to test the hardware side or maybe run some program that could search through the data in the linux OS to make sure it is reporting everything is ok with the battery as far as it knows.  Obviously there isn't anything in the kernel that does the following already, or else I would just be dealing with it:  being aware of when the battery (at least according to linux) is not moving and it is connected to the ac power source.  This would be less a problem if it was at full charge but it is staying somewhere at the <100% level, which like I said annoys me for that matter, why shouldn't linux have a way of tracking every little move...acpitool is just not doing it for me right now.

 *Quote:*   

> playby /etc/acpi/events # acpitool -B
> 
>   Battery #1     : present
> 
>     Remaining capacity : unknown, 73.77%
> ...

 

----------

## R0b0t1

 *LIsLinuxIsSogood wrote:*   

> Hello,
> 
> Working to try and figure out why the battery is only reporting 95% power and stuck after that.  I don't want to test again right now, but I will, which is how fast it goes to 0 and powers off...maybe i will just let it go down for 30 minutes and report back.

 Hello! Like yourself, I had this issue on one of my devices. I never found a solution.

 *LIsLinuxIsSogood wrote:*   

> Also, I am curious to know why if the kernel supports acpi battery functions that I do not see the battery status information anywhere in the /proc filesystem.  What's up with that?  Why do I have to go digging deep into the /sys/class/.../../.. to find this information I thought that was somewhat of an outdated tool to go finding the information that I found.

 It is my understanding that /sys is the new method. Drivers expose information as plain text in /sys as opposed to a program needing to interpret the output of a character device in /dev, or doing something stranger. New tools may simply read /sys, and from my looking at how things work in experimental window managers this is typically what they do. It allows end users to add support for their hardware to their desktop environment's widgets easily as drivers are written for that hardware.

 *LIsLinuxIsSogood wrote:*   

> Anyhow, please advice...i am not sure what triggered the problem to start, but I do know that there is a lot of stuff recently changed on my laptop.
> 
> However, when looking up this kind of information in a basic google search what I found was situations of another person who complained about this, couldn't get support to fix it, and then the problem went away (on its own.)  
> 
> My own expectation would be to try and determine definitively if this is something wrong with the kernel, laptop, battery, or whatever else it could be.

 I would suggest going to the kernel mailing list and giving them more or less the summary you posted here, or trying to contact the developers for the desktop environment you are using. Try to explain your situation, that this may not be the most appropriate place, and that you hope to be forwarded to someone who can help you. With your experience, the person you found's experience, and my experience, I think there is good evidence of a persistent bug or a regression.

It is entirely possible that someone will show up with extremely specific information and solve your problem, but most questions like this seem to go unanswered on this forum. Sometimes it is simply best to wait, as the people who can solve your problem are aware of it and already fixing it. I would suggest it's a good idea to make sure they're aware of it if you have the time.

----------

## cwr

I put together a rough-and-ready script to check power levels:

```

#!/bin/dash

# $Desc: Show current battery data (Thinkpad) $

CURRENT=`cat /sys/class/power_supply/BAT0/energy_now`

FULL=`cat /sys/class/power_supply/BAT0/energy_full`

DESIGN=`cat /sys/class/power_supply/BAT0/energy_full_design`

STATUS=`cat /sys/class/power_supply/BAT0/status`

echo    "Status:             "$STATUS

echo -n "Energy now - Ah:    "

echo scale = 2 \; $CURRENT / 1000000 | bc

echo -n "Energy full - Ah:   "

echo scale = 2 \; $FULL / 1000000 | bc

echo -n "Energy design - Ah: "

echo scale = 2 \; $DESIGN / 1000000 | bc

#

echo -n "Capacity - percent: "

echo scale = 2 \; 100 \* $FULL / $DESIGN | bc

echo -n "Charge - percent:   "

echo scale = 2 \; 100 \* $CURRENT / $FULL | bc

#

# eof

#

```

though the battery status generally comes from the Upower daemon.  The panel

app using upowerd, however, is specific to Gnome.

Will

----------

## LIsLinuxIsSogood

Thanks for the script I will surely put it to use when trying to forego a real answer for now, about the root cause of the issue which could be ANYTHING I REALIZE.  

Question, does the script work out of the box, with no "modifications" , I just glanced but saw some large numbers in there (assuming that those are just decimal notation ha, nice)/

----------

## LIsLinuxIsSogood

 :Confused:  The situation seems to have gotten much worse - but before I spend almost $50 on a new battery to replace with an OEM part from hp (wow what a serious rip off)...I would like to know is that a good idea to go about ordering a battery when the cause of the problem with this laptop (less than 2 years old) having a recent battery problem unknown?  I don't want to spend the 50 and then find out that the OS or the kernel or something is basically telling my battery something like "it's ok to break, no problem...we'll just replace you after another year or two"...  :Question: 

Thanks for the advice!

this is what it says when it is plugged in!!!!!! ahhhh...

 *Quote:*   

> jonr@playby ~ $ acpitool -B
> 
>   Battery #1     : present
> 
>     Remaining capacity : unknown, 0.00%
> ...

 

----------

## cwr

The last time I saw readings like that the battery controller chip had blown;

the  battery was (of course) just over a year old and so out of warranty.

Can you try it in another computer?

Will

----------

## LIsLinuxIsSogood

Maybe i can, if i can find another laptop, what do you do about a blown chip (does it get difficult to repair that in terms of cost or labor)?

----------

