Battery not detected on MSI CR600
Par Jérôme Pouiller le mardi, juin 16 2009, 12:15 - Contributions - Lien permanent
On Laptop MSI CR600, device PNP0C0A (corresponding to battery) does not appear in /proc/acpi/battery nor in /sys/bus/acpi/drivers/battery/ with Linux 2.6.28.9.
Kernel 2.6.28.9 says :
ACPI: EC: input buffer is not empty, aborting transaction ACPI: EC: input buffer is not empty, aborting transaction ACPI: EC: input buffer is not empty, aborting transaction ACPI Exception (evregion-0419): AE_TIME, Returned by Handler for [EmbeddedControl] [20080926] ACPI Error (psparse-0524): Method parse/execution failed [\_SB_.PCI0.SBRG.EC__.BAT1._STA] (Node f70309f0), AE_TIME ACPI Error (uteval-0232): Method execution failed [\_SB_.PCI0.SBRG.EC__.BAT1._STA] (Node f70309f0), AE_TIME
It seems there is a problem with DSDT table (yet another). Let check DSTD table [1]:
$ sudo acpidump > /tmp/acpi.dump $ acpixtract DSDT /tmp/acpi.dump $ iasl -d DSDT.dat
Definition of revelant method is:
Device (EC) {
Device (BAT1) {
Method (_STA, 0, NotSerialized)
{
If (MYEC)
{
If (MBTS)
{
Return (0x1F)
}
Else
{
Return (0x0F)
}
}
Else
{
Return (0x0F)
}
}
}
}
I am not fluent in ASL (Acpi Source Language), but Alexender Sack have nearly same problem with MSI-1710A under FreeBSD. The clean way to correct this problem whould be patching ACPI interpreter. I will open a bug about it soon. Nevertheless, for now, we can apply a work around by replacing this method with:
Method (_STA, 0, NotSerialized)
{
If (^^ADP1.BFLG)
{
Return (0x1F)
}
Else
{
Return (0x0F)
}
}
We now have to override system DSDT [2] :
$ iasl -tc DSDT.dsl $ cp DSDT.hex linux-source/include/
Configure these option in kernel:
CONFIG_STANDALONE=n CONFIG_ACPI_CUSTOM_DSDT=y CONFIG_ACPI_CUSTOM_DSDT_FILE="DSDT.hex"
And rebuilt it.
Battery should appear.
Notes
[1] Mor information about how to trace ACPI in Documentation/acpi/debug.txt
[2] More information about how to http://www.lesswatts.org/projects/acpi/overridingDSDT.php
Commentaires
Hello!
I experienced the same problem on MSI CR600X Debian 2.6.26-2-amd64. This solution a bit complicated for me. Is there chance for an offical patch in the near future?
Clearly, workaround I use there can't be included in an official development. I have to confess I don't know very well how to correct this problem in a clean way. Maybe Acpi kernel team have other samples of this problem and have an idea to fix it.
I have the same problem with Linux Mint 7 (x64) on my CR600, with kernel 2.6.28-15-generic. I have followed the steps provided below, until I arrived at the last instruction: "And rebuilt it". I do not have experience with rebuilding kernels, so I have spend an entire day researching this. Still, no success. Most kernel building tutorials are for building a new kernel completely from source. But the steps above seem to indicate this should be a much simpler process. (Possibly just put the .config file in the correct location and run "sudo make" or possibly something more similar to "sudo fakeroot make-kpkg
initrdapend-to-version=-dsdt kernel-image kernel-headers"?)I did download the headers and kernel source before attempting the commands above, but the build failed. Any help with this would be GREATLY appreciated, as I am concerned about using this laptop without proper battery control. I should also mentioned that re-compiling the DSDT generated 54 warnings, but I assume this is due to sloppy MSI coding (because their extracted DSDT without modification also generated 54 warnings).
I posted the previous comment (needing help to understand how to rebuild a kernel). Although I did not receive a response and I spent several more hours trying to learn how to build kernels, I have now found a solution. I installed kernel 2.6.31 on my MSI CR600 and now it seems to be working properly (the battery is recognized as well as the charger and unplugging the charger dims the display as expected). Rather than manually downloading and building the new kernel, I changed my /etc/apt/sources.list file to indicate the Ubuntu karmic repositories rather than the jaunty repositories, then did 'apt-get update' and installed the new 2.6.31 kernel image. Problem solved!
FYI: I wasted a week hoping to receive support from MSI. This was a useless effort, as they simply indicated "The CR600 was designed for use with Microsoft Windows". It will be good when customers are finally not forced to purchase an unwanted Windows OS with their computer and when computer companies follow industry standards (rather than Microsoft-proprietary coding, including errors) when creating BIOS, DSDT, etc!
Merci pour ce super blog. Je l'apprecie enormement. J'attend les nouveaux posts avec impatience
Super !!! Merci beaucoup
Hi! My name is Laurene and I'm a stay at home mom to 2 wonderful children. Though the kids keep me busy enough, I do dabble in a bit of freelance webdesign to make ends meet.