You are not logged in.

#1 2009-01-18 22:40:01

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

Battery monitors doesn't update

Hi all.

So, here's the deal. Running a fully updated Arch on a Acer Travelmate 4501LCi and having issues with every battery monitor I try out. I've been having this issue almost for as long I've been running Arch on it. Theissue is that the power level only gets updated when the AC plug is inserted or removed, which, needless to say, isn't useful at all. So far I haven't been able to figure this out or find a solution. Any help would be appreciated. I'd be happy to supply any additional information, just let me know.

Cheers

Last edited by ndlarsen (2009-01-18 22:40:17)


I made it long
as I lacked the time to make it short...

Offline

#2 2009-01-18 23:12:48

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Battery monitors doesn't update

Does acpi command return the correct value (you may have to install "acpi" package)?  If not then it's likely a hardware/kernel issue.  It could be also a sign that your battery is almost dead.

Offline

#3 2009-01-19 10:21:58

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

Re: Battery monitors doesn't update

I appreciate your reply.

I believe the battery is fine. The acpi package is installed and have been for quite some time. Output of acpi only updates when AC is either plugged in or out.


I made it long
as I lacked the time to make it short...

Offline

#4 2009-01-19 10:28:09

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: Battery monitors doesn't update

Monitor the file /sys/class/power_supply/BAT1/energy_now file (perhaps your battery is BAT0 or BAT2, adjust the path accordingly). Is it updated only on the AC event? If so, this is either a hardware or a kernel problem .If it works with windows or a BSD it could be a kernel bug, otherwise probably an hardware problem.


Mortuus in anima, curam gero cutis

Offline

#5 2009-01-19 10:42:47

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

Re: Battery monitors doesn't update

I appreciate your reply.
Just checked on windows and latest kubuntu, works as intended. There is no file named energy_now in neither /sys/class/BAT0 nor /sys/class/BAT1 (BAT0 being the correct one). Perhaps it's related to this bug report?

Last edited by ndlarsen (2009-01-19 11:05:26)


I made it long
as I lacked the time to make it short...

Offline

#6 2009-01-19 11:11:27

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: Battery monitors doesn't update

Just be sure to look in /sys/class/power_supply/<batteryname>, not directly in /sys/class/<batteryname>. Look also for /proc/acpi/battery/<batteryname>/state. If none of these files exist, verify that the battery module is loaded with lsmod.
The bug you mention should not affect something lowlevel as the acpi command or the files in /sys and /proc, since - luckily - they do not rely on hal.


Mortuus in anima, curam gero cutis

Offline

#7 2009-01-19 11:36:18

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

Re: Battery monitors doesn't update

I appreciate your reply.

It was a typo, I meant /sys/class/power_supply/BAT0/

$ ls /sys/class/power_supply/BAT0/
alarm               charge_now   manufacturer  status      type
capacity            current_avg  model_name    subsystem   uevent
charge_full         current_now  power         technology  voltage_min_design
charge_full_design  device       present       temp        voltage_now
$ cat /proc/acpi/battery/BAT0/state 
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            863 mA
remaining capacity:      1763 mAh
present voltage:         15792 mV

The info above still only updates on AC events

$ lsmod | grep battery
battery                12036  0

cheers

Last edited by ndlarsen (2009-01-19 11:37:58)


I made it long
as I lacked the time to make it short...

Offline

#8 2009-01-19 11:56:15

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: Battery monitors doesn't update

So monitor /sys/class/power_supply/BAT0/charge_now . The names differ slightly in different kinds of batteries. My guess is that many GUIs are still using the /proc interface.

Last edited by patroclo7 (2009-01-19 11:57:43)


Mortuus in anima, curam gero cutis

Offline

#9 2009-01-19 12:11:37

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

Re: Battery monitors doesn't update

patroclo7 wrote:

So monitor /sys/class/power_supply/BAT0/charge_now.

Which as well only gets updated on AC events (plugging the AC adapter in or out)
Cheers.


I made it long
as I lacked the time to make it short...

Offline

#10 2009-01-19 13:31:58

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: Battery monitors doesn't update

Then it is a kernel issue. Which kernel version is your kubuntu using? You could try to downgrade to the same version here to see if it helps. Or perhaps see if kubuntu applies a battery-related patch to its kernel.


Mortuus in anima, curam gero cutis

Offline

#11 2009-01-20 13:25:23

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

Re: Battery monitors doesn't update

I appreciate your reply.

Tried downgrading to 2.6.27.9, no difference. The ubuntu based distros uses a severely pached kernel. It amounts to about 410000 lines of code for the 2.6.27.9 kernel. While I really want to make an effort to figure this out, reading through that amount is more than I can manage. I still believe that the above mentioned bugreport is related, though.
Cheers


I made it long
as I lacked the time to make it short...

Offline

Board footer

Powered by FluxBB