Bug 15418 - (ec_dmi_table) battery status info broken; missing entry in ec_dmi_table for specific MSI hardware (notebook)
(ec_dmi_table)
battery status info broken; missing entry in ec_dmi_table for specific MSI ha...
Status: CLOSED PATCH_ALREADY_AVAILABLE
Product: ACPI
Classification: Unclassified
Component: EC
All Linux
: P1 normal
Assigned To: acpi_ec
:
Depends on:
Blocks: 14885
  Show dependency treegraph
 
Reported: 2010-03-01 07:25 UTC by Tom-Steve Watzke
Modified: 2010-12-25 02:47 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.33
Tree: Mainline
Regression: Yes


Attachments
complete dmidecode (9.52 KB, text/plain)
2010-03-01 10:35 UTC, Tom-Steve Watzke
Details
Add another match for MSI hardware (796 bytes, patch)
2010-03-01 11:06 UTC, Alexey Starikovskiy
Details | Diff

Description Tom-Steve Watzke 2010-03-01 07:25:36 UTC
Recently I had compiled and installed the newest stable kernel, version 2.6.33.
I noticed that the battery status is broken and remembered that there could be a missing ec_dmi_table entry. As last time (http://bugzilla.kernel.org/show_bug.cgi?id=14446) I added the ec_dmi_table entry:

---- to drivers/acpi/ec.c --- line 959
{
  ec_flag_msi, "MSI hardware", {
  DMI_MATCH(DMI_CHASSIS_VENDOR, "MICRO-STAR")}, NULL},
----
(if necessary I could make a patch)

Instead of attaching the dmidecode I just print the relevant section.
(Other "Manufacturer:" keys are followed by "Notebook" or "Manufacturer<i>"
where <i> is an integer)
----
Handle 0x0003, DMI type 3, 21 bytes
Chassis Information
        Manufacturer: MICRO-STAR INT'L CO.,LTD.
        Type: Notebook
        Lock: Not Present
        Version: To Be Filled By O.E.M.
        [...]
----

Complete list as far as I know or noticed:
- Micro-Star (bios vendor)
- MICRO-Star (sys vendor)
- MICRO-Star (chassis vendor)
- MICRO-STAR (chassis vendor)

Concluding ... I added the entry to this table for MICRO-STAR and it worked for me.
Comment 1 Alexey Starikovskiy 2010-03-01 10:02:58 UTC
Please provide your dmidecode output for reference. Thanks!
Comment 2 Tom-Steve Watzke 2010-03-01 10:35:25 UTC
Created attachment 25286 [details]
complete dmidecode

Although I gave the relevant section, I have attached the full dmidecode output.
Comment 3 Alexey Starikovskiy 2010-03-01 10:50:41 UTC
Tom,
You can provide a patch against current kernel git-tree, check it with checkpatch.
If you want us to make the patch, we need this information.
Comment 4 Alexey Starikovskiy 2010-03-01 11:06:07 UTC
Created attachment 25287 [details]
Add another match for MSI hardware

Please check if this patch is what you want.
Comment 5 Tom-Steve Watzke 2010-03-01 11:11:34 UTC
I just was cloning the current git tree (acpi) ...

Concerning your patch: That is exactly the patch I would have committed, too.
Thanks so far.
Comment 6 Zhang Rui 2010-03-02 01:44:04 UTC
so we've got a fix (patch in comment #4) for this issue, right?
Close this bug report.
Comment 7 Alexey Starikovskiy 2010-04-16 21:44:02 UTC
Tom-Steve,

I have one more patch, which might make this specific MSI workaround redundant...
Could you please check if patch from #15749 works as a replacement of current patch?

Thanks in advance,
Alex.
Comment 8 Tom-Steve Watzke 2010-04-17 12:54:25 UTC
I still cannot try out the newly included or mentioned patch, because the kernel version 2.6.34 is still not in gentoo portage. As soon as it will be, I will post the result in here; I just have no time to make a workaround for that now (deadlines in studies).
Comment 9 Len Brown 2010-09-29 01:22:48 UTC
Please re-open if this is still an issue.
Comment 10 Tom-Steve Watzke 2010-10-02 19:03:38 UTC
As of kernel version 2.6.35-r8 (Gentoo kernel with patchset) this issue still exists. Sorry for not responsing so long, due to heavy learning for mathematics studies.

After adding the folling lines the battery is working again. 
After line 1007 in file drivers/acpi/ec.c

  {                                                                             
  ec_flag_msi, "MSI hardware", {                                                
  DMI_MATCH(DMI_CHASSIS_VENDOR, "MICRO-STAR")}, NULL}, 

which means, adding a line to the  ec_dmi_table:

static struct dmi_system_id __initdata ec_dmi_table[] = {

Thanks so far.
Comment 11 Zhang Rui 2010-10-26 00:55:32 UTC
(In reply to comment #10)
> As of kernel version 2.6.35-r8 (Gentoo kernel with patchset) this issue still
> exists. Sorry for not responsing so long, due to heavy learning for mathematics
> studies.
> 
> After adding the folling lines the battery is working again. 
> After line 1007 in file drivers/acpi/ec.c
> 
>   {                                                                             
>   ec_flag_msi, "MSI hardware", {                                                
>   DMI_MATCH(DMI_CHASSIS_VENDOR, "MICRO-STAR")}, NULL}, 
> 
this is exactly what is done in the patch in comment #4, right?
bug closed as patch is already available.
Comment 12 Tom-Steve Watzke 2010-10-27 07:40:48 UTC
Indeed this is exactly what should be done ... that easy ... though still not in kernel, even not in 2.6.36, which I just tested now. 

What I noticed not including the array entry is (using kernel 2.6.36) as follows:
- /proc/acpi/battery/BAT1 seems to be existent even if not recognising the battery as this
- running acpitool shows information when charging (including Battery #1 infos)
- running acpitool when not charging, no information about a battery are shown and AC adapter is still "on-line" though it is not
Comment 13 Len Brown 2010-12-09 22:08:40 UTC
patch in comment #4 applied to acpi-test
Comment 14 Len Brown 2010-12-25 02:47:38 UTC
commit a5dc4f898c2a0f66e2cefada6c687db82ba2fcbc
Author: Alexey Starikovskiy <astarikovskiy@suse.de>
Date:   Thu Dec 9 17:07:54 2010 -0500

    ACPI: EC: Add another dmi match entry for MSI hardware


shipped in 2.6.37-rc6
closed

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