Opened 15 years ago
Closed 13 years ago
#5843 closed bug (fixed)
ACPI empty battery slots showing up in battery applet. Present battery is also missing.
Reported by: | kallisti5 | Owned by: | czeidler |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Drivers/ACPI | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | x86 |
Description
in hrev36511 (and prior versions)
empty battery slots are showing up in the battery applet.
Attaching the following:
- /dev/power/acpi_battery/0
- /dev/power/acpi_battery/1
- /dev/acpi/namespace
- /var/log/syslog
Attachments (5)
Change History (15)
comment:1 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
by , 15 years ago
comment:2 by , 15 years ago
What hardware do you own? I have an IBM/Lenovo ThinkPad T60, and indeed my CD-ROM drive can be removed and the bay can be repurposed for another battery.
comment:3 by , 15 years ago
HP nc6230.
One built-in battery (which was attached for the testing) one battery connector on the bottom for a larger battery (not-attached)
nc6230 is pretty much an HP clone of the Thinkpad t4x series
comment:4 by , 15 years ago
Ah ok seems there is a bug in the battery app. When I find time I will take a look into it. Did you try to click below the empty slot? maybe there is a drawing bug. Why it says 100% and not empty slot?...
comment:5 by , 15 years ago
verified that clicking on/around/below the 100% battery does nothing.
ACPI/Battery app uses the BATTERY_CRITICAL_STATE identifier to mark disabled/not present batteries.
http://haiku.it.su.se:8180/source/search?q=BATTERY_CRITICAL_STATE&defs=&refs=&path=&hist=
BATTERY_CRITICAL_STATE is 0x04
My removed battery has a status of -1: /dev/power/acpi_battery/0
BATTERY_UNKNOWN_STATE of -1 need to be implemented within http://haiku.it.su.se:8180/source/xref/headers/private/device/power_managment.h and used in the power app?
comment:6 by , 15 years ago
this looks like something partially implemented. Please note the -1 above should be 0 ;)
Maybe:
#define BATTERY_UNKNOWN_STATE 0x00 #define BATTERY_DISCHARGING 0x01 #define BATTERY_CHARGING 0x02 #define BATTERY_CRITICAL_STATE 0x04
comment:7 by , 15 years ago
I checked what Linux did for these battery statuses, unfortunately they are a little more dynamic on ACPI battery states. The Linux Kernel checks other battery metrics when evaluating the status. However, I did find that Linux always assumes an unknown state for the 0 status verifying this is a needed addition.
I am working on a quick patch for the power_managment.h source to include the unknown state and for the battery app to act upon it.
anyone else notice "MANAGMENT" is misspelled in the power_managment.h sources and filename?
comment:8 by , 14 years ago
Milestone: | R1/alpha3 → R1 |
---|
Any news on that fix ? This doesn't really belongs in alpha 3, anyway...
comment:9 by , 14 years ago
comment:10 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
resolved long ago. Thanks!
/dev/power/acpi_battery/0