# KLaptop problem / battery / ACPI

## schorsch79

hi gentoo users,

i installed gentoo 2.4.20 with vanilla-sources and applied then the patches. i've got a battery meter in kde working, but every time when i log in there's a message box saying, that there are 0:00 minutes left.

does anyone else know how to fix the problem?

thanks!

----------

## ctford0

I have the same problem, would really like to know how to fix it....

chris

----------

## artooman

This is most likely a problem with the Bios.  There are workarounds.  see this thread:

https://forums.gentoo.org/viewtopic.php?t=35891&highlight=battery

----------

## schorsch79

i don't have a dell laptop, i have a hp one. we'll see, maybe 2.4.21 will not have this problem

----------

## ctford0

I have an hp laptop also ze1115 to be exact...

The bios thing could be the problem, but the thing is this laptop doesnt have a bios.  Go figure...

The only thing that I can do in my bios is set the date and time.

Chris

----------

## ctford0

Well, I wanted to throw up my /proc/acpi/battery output so that maybe someone could give me a hint...

```

ctford0@laptop ctford0 $ cat /proc/acpi/battery/BAT0/info

present:                 yes

design capacity:         4016 mAh

last full capacity:      4011 mAh

battery technology:      rechargeable

design voltage:          9600 mV

design capacity warning: 602 mAh

design capacity low:     401 mAh

capacity granularity 1:  201 mAh

capacity granularity 2:  3409 mAh

model number:            QT07

serial number:

battery type:            LION

OEM info:                SANYO

ctford0@laptop ctford0 $ cat /proc/acpi/battery/BAT0/state

present:                 yes

capacity state:          ok

charging state:          discharging

present rate:            unknown

remaining capacity:      3930 mAh

present voltage:         9600 mV

```

I have an idea that this maybe related to the "present rate" being unknown.  Any help would be appreciated.

chris

----------

## fishhead

You might want to make sure that the battery meter uses ACPI and not APM ... I know gkrellm has meters that support ACPI and APM, but not both.

----------

## ctford0

Its definitely acpi, like i said above this computer has no bios...  the only settings i can alter is the date and time.  without acpi this computer is a fire hazard...

chris

----------

## R0B_IX

I also have this problem.  I have a sager 5670 and am running the 2.6.0-test2-mm4 sources.  I have also had this problem with every other 2.6 kernel, as well as a few different 2.4.X kernels.  Any thoughts?

----------

## fishhead

 *ctford0 wrote:*   

> Well, I wanted to throw up my /proc/acpi/battery output so that maybe someone could give me a hint...
> 
> ```
> 
> ctford0@laptop ctford0 $ cat /proc/acpi/battery/BAT0/info
> ...

 

Yea. This means that your hardware does not ACTUALY comply with the ACPI specification - it says that if a battery is rechargeable and discharging, you must set the present rate. You'd think it wouldn't be too hard for vendors to do, but noooooooo. This means that it's pretty much imposible to get a time reading. I'm working on a daemon to do stuff with battery readings, like shutdown when the power is low, so I just finished giving the battery portion of the specification a lookover  :Wink: .

Perhaps you should try using percent full as opposed to time remaining. From the ACPI specification, there is enough information for the program to calculate this ( remaining_capacity  / last_full_capacity).

----------

## ctford0

I've filed a bug report on bugs.kde.org I let you know any outcomes.

chris

----------

## ctford0

Here is the bug report with a proposed fix.  I haven't had time to try it yet, however I would love some info from anyone who successfully gets it working...

http://bugs.kde.org/show_bug.cgi?id=62297

Chris

----------

## Haukkari

I have a Fujitsu-Siemens Amilo D-8820 laptop and since I couldn't find an ACPI script that would run off the command line, I made my own. You can find it from http://hamsu.ath.cx/~haukkari/perl/ -- It might or it might not work with your laptop, it's not very intelligent script and it's not too good Perl code, I think, since I've not programmed with Perl that much. But it gets the job done (on my laptop at least).

----------

## dredd

 *ctford0 wrote:*   

> Here is the bug report with a proposed fix.  I haven't had time to try it yet, however I would love some info from anyone who successfully gets it working...
> 
> http://bugs.kde.org/show_bug.cgi?id=62297
> 
> Chris

 

did this actually help you? and where should you set -1 instead of 0?

----------

