Bug 9730 - No ACPI battery info
Summary: No ACPI battery info
Status: CLOSED DUPLICATE of bug 9627
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Battery (show other bugs)
Hardware: All Linux
: P1 high
Assignee: ykzhao
URL:
Keywords:
Depends on:
Blocks: 9243
  Show dependency tree
 
Reported: 2008-01-11 07:01 UTC by Tibor Nagy
Modified: 2008-01-23 19:17 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.24-rc7
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
dmesg of the working 2.6.23 kernel (21.78 KB, text/plain)
2008-01-19 02:55 UTC, Tibor Nagy
Details
acpidump of the working 2.6.23 kernel (52.69 KB, text/plain)
2008-01-19 02:55 UTC, Tibor Nagy
Details
dmesg of the non-working 2.6.24-rc7 patched kernel (18.68 KB, text/plain)
2008-01-19 02:56 UTC, Tibor Nagy
Details
acpidumo of the non-working 2.6.24-rc7 patched kernel (52.69 KB, text/plain)
2008-01-19 02:57 UTC, Tibor Nagy
Details

Description Tibor Nagy 2008-01-11 07:01:09 UTC
Latest working kernel version: 2.6.23
Earliest failing kernel version: 2.6.24-rc7
Distribution: mainline kernel with SuSe 10.3
Hardware Environment: PC Laptop (Gericom)
Software Environment: SuSe 10.3 kernel 2.6.24-rc7 with the following
Power Management options in .config:

# Power management options
#
CONFIG_PM=y
# CONFIG_PM_LEGACY is not set
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND_UP_POSSIBLE=y
CONFIG_SUSPEND=y
CONFIG_HIBERNATION_UP_POSSIBLE=y
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION=""
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_PROCFS=y
CONFIG_ACPI_PROCFS_POWER=y
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=m
CONFIG_ACPI_BATTERY=m
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_FAN=m
CONFIG_ACPI_DOCK=m
CONFIG_ACPI_BAY=m
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_THERMAL=m
# CONFIG_ACPI_ASUS is not set
CONFIG_ACPI_TOSHIBA=m
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_BLACKLIST_YEAR=2001
CONFIG_ACPI_DEBUG=y
# CONFIG_ACPI_DEBUG_FUNC_TRACE is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=m
CONFIG_ACPI_SBS=m
# CONFIG_APM is not set

Problem Description:

No battery info available with 2.6.24-rc7 but it is available with 2.6.23.
The same setting in .config is used in both kernel. The 2.6.24-rc7 .config
was created simly by copiing it from 2.6.23 and make xconfig.

The symptom is that under 2.6.23 the directory /proc/acpi/battery/BAT0 is created and under 2.6.24-rc7 not even the directory /proc/acpi/battery. If I load the module 'battery' an empty "/proc/acpi/battery" will be created.

acpi -V shows the situation:

------- 2.6.23
$ acpi -V
     Battery 1: charged, 100%
No support for device type: thermal
  AC Adapter 1: on-line
------- 2.6.24-rc7 without module battery
$ acpi -V
No support for device type: battery
No support for device type: thermal
  AC Adapter 1: on-line
------- 2.6.24-rc7 with module battery
$ acpi -V
No support for device type: thermal
  AC Adapter 1: on-line

Steps to reproduce:

Start the two kernels on the same machine
Comment 1 Tibor Nagy 2008-01-11 07:04:18 UTC
I changed the severity to high. A laptop can not be used without battery information.
Comment 2 Nick 2008-01-11 08:14:51 UTC
Tibor,

I used to face the same problem switching from 2.6.23 to 2.6.24
But that time I didn't enable these deprecated things:
CONFIG_ACPI_PROCFS=y
CONFIG_ACPI_PROCFS_POWER=y
CONFIG_ACPI_PROC_EVENT=y

so, I got my laptop without battery info.

Are you sure your .24 kernel is built with them enabled ?
Please just check.
Comment 3 Tibor Nagy 2008-01-11 09:08:02 UTC
> CONFIG_ACPI_PROCFS=y
> CONFIG_ACPI_PROCFS_POWER=y
> CONFIG_ACPI_PROC_EVENT=y

As it can be seen in the problem description above these options are set.
Comment 4 Tibor Nagy 2008-01-11 11:07:27 UTC
The following info helps perhaps:

I inserted some "printk" calls in drivers/acpi/battery.c so I could
recognize that:
acpi_battery_init is called and executed normally, returnes with 0.
acpi_battery_add is called only in 2.6.23 but not in .24!!

I must note, that the battery modul is not loaded automatically! I must load it manually, but if I build it in the kernel not as module but resident, than
the functions are called as described above.
Comment 5 Tibor Nagy 2008-01-11 11:14:07 UTC
I see some suspicious line in boot.msg, there is something amout BAT0:

<6>ACPI: Interpreter enabled
<6>ACPI: (supports S0 S3 S4 S5)
<6>ACPI: Using PIC for interrupt routing
<4>ACPI Error (evregion-0316): No handler for Region [RAM_] (f7c1e9fc) [EmbeddedControl] [20070126]
<4>ACPI Error (exfldio-0289): Region EmbeddedControl(3) has no handler [20070126]
<4>ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.BAT0._STA] (Node f7c17b08), AE_NOT_EXIST
<6>ACPI: EC: GPE = 0x1c, I/O: command/status = 0x66, data = 0x62
<6>ACPI: EC: driver started in poll mode
<6>ACPI: PCI Root Bridge [PCI0] (0000:00)
Comment 6 ykzhao 2008-01-13 05:59:17 UTC
Hi, Tibor
Will you please attach the output of acpidump and dmesg ? 
It will be great if you can attach the output of dmesg based on working kernel(2.6.23) and failing kernel.
Thanks.
Comment 7 Tibor Nagy 2008-01-19 02:55:19 UTC
Created attachment 14503 [details]
dmesg of the working 2.6.23 kernel
Comment 8 Tibor Nagy 2008-01-19 02:55:50 UTC
Created attachment 14504 [details]
acpidump of the working 2.6.23 kernel
Comment 9 Tibor Nagy 2008-01-19 02:56:38 UTC
Created attachment 14505 [details]
dmesg of the non-working 2.6.24-rc7 patched kernel
Comment 10 Tibor Nagy 2008-01-19 02:57:39 UTC
Created attachment 14506 [details]
acpidumo of the non-working 2.6.24-rc7 patched kernel

acpidump gives the same output on both kernels
Comment 11 Tibor Nagy 2008-01-19 02:59:24 UTC
Sorry for the delay, I was on holiday.
Comment 12 ykzhao 2008-01-20 23:22:15 UTC
Will you please try the patch in comment #8 of bug9627 and see whether the problem can be fixed by this patch? 
Thanks.
Comment 13 Tibor Nagy 2008-01-21 09:06:13 UTC
It seems, that the problem is solved with this patch. There is a BAT0 directory under /proc/acpi/battery.
However there is a problem, what I don't understand. The KPowersave shows 2 batteries.
Comment 14 ykzhao 2008-01-21 18:01:05 UTC
HI, Tibor
   Thanks for the confirm.
   Maybe the remained problem is not related with kernel. You can open a new bug about this problem and this bug will be marked as the duplicated bug of 9627.

*** This bug has been marked as a duplicate of bug 9627 ***
Comment 15 Tibor Nagy 2008-01-22 02:31:18 UTC
(In reply to comment #14)

The problem that KPowersave shows 2 batteries is solved also. It seems that KPoersave gets battery info from both directrories /proc/acpi/battery and /sys/class/power_supply/ and they appear as 2 different batteries. So the solution: sitch off CONFIG_ACPI_PROCFS_POWER in .config to disable the using of deprecated directory /proc/acpi/battery.

Thanks for your support.

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