Bug 4826 - Kernels at 2.6.9 do not refresh correctly the remaining capacity in /proc/acpi/battery/BAT1/state on my notebook HP Omnibook xe4500
Kernels at 2.6.9 do not refresh correctly the remaining capacity in /proc/acp...
Status: CLOSED PATCH_ALREADY_AVAILABLE
Product: ACPI
Classification: Unclassified
Component: Power-Battery
i386 Linux
: P2 normal
Assigned To: acpi_power-battery
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-30 16:29 UTC by Pavel Alexeev
Modified: 2005-07-22 11:09 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.9 ... 2.6.12 (currently using 2.6.12)
Tree: Mainline
Regression: ---


Attachments

Description Pavel Alexeev 2005-06-30 16:29:47 UTC
Distribution:
Slackware 10.1 (i use the kernel from kernel.org with my .config)

Hardware Environment:
HP Omnibook xe4500: P4-1700, chipset ALi M1671, ATI Radeon Mobility M6 LY,
ALI15X3 IDE controller, ACPI supports S0 S3 S4 S5, LiIon Batery 4000 mAh (model
number: 01KT, OEM info: SMP, last full capacity: 3264 mAh).

Software Environment:
xorg 6.8.2, fvwm 2.5.12, glibc 2.3.4
From my kernel config:
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
# CONFIG_SOFTWARE_SUSPEND is not set

#
# ACPI (Advanced Configuration and Power Interface) Support
#
CONFIG_ACPI=y
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
# CONFIG_ACPI_SLEEP is not set
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
# CONFIG_ACPI_VIDEO is not set
CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_IBM is not set
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=y

#
# APM (Advanced Power Management) BIOS Support
#
# CONFIG_APM is not set

Problem Description:
When i boot with 2.6.8.1 kernel, all seems OK. With the kernels 2.6.9 and abowe,
almost no battery events are generated if AC cable is unplugged (i have checked
it with the script in /etc/acpi that handles any acpi event). The events are
generated by ac_adapter completely correctly but the battery events are never
generated. The remaining capacity in /proc/acpi/battery/BAT1/state is therefore
not correct (for example, the battery indicators show 80% 1/2-hour after i have
disconnected the AC adapter) with no change.
No errors in the logs. The kernels are compiled with the same .config (i use
make oldconfig and add no new features).

Steps to reproduce:
Unplug AC adapter and try to read /proc/acpi/battery/BAT1/state some times. It
happens not always. Sometimes, you must repeat this procedure several times
(plug the AC back, wait 2 minutes, unplug and evaluate the battery indicator).
It happens NEVER when using 2.6.8.1 kernel and earliner (i have 2.6.8.1 on my
hard disk).

Typical symptoms:
1) Unplug AC Adapter cable, battery fully charged (100%);
2) Work on battery until the remaining capacity 75%; the battery indicator shows
the capacity correctly;
3) Plug the AC Adapter again for 1 minute and unplug when 76% is reported;
4) At this time no more battery events. I see "76%" already 10 minutes (and can
check the remaining capacity in /proc/acpi/battery/BAT1/state, it does not
change). No errors in the logs. The last event is ACAD, from ac_adapter...
5) Plug in the AC Adapter back, the BAT-events happen again.
Comment 1 Luming Yu 2005-07-04 22:35:53 UTC
Please test 2.6.13-rc1-mm1
Comment 2 Pavel Alexeev 2005-07-05 04:41:10 UTC
With 2.6.13-rc1-mm1 it works perfectly, the battery events are correct generated
(i have 5 times diconnect and then plug in the cable, the initial state was
discharging):
Jul  5 12:37:55 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:39:00 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:40:05 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:41:10 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:42:15 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:43:20 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:44:24 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:45:29 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:46:34 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:46:53 mybook logger: ACPI event, param1=ac_adapter, param2=ACAD
Jul  5 12:46:53 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:47:06 mybook last message repeated 2 times
Jul  5 12:48:11 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:49:14 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:49:14 mybook logger: ACPI event, param1=ac_adapter, param2=ACAD
Jul  5 12:49:14 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:49:14 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:50:19 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:51:24 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:52:29 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:53:34 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:54:39 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:55:44 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:56:49 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:57:46 mybook logger: ACPI event, param1=ac_adapter, param2=ACAD
Jul  5 12:57:46 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 12:58:00 mybook last message repeated 2 times
Jul  5 12:59:04 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:00:09 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:01:14 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:02:19 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:03:24 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:03:42 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:03:42 mybook logger: ACPI event, param1=ac_adapter, param2=ACAD
Jul  5 13:03:48 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:03:55 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:05:00 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:06:05 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:07:10 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:08:15 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:09:12 mybook logger: ACPI event, param1=ac_adapter, param2=ACAD
Jul  5 13:09:12 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:09:25 mybook last message repeated 2 times
Jul  5 13:10:30 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:11:35 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:12:40 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:13:45 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:14:49 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:15:13 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:15:13 mybook logger: ACPI event, param1=ac_adapter, param2=ACAD
Jul  5 13:15:19 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:15:26 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:16:31 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:17:36 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:18:41 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:19:47 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:20:52 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:21:56 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:22:26 mybook logger: ACPI event, param1=ac_adapter, param2=ACAD
Jul  5 13:22:26 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:22:26 mybook logger: ACPI event, param1=button/lid, param2=LID
Jul  5 13:22:31 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:22:38 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:23:43 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:24:48 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:25:53 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:27:12 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:27:12 mybook logger: ACPI event, param1=ac_adapter, param2=ACAD
Jul  5 13:27:12 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:27:12 mybook last message repeated 2 times
Jul  5 13:28:16 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:29:21 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:30:26 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:31:31 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:32:37 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:33:42 mybook logger: ACPI event, param1=battery, param2=BAT1
Jul  5 13:34:47 mybook logger: ACPI event, param1=battery, param2=BAT1

Note You need to log in before you can comment on or make changes to this bug.