In the past week I have worked a lot to try to resolve some problems
regarding the use of the Power Management on my laptop. Thanks to google I
find a lot of useful information but I was unable to find a real definitive
solution for this kind of laptop.
The problem are:
1- This kind of laptops doesn't support APM (Advanced Power Management) but only ACPI (Advanced Configuration and Power Interface)
2- Today many company build their BIOS only supporting Microsoft OS, so they are incompatible with some standard used by every other OS
3- I can't find anything in the directories /proc/acpi/ac_adapter and /proc/acpi/battery so I was unable to see the status of my battery and I can't implement the functionality of ACPI on my system
4- The DSDT (se below) resulted to be bugged, I had to correct it
5- There is a missing ECDT (see below) on my system so I have had to patch the kernel to resolve this problem
6- Acer Laptops uses a so called Smart Batteries that have a different way to work
What is DSDT?
Differentiated System Description Table (DSDT), from the ACPI Spec we can have this definition: "An OEM must supply a DSDT to an ACPI-compatible OS. The DSDT contains the Differentiated Definition Block, which supplies the implementation and configuration information about the base system. The OS always inserts the DSDT information into the ACPI Namespace at system boot time and never removes it."
DSDT describes simply the hardware configuration of your system. It describe all the functionality of ACPI and the devices that use it. Every OS can extract it from the BIOS of your sytem.
What is ACPI?
Advanced Configuration and Power Interface (ACPI) is the successor to APM, which places the responsibility of power management away from the BIOS and into the hands of the operating system. ACPI Linux is newer than APM Linux, more flexible in responding to power management events, has seen much more development as of late, and as a result of all this is prone to its own share of bugs from time to time.
ACPI site at sourceforge - http://sourceforge.net/projects/acpi
acpi specification - http://www.acpi.info/index.html
What is a ECDT?
The ECDT (Embedded Control Description Table) is used to provide some minimal information about the Embedded Controller to the ACPI drivers before the Embedded Controller region has actually been parsed from the DSDT.
This document is not an official one, I have resolved my problem following these steps but I don't guarantee anithing for you. Use this document as an example and follow these instructions only if you know what you are doing. If you want to try please conseder that you can broke your system. For official assistance please contact your laptop constructors of the official ACPI developers. I describe only the problem i found, I corrected them based on what I have found on internet, I can't be sure everything is ok. Be careful!!
I use Suse 9.3 Pro with its original kernel. But I think that with the appropriate modifications you can apply this technique to other system
My laptop is Acer Aspire 1681WLCi, I'm not sure but I think for 1680 series is the same
I have the version 20050513 of the Intel's iasl compiler
FIX BROKEN DSDT
1) Download the latest sbs-cm tgz-archive from http://sourceforge.net/projects/sbs-linux
2) Download the Intel's iasl compiler from http://developer.intel.com/technology/iapc/acpi/downloads.htm
3) Install iasl compiler
# tar xfz acpica-unix-20050513.tar.gz
# cd acpica-unix-20050513/compiler
If everything is fine, you should have a binary file called "iasl" in this directory. Copy it anywhere to your $PATH or remind where it's located.
4) Extract the current DSDT from your running kernel
#cat /proc/acpi/dsdt > dsdt.dat
This will give you a file, dsdt.dat that contains your current compiled dsdt. Now we have to disassemble it so we can recompile it.
5) Disassemble the DSDT
#PATH_TO_IASL/iasl -d dsdt.dat
This will create a file called dsdt.dsl, which contains the disassembled DSDT. You are able to see it with common text editor.
6) Recompile the disassembled DSDT
If it works it will create two files, dsdt.hex and DSDT.aml. But probably if you are following these steps it doesn't work properly, and the compiler stops with some errors.
You can find some fixed dsdt
at this address:
I resolve my problems and I made a tar.gz file with
the fixed DSDT. There you can find it fixed for the other steps of this
document with two patches (see below). To have it please download:
To solve other kind of problems have a look at:
7) Patch your fixed DSDT:
At this address https://sourceforge.net/projects/sbs-linux/ you can find the SourceForge project dedicate to Smart Battery System (SBS). It works to solve the problems of that laptops that use this kind of battery. There you can find the official patch, but it doesn't work on 1680 series if you don't modify before the dsdt. In the file dsdtAspire1680.tar.gz you can find the work already done, you have only to untar the archive and follow next steps.
If you want to patch your dsdt follow these simple steps:
7a) Patch dsdt.dsl with the patches from sbs-cm (verify, that all .asl
files and the diff file of your choice is in the same directory as dsdt.dsl)
# cd PATH_TO_PATCH_AND_DSDT.DSL
# patch <acer-tm4xxx-sbs-cm.diff
patching file dsdt.dsl
7b) Compile the modified dsdt.dsl with iasl - Follow the step 6
8) Add the fixed DSDT into the kernel, there are several ways to follow to do this work:
If you are using SuSe 9.3 there are non problems
8a) copy the compiled DSDT.aml file e.g. to /etc
8b) add the path pointing to e.g. /etc/DSDT.aml to /etc/sysconfig/kernel
If you are not using Suse visit http://forums.gentoo.org/viewtopic.php?t=122145 on this forum you can find at chapter 9 some useful ways to follow.
9) Patch your kernel source code:
This kind of Laptops has another problem over the bugged DSDT, there is a missing ECDT. The ECDT is used to provide some minimal information about the Embedded Controller to the ACPI drivers before the Embedded Controller region has actually been parsed from the DSDT. This is frequently necessary before initializing the battery and ac adapter, so if you have errors in dmesg from the battery, adapter or EmbeddedControl, the ECDT is the likely culprit. The problem was that after booting, my /proc/acpi/ac_adapter and /proc/acpi/battery directories were empty.
To resolve this problem there is a patch at this address http://bugzilla.kernel.org/attachment.cgi?id=1690&action=view. This patch restore the missing ECDT-related functionality. It may be applied to both the 2.4 and 2.6 kernel source.
If you are using Suse 9.3 it doesn't work, because the sources file name change, but the code is the same. In the file acpi_patch.tar.gz you can find all the corrected files you need, you have only to copy them into the appropriate directory of your system (after a back-up of existing files!! - Naturally! ;P ).
I don't have the knowledge of how to make a patch, so I include in the tar archive a file called "differences.txt". It is an approximation of a patch, I hope someone is able to build one and send it to me.
Files to modify:
Probably you have to change the "PATH_TO_KERNEL" with "/usr/src/linux", but is better that you follow your system documentation.
10) Make sure you followed the steps 1, 2, 3, 4, 5, 6, 7, 8, 9
11) Recompile your kernel. If you don't know how
to do please refer to an official guide for your system. Basic steps are:
11a) cd /usr/src/linux <- directory of your sources
11b) make menuconfig <- to configure the parameters of your kernel
11c) make <- built
11d) make modules_install <- install modules
11e) make install <- install kernel
13) To verify:
- look at the directories /proc/acpi/ac_adapter and /proc/acpi/battery and see if they contain something
dmesg |grep -i acpi
<- to see if there are errors
http://www.whoopy.it/linux/ - This document
http://forums.gentoo.org/viewtopic.php?t=122145 - HOWTO: Fix Common ACPI Problems (DSDT, ECDT, etc.)
http://lists.suse.com/archive/suse-laptop/2005-Mar/0108.html - [suse-laptop mailing list] Re: [ACPI] acpi related problem on ACER TM 4002WLMi running SuSE 9.2
https://sourceforge.net/projects/sbs-linux/ - SBS SouceForge project home page
http://acpi.sourceforge.net/ - ACPI SourgeForge Project home page
http://www.acpi.info/ - ACPI official site
http://www.renninger.de/powersave/ - Powersave Documentation / HOWTO