! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
battery indicator is wrong
Status:
RESOLVED: FIXED
Product:
Xfce4-battery-plugin
Component:
General

Comments

Description Jérôme Guelfucci editbugs 2008-01-10 17:46:30 CET
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en; rv:1.8.1.11) Gecko/20071204 Epiphany/2.20 Firefox/2.0.0.11
Build Identifier: 

This was reported on Launchpad: https://bugs.launchpad.net/ubuntu/+source/xfce4-battery-plugin/+bug/181144
by: https://bugs.launchpad.net/~kjenks

This happens on Xubuntu Hardy on a Dell Latitude D830. Under the new 2.6.24-2-386 kernel, the xfce4-battery-plugin indicator does not work correctly. The power adapter status is correct (whether it is plugged in or not), however the percentage is wrong.

Most of the time it says 28%, regardless of how much charge the battery actually has left. If the adapter is plugged in or unplugged, it will show 100% for about a minute before going back to 28%.

Reproducible: Always

Steps to Reproduce:
Watch the indicator.



However, the output of "acpi -b" is always correct. This problem did not occur under 2.6.22-14-386.
Comment 1 Jérôme Guelfucci editbugs 2008-01-10 17:57:15 CET
Sorry, I forgot to add that this happens with the 0.5.0 version of the plugin.
Comment 2 L Jones 2008-01-15 22:27:37 CET
I'd intended to submit this to the ubuntu bug report but apparently it's been kicked up here. xfce4-battery-plugin 0.5.0 possibly modified by ubuntu.

All indicators are wrong for me, it's as if the battery is not found.

Xubuntu Hardy Heron x86_64 updated this morning with 2.6.24-4-generic kernel on acer aspire 4720z laptop.

/proc/acpi/battery/BAT1/ has alarm, info and status.
/proc/acpi/ac_adapter/ACAD/ has state.

xfce4-battery-plugin                      0.5.0-3ubuntu1
linux-generic                             2.6.24.4.4
linux-image-2.6.24-4-generic              2.6.24-4.7 
linux-restricted-modules-2.6.24-4-generic 2.6.24.4-4.11  
linux-ubuntu-modules-2.6.24-4-generic     2.6.24-4.8

$ acpi -V
     Battery 1: charged, 100%
     Thermal 1: ok, 53.0 degrees C
  AC Adapter 1: on-line

$ cat /proc/acpi/ac_adapter/ACAD/state 
state:                   on-line

$ cat /proc/acpi/battery/BAT1/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      4083 mAh
present voltage:         12560 mV

$ cat /proc/acpi/battery/BAT1/info 
present:                 yes
design capacity:         4000 mAh
last full capacity:      4083 mAh
battery technology:      rechargeable
design voltage:          10800 mV
design capacity warning: 300 mAh
design capacity low:     163 mAh
capacity granularity 1:  32 mAh
capacity granularity 2:  32 mAh
model number:            Chapala
serial number:           9877
battery type:            LION
OEM info:                PANASONIC

Acer Aspire 4720z
Intel Pentium T2310 (dual core 64-bit @ 1.46GHz)
Intel Mobile 965GM chipset with GMA X3100 video
2.5 GB DDR2 (2 sodimm)
Atheros AR5007EG wireless pci-express
Broadcom BCM5787M gigabit ethernet pci-express
Intel 82801H (ICH8 Family) SMBus Controller
Sata AHCI harddrive, dvd-rw
Comment 3 Yves-Alexis Perez editbugs 2008-03-13 07:16:21 CET
I assume this is because of the sysfs patch, wich behaves badly on some system, especially those where there is no /sys/class/power_supply/AC (wich is the only AC adapter the sysfs patch look at)
Comment 4 Yves-Alexis Perez editbugs 2010-12-08 21:27:42 CET
Created attachment 3255 
use sysfs instead of procfs

A fixed version was provided to implement correctly sysfs parsing.

I know a upower-based branch is opened and a future release should be based on xfpm or something, but in the meantime some people might still be interested by a working battery plugin.
Comment 5 Florian Rivoal editbugs 2010-12-27 14:13:32 CET
Patch applied. Thanks.
Comment 6 Florian Rivoal editbugs 2010-12-27 15:06:45 CET
*** Bug 3579 has been marked as a duplicate of this bug. ***
Comment 7 Florian Rivoal editbugs 2010-12-27 16:50:16 CET
*** Bug 3533 has been marked as a duplicate of this bug. ***

Bug #3793

Reported by:
Jérôme Guelfucci
Reported on: 2008-01-10
Last modified on: 2010-12-27
Duplicates (2):
  • 3533 battery-plugin unresponsive during /proc reads
  • 3579 [xfce4-battery-plugin] displaying strange data when acpid is absend.

People

Assignee:
Xfce-Goodies Maintainers
CC List:
7 users

Version

Version:
0.5.1 or older

Attachments

use sysfs instead of procfs (8.63 KB, patch)
2010-12-08 21:27 CET , Yves-Alexis Perez
no flags

Additional information