# acpi/battery issues?

## josephg

i'm not sure whether i have battery issues. what can i make of the below?

i usually have my laptop connected to ac, and i see status unknown  :Sad: 

```
$ acpi -i

Battery 0: Unknown, 90%

Battery 0: design capacity 4000 mAh, last full capacity 2134 mAh = 53%
```

if i disconnect power, i see status discharging, which is good  :Smile: 

```
$ acpi -i

Battery 0: Discharging, 90%, discharging at zero rate - will never fully discharge.

Battery 0: design capacity 4000 mAh, last full capacity 2134 mAh = 53%
```

when i reconnect ac again, status becomes charging, which is good again  :Smile: 

and then becomes unknown yet again  :Sad:  perhaps after charging is finished?

each command run few seconds after the previous one.

```
$ acpi -i

Battery 0: Charging, 90%, 00:24:28 until charged

Battery 0: design capacity 4000 mAh, last full capacity 2134 mAh = 53%

$ acpi -i

Battery 0: Charging, 91%, 00:03:56 until charged

Battery 0: design capacity 4000 mAh, last full capacity 2134 mAh = 53%

$ acpi -i

Battery 0: Charging, 92%, 00:03:36 until charged

Battery 0: design capacity 4000 mAh, last full capacity 2134 mAh = 53%

$ acpi -i

Battery 0: Unknown, 93%

Battery 0: design capacity 4000 mAh, last full capacity 2134 mAh = 53%
```

ac is still connected at the end of the last command, and status is unknown  :Sad: 

it seems i only see the correct status, while dis/charging. i want to see all other status too. what am i missing?

----------

## eccerr0r

Probably your ACPI firmware is kind of buggy, not reporting when it's done charging properly and not properly reporting discharge rate (will it fix it self after a minute or so?).

Might have to read "Unknown" as "Idle" and live with the problem that the battery won't charge to 100% ...

And possibly get a new battery, as far as ACPI is concerned, your battery is somewhat worn out.

----------

## josephg

 *eccerr0r wrote:*   

> Probably your ACPI firmware is kind of buggy, not reporting when it's done charging properly and not properly reporting discharge rate

 

i guess so.. how do i fix acpi firmware? i thought linux/kernel took over from the firmware and controlled it itself.

 *eccerr0r wrote:*   

> (will it fix it self after a minute or so?).

 

the status is still "Unknown" after many hours.

```
$ acpi -iV

Battery 0: Unknown, 91%

Battery 0: design capacity 4000 mAh, last full capacity 2134 mAh = 53%

Adapter 0: on-line

Thermal 0: ok, 43.0 degrees C

Thermal 0: trip point 0 switches to mode critical at temperature 110.0 degrees C

Thermal 0: trip point 1 switches to mode passive at temperature 110.0 degrees C

Thermal 0: trip point 2 switches to mode active at temperature 70.0 degrees C

Cooling 0: Processor 0 of 10

Cooling 1: Fan 1 of 1

Cooling 2: Processor 0 of 10

Cooling 3: LCD 7 of 7
```

 *eccerr0r wrote:*   

> Might have to read "Unknown" as "Idle" and live with the problem that the battery won't charge to 100% ...

 

that i can live with.. i know older batteries won't charge to 100%.

seems status shows "Unknown" only when fully charged and Adapter on-line

 *eccerr0r wrote:*   

> And possibly get a new battery, as far as ACPI is concerned, your battery is somewhat worn out.

 

yes my battery is old, but it still has some hours of life. and i'm not sure getting a new battery might fix this issue either.Last edited by josephg on Thu Jun 15, 2017 9:49 am; edited 1 time in total

----------

## eccerr0r

 *josephg wrote:*   

> i guess so.. how do i fix acpi firmware? i thought linux/kernel took over from the firmware and controlled it itself.
> 
> 

 

You'd need to get info from the HW manufacturer to truly fix.  If a f/w update for your machine isn't available it would be quite difficult.  Linux actually has an ACPI interpreter to run the ACPI code in your firmware.  You can override it and use your own ACPI data, but without info about the specific hardware and how it's hooked up, it may be hard.  Are there any ACPI errors showing up in dmesg during boot?

 *Quote:*   

>  *eccerr0r wrote:*   (will it fix it self after a minute or so?). 
> 
> the status is still "Unknown" after many hours.
> 
> ```
> ...

 

This is during charge/idle, which was determined to be faulty.  What about discharge rate... or does it stay unknown until the battery goes flat?  I know some machines take several samples before it reports the discharge rate, and reports 0 or unknown until enough data is collected.

----------

## josephg

 *eccerr0r wrote:*   

> You'd need to get info from the HW manufacturer to truly fix.  If a f/w update for your machine isn't available it would be quite difficult.  Linux actually has an ACPI interpreter to run the ACPI code in your firmware.  You can override it and use your own ACPI data, but without info about the specific hardware and how it's hooked up, it may be hard.

 

this is an old laptop.. toshiba a300. that manufacturer is probably a lost cause.

 *eccerr0r wrote:*   

> Are there any ACPI errors showing up in dmesg during boot?

 

is this what you're looking for?

```
$ dmesg -l err,warn | grep -i acpi

[    3.504400] ACPI Warning: SystemIO range 0x0000000000000428-0x000000000000042F conflicts with OpRegion 0x0000000000000400-0x000000000000047F (\PMBA) (20160831/utaddress-247)

[    3.504410] ACPI Warning: SystemIO range 0x0000000000000530-0x000000000000053F conflicts with OpRegion 0x0000000000000500-0x000000000000053B (\GPIO) (20160831/utaddress-247)

[    3.504417] ACPI Warning: SystemIO range 0x0000000000000500-0x000000000000052F conflicts with OpRegion 0x0000000000000500-0x000000000000053B (\GPIO) (20160831/utaddress-247)

```

 *eccerr0r wrote:*   

> This is during charge/idle, which was determined to be faulty.

 

status is "Unknown" only when charging is complete, and still connected to power.

 *eccerr0r wrote:*   

> What about discharge rate... or does it stay unknown until the battery goes flat?  I know some machines take several samples before it reports the discharge rate, and reports 0 or unknown until enough data is collected.

 

as soon as i disconnect power, acpi reports battery status correctly.. i can steadily see the charge going down to 0% and kaput.

when i reconnect power, acpi again reports battery status correctly.. i can steadily see the charge% increasing till fully(?) charged when the status becomes "Unknown" again.

```
$ acpi -iV

Battery 0: Discharging, 97%, 00:51:05 remaining

Battery 0: design capacity 4000 mAh, last full capacity 2134 mAh = 53%

Adapter 0: off-line

Thermal 0: ok, 64.0 degrees C

Thermal 0: trip point 0 switches to mode critical at temperature 110.0 degrees C

Thermal 0: trip point 1 switches to mode passive at temperature 110.0 degrees C

Thermal 0: trip point 2 switches to mode active at temperature 70.0 degrees C

Cooling 0: Processor 0 of 10

Cooling 1: Fan 1 of 1

Cooling 2: Processor 0 of 10

Cooling 3: LCD 7 of 7
```

----------

## josephg

seems to be sys-power/acpi or related quirk. also affects i3wm. xfce/ubuntu, lxqt/debian, gnome/debian-live systray battery icons correctly show charging complete.

----------

## eccerr0r

It probably just makes the assumptions of the condition...

I think there's enough information there to deduce the status even though it's aesthetically incorrect?

----------

