Bug 12461 - Battery status and lid switch not working on ZT Systems P7003i-74 laptop
Summary: Battery status and lid switch not working on ZT Systems P7003i-74 laptop
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Battery (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Alexey Starikovskiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-16 12:45 UTC by John Morris
Modified: 2009-04-07 02:54 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.28
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg output (15.11 KB, text/plain)
2009-01-16 12:47 UTC, John Morris
Details
Output of acpidump (183.86 KB, text/plain)
2009-01-16 12:52 UTC, John Morris
Details
Another band-aid for broken ECDT, not ASUS this time (823 bytes, patch)
2009-01-16 15:58 UTC, Alexey Starikovskiy
Details | Diff
Output of dmidecode (12.99 KB, text/plain)
2009-01-16 20:28 UTC, John Morris
Details
dmidecode --dump output (9.47 KB, text/plain)
2009-01-16 20:58 UTC, John Morris
Details
cumulative patch for 2.6.28 to check ECDT (6.13 KB, patch)
2009-01-17 10:02 UTC, Alexey Starikovskiy
Details | Diff
dmesg -s 64000 (39.13 KB, text/plain)
2009-01-17 15:23 UTC, John Morris
Details
cumulative patch for 2.6.28 to check ECDT #2 (6.14 KB, patch)
2009-01-21 11:16 UTC, Alexey Starikovskiy
Details | Diff
dmesg -s 64000 output (39.14 KB, text/plain)
2009-01-22 17:56 UTC, John Morris
Details
A quick hack that makes it work for me (841 bytes, patch)
2009-01-22 18:01 UTC, John Morris
Details | Diff
cumulative patch for 2.6.28 to check ECDT #3 (1.81 KB, patch)
2009-01-23 02:16 UTC, Alexey Starikovskiy
Details | Diff
Updated patch for 2.6.29 (1.87 KB, patch)
2009-03-31 22:47 UTC, Alexey Starikovskiy
Details | Diff

Description John Morris 2009-01-16 12:45:34 UTC
Latest working kernel version: none
Earliest failing kernel version: 2.6.28
Distribution: Linux from Scratch
Hardware Environment: ZT Systems P7003i-74 laptop
Software Environment:
Problem Description:

I get various ACPI errors on boot pertaining to Battery and Lid.  Battery monitoring not working.

Steps to reproduce:
boot
Comment 1 John Morris 2009-01-16 12:47:05 UTC
Created attachment 19837 [details]
dmesg output

Here is the dmesg output showing ACPI errors
Comment 2 John Morris 2009-01-16 12:52:03 UTC
Created attachment 19838 [details]
Output of acpidump

Output of acpidump
Comment 3 John Morris 2009-01-16 12:53:21 UTC
Also, I did confirm that these items will work under windows.
Comment 4 Alexey Starikovskiy 2009-01-16 15:48:06 UTC
John,
your machine has invalid ECDT table, values for command and data registers are reversed. Please check if there is an update of BIOS for your machine and if there is none, please attach output of dmidecode here.
Comment 5 Alexey Starikovskiy 2009-01-16 15:58:12 UTC
Created attachment 19841 [details]
Another band-aid for broken ECDT, not ASUS this time

Please check if this patch makes any difference
Comment 6 John Morris 2009-01-16 20:28:45 UTC
Created attachment 19842 [details]
Output of dmidecode


Here's my dmidecode output.  I tried the patch and it didn't fix the problem.

Thanks!
Comment 7 John Morris 2009-01-16 20:29:42 UTC
Also, I checked and there is no BIOS updates available.
Comment 8 John Morris 2009-01-16 20:58:27 UTC
Created attachment 19843 [details]
dmidecode --dump output

This is the output of dmidecode using the --dump switch in case that is preferred.
Comment 9 Alexey Starikovskiy 2009-01-17 10:02:54 UTC
Created attachment 19863 [details]
cumulative patch for 2.6.28 to check ECDT
Comment 10 John Morris 2009-01-17 11:49:33 UTC
Alexey,

Unfortunately I am still having the same problem with this patch.
Comment 11 Alexey Starikovskiy 2009-01-17 12:52:23 UTC
please post dmesg -s 64000 with any of the patches applied.
Comment 12 John Morris 2009-01-17 15:23:14 UTC
Created attachment 19871 [details]
dmesg -s 64000

Here's the dmesg -s 64000 with the patches applied.
Comment 13 Alexey Starikovskiy 2009-01-21 11:16:59 UTC
Created attachment 19928 [details]
cumulative patch for 2.6.28 to check ECDT #2

Please check if this patch is any better.
Comment 14 John Morris 2009-01-22 17:56:21 UTC
Created attachment 19942 [details]
dmesg -s 64000 output

It is still not working with this patch. I attached dmesg output.
Comment 15 John Morris 2009-01-22 18:01:13 UTC
Created attachment 19943 [details]
A quick hack that makes it work for me

Alexey,

If I take the unpatched ec.c from 2.6.28, and change it to make it use the previous ASUS workaround, it works on my laptop.

Maybe my ECDT from my DSDT is bad too.  See my attached patch to see what I did.
Comment 16 Alexey Starikovskiy 2009-01-23 02:16:55 UTC
Created attachment 19951 [details]
cumulative patch for 2.6.28 to check ECDT #3

John,
Your DSDT is good. 0x66 port for command and 0x62 port for data.
This is my patch, which is broken... Please try new version.
Comment 17 John Morris 2009-01-23 21:03:28 UTC
The new patch worked.  It didn't patch cleanly against 2.6.28, but I was able to patch it by combining part of it with patch #2 (from comment #13).

Thanks for your help!
Comment 18 Zhang Rui 2009-03-30 06:40:33 UTC
John,
can your laptop work well in 2.6.29?

Alexey,
it seems that the patch in comment #16 is not upstream, what's the status of this bug?
Comment 19 John Morris 2009-03-31 05:02:14 UTC
You are correct, Zhang.  2.6.29 still doesn't work.  I had to reapply the patch from comment #16.
Comment 20 Alexey Starikovskiy 2009-03-31 22:47:12 UTC
Created attachment 20766 [details]
Updated patch for 2.6.29

This is the same patch updated for 2.6.29.
Comment 21 Len Brown 2009-04-01 05:33:31 UTC
patch in comment #20 applied to acpi-test
Comment 22 Len Brown 2009-04-07 02:54:44 UTC
shipped in 2.6.30 merge window (Linux-2.6.29-git14)

closed.

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