Bug 2093 - acpi says battery absent on laptop, even when running on battery
Summary: acpi says battery absent on laptop, even when running on battery
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Battery (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Shaohua
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-13 17:29 UTC by Michael PS
Modified: 2004-04-13 17:46 UTC (History)
0 users

See Also:
Kernel Version: 2.6.1, 2.6.2, 2.6.3, 2.6.4
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
output of dmesg (14.84 KB, text/plain)
2004-03-02 09:14 UTC, Michael PS
Details
output of acpidmp (111.10 KB, text/plain)
2004-03-02 09:15 UTC, Michael PS
Details
my dsdt.dsl with 19 errors left to fix (175.08 KB, text/plain)
2004-03-17 08:04 UTC, Michael PS
Details

Description Michael PS 2004-02-13 17:29:26 UTC
Distribution: slackware 9.1
Hardware Environment: compaq evo n800c laptop
Software Environment: 
Problem Description: acpi cannot find battery after bios upgrade, windows find
it ok and displays remaining time and everything ok.

I've tried all 2.6.x kernels and patching with the latest stable acpi patch from  
http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/

but with no luck...

output of dmesg:


Feb 14 01:53:12 valhall kernel: ACPI: RSDP (v000 COMPAQ                        
           ) @ 0x000f6080
Feb 14 01:53:12 valhall kernel: ACPI: RSDT (v001 COMPAQ CPQ004A  0x28100320 CPQ
 0x00000001) @ 0x1fff0c84
Feb 14 01:53:12 valhall kernel: ACPI: FADT (v002 COMPAQ CPQ004A  0x00000002 CPQ
 0x00000001) @ 0x1fff0c00
Feb 14 01:53:12 valhall kernel: ACPI: SSDT (v001 COMPAQ  CPQGysr 0x00001001 MSFT
0x0100000d) @ 0x1fff690f
Feb 14 01:53:12 valhall kernel: ACPI: SSDT (v001 COMPAQ   CPQMag 0x00001001 MSFT
0x0100000d) @ 0x1fff6a1d
Feb 14 01:53:12 valhall kernel: ACPI: DSDT (v001 COMPAQ  EVON800 0x00010000 MSFT
0x0100000d) @ 0x00000000
Feb 14 01:53:12 valhall kernel: ACPI: Subsystem revision 20040116
Feb 14 01:53:12 valhall kernel: ACPI: Interpreter enabled
Feb 14 01:53:12 valhall kernel: ACPI: Using PIC for interrupt routing
Feb 14 01:53:12 valhall kernel: ACPI: PCI Root Bridge [C047] (00:00)
Feb 14 01:53:12 valhall kernel: ACPI: Embedded Controller [C0E5] (gpe 29)
Feb 14 01:53:12 valhall kernel: ACPI: Power Resource [C156] (off)
Feb 14 01:53:12 valhall kernel: ACPI: Power Resource [C16E] (off)
Feb 14 01:53:12 valhall kernel: ACPI: Power Resource [C172] (off)
Feb 14 01:53:12 valhall kernel: ACPI: Power Resource [C17B] (on)
Feb 14 01:53:12 valhall kernel: ACPI: Power Resource [C0E4] (on)
Feb 14 01:53:12 valhall kernel: ACPI: Power Resource [C1EA] (off)
Feb 14 01:53:12 valhall kernel: ACPI: Power Resource [C1EB] (off)
Feb 14 01:53:12 valhall kernel: ACPI: Power Resource [C1EC] (off)
Feb 14 01:53:12 valhall kernel: ACPI: Power Resource [C1ED] (off)
Feb 14 01:53:12 valhall kernel: PCI: Using ACPI for IRQ routing
Feb 14 01:53:12 valhall kernel: ACPI: AC Adapter [C131] (on-line)
Feb 14 01:53:12 valhall kernel: ACPI: Battery Slot [C133] (battery absent)
Feb 14 01:53:12 valhall kernel: ACPI: Battery Slot [C132] (battery absent)
Feb 14 01:53:12 valhall kernel: ACPI: Power Button (FF) [PWRF]
Feb 14 01:53:12 valhall kernel: ACPI: Sleep Button (CM) [C135]
Feb 14 01:53:12 valhall kernel: ACPI: Lid Switch [C134]
Feb 14 01:53:12 valhall kernel: ACPI: Fan [C1EE] (off)
Feb 14 01:53:12 valhall kernel: ACPI: Fan [C1EF] (off)
Feb 14 01:53:12 valhall kernel: ACPI: Fan [C1F0] (off)
Feb 14 01:53:12 valhall kernel: ACPI: Fan [C1F1] (off)
Feb 14 01:53:12 valhall kernel: ACPI: Processor [C000] (supports C1 C2 C3, 8
throttling states)
Feb 14 01:53:12 valhall kernel: ACPI: Thermal Zone [TZ1] (57 C)
Feb 14 01:53:12 valhall kernel: ACPI: Thermal Zone [TZ2] (52 C)
Feb 14 01:53:12 valhall kernel: ACPI: Thermal Zone [TZ3] (16 C)
Feb 14 01:53:12 valhall kernel: ACPI: (supports S0 S3 S4 S5)

Steps to reproduce:


regards Michael
Comment 1 Shaohua 2004-02-19 16:54:49 UTC
please attach the acpidmp and dmesg. thanks
Comment 2 Michael PS 2004-03-02 09:14:52 UTC
Created attachment 2267 [details]
output of dmesg
Comment 3 Michael PS 2004-03-02 09:15:34 UTC
Created attachment 2268 [details]
output of acpidmp
Comment 4 Shaohua 2004-03-02 17:32:13 UTC
Your box lacks ECDT. You can provide a fake ECDT or try the workaround patch 
in Bug 1744.
Comment 5 Michael PS 2004-03-05 14:56:05 UTC
Hi!

Thank you very much for replying so fast, i've mailed compaq and asked them
about what they have changed in the bios firmware and why ECDT is missing.

i've applyed this patch
http://bugzilla.kernel.org/attachment.cgi?id=1690&action=view
with one error during patching but it did not solve the problem.
all other patches found in bug #1744 can't be applyed on 2.6 kernel.

I've tried finding some info on google howto make a fake ecdt table but all info
i can find is to older kernel versions 2.4.x.

I guess that windows shows battery ok is because it is providing a fake ecdt
correct?

please give me a hint or point me to the right direction, i don't know what to
do, i am realy lost here in this acpi jungle =)

thanks again 

regards Michael
Comment 6 Michael PS 2004-03-06 12:38:38 UTC
This is the respons from compaq/hp support:

This is in response to your e-mail regarding the Evo N800c notebook.

>From your e-mail, I understand that the got ACPI function disabled after the
BIOS upgrade in the notebook with Linux installed.

The installed BIOS can not be re-flashed to the previous version.

We do not have any technical information on the firmware of the lasted installed
BIOS and the ECDT involving it in Linux Operating System.

I recommend you to search the internet and forums dedicated to the resolve the
issue caused on Linux.

Also please visit the link below.

<http://developer.intel.com/technology/iapc/acpi/downloads.htm>

I apologize that I am unable to assist you further on this issue.

Please e-mail us in case of any further questions and we will be glad to assist
you. 

Thank you.

I've also spend lot of time reading about acpi on the net, and i wonder if i
could get battery status to work if i provide a fake DSDT table ? I've tried to
do so as explained on http://acpi.sourceforge.net/wiki/index.php/HowToOverrideTable

but the patch on osd.c failes on a clean 2.6.3 tree with error:
Hunk #1 FAILED at 215.

here is drivers/acpi/osl.c.rej:

***************                 
*** 215,227 ****                
        return AE_OK;           
  }                             
                                
  acpi_status                   
  acpi_os_table_override (acpi_table_header *existing_table,
        acpi_table_header **new_table)
  {
        if (!existing_table || !new_table)
                return AE_BAD_PARAMETER;
  
        *new_table = NULL;
        return AE_OK; 
  
--- 215,232 ----
        return AE_OK;
  }
  
+ /**/static const
+ #include "/tmp/dsdt.hex"
+ 
  acpi_status
  acpi_os_table_override (acpi_table_header *existing_table,
        acpi_table_header **new_table)
  {
        if (!existing_table || !new_table)
                return AE_BAD_PARAMETER;
  
+ /**/if (strncmp(existing_table->signature,"DSDT",4))
        *new_table = NULL;
+ /**/else *new_table = (struct acpi_table_header *)AmlCode;
        return AE_OK; 

thanks again.

regards Michael
Comment 7 Shaohua 2004-03-14 23:49:53 UTC
hmm, bug 1690 has a patch to address this problem. could you please try it?
Comment 8 Michael PS 2004-03-17 07:58:49 UTC
Hi!

If you mean this patch:
http://bugzilla.kernel.org/attachment.cgi?id=1690&action=view

I've tried it before without result, i just tried it again with no result,
absolutely nothing changes as far as i can tell, battery still absent, both c132
and c133. 

And it does not patch cleanly it gives patch errors on a virgin 2.6.4 and 2.6.3
tree.

However i found a patch for 2.6 kernels that lets me load a custom dsdt table
with initrd on this page: http://gaugusch.at/kernel.shtml

and i found a custom dsdt table at:
http://acpi.sourceforge.net/dsdt/tables/Compaq/Evo_N800v/Compaq-Evo_N800v-F.18A-custom.asl.gz

that makes battery working but thermal stops working =(

i'm working on getting my own dsdt.dsl that i got from acpidmp to compile
without errors so i can load that as a custom dsdt table, but i don't know shit
about asl so i can't make all errors go away. i have 19 errors left to go. =)

Thanks again for helping...

regards Michael
Comment 9 Michael PS 2004-03-17 08:04:43 UTC
Created attachment 2357 [details]
my dsdt.dsl with 19 errors left to fix

this i got from:
acpidmp DSDT > acpidmp.out
iasl -d acpidmp.out (creates dsdt.dsl)
i've managed to remove some * in dsdt.dsl so i got it down to 19 errors from 36
i think it was.

i'm using iasl -tc dsdt.dsl when trying to compile it.
Comment 10 Shaohua 2004-04-07 00:47:25 UTC
the patch in Bug 1690 can only address EC._INI error, though your problem is 
similar with bug 1690(all are caused by lack of ECDT). i suggest you follow 
Bug 1690 since bob(Robert Moore) will provide a final solution for such kind 
of issue. 
Comment 11 Michael PS 2004-04-13 09:23:10 UTC
Problem solved in 2.6.5 kernel, everything works ok when using 2.6.5

Thank you very much, well done =)

regards Michael

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