Introduction
With SuSE 9.3, I bought a new Sager NP4750 64-bit laptop and found that my DSDT was broken. The results of my getting that fixed are presented in: Howto Fix Your Buggy DSDT @ Howto Fix Your Buggy DSDT. - Page 14 - openSUSE Forums.
Although there is presented dsdt fixes through 10.3, that howto is terribly outdated. However, that howto still contains valuable DSDT code fixes buried throughout the thread.
HOWTO: Fix Common ACPI Problems (DSDT, ECDT, etc.) @ Gentoo Forums :: View topic - HOWTO: Fix Common ACPI Problems (DSDT, ECDT, etc.) is an excellent reference with links to more references. Re: [PATCH 1/3] The basics of DSDT from initramfs (format corrected) provides updated information now relevant to openSUSE 11.0.
What follows is the process to update that howto to openSUSE 11.0 RC1. Where the theory changes, I will point that out.
I will get this up so the members can use it, and, I will come back and put it into a Wiki format when it is fleshed out. Consider this a work-in-progress for now.
See any acpi errors or warnings in dmesg? Does your system hang when shutting down? Can’t suspend to RAM or disk? Computer won’t wakeup? Battery functions not working? Losing an IRQ? Can’t get wireless to work even though you are following exact directions? You probably have a buggy DSDT. Let’s fix it!
What is a DSDT?
“DSDT stands for Differentiated System Description Table. It is a part of the ACPI specification and it supplies configuration information about a base system.
The DSDT comprises a system description table header, followed by a definition block. The definition block is encoded using ACPI Machine Language (AML), and unlike other definition blocks on the system, the DSDT definition block can not be unloaded, as it provides the basic ACPI namespace scope that all other dynamic definition blocks can later add onto.” REF: Advanced Configuration and Power Interface - Wikipedia, the free encyclopedia
and
“6. DSDT: Differentiated System Description Table
Thanks to Erich writing this section.
You might need to override the DSDT when certain features like battery status are incorrectly reported (usually causing error messages to syslog). DELL laptops usually need this kind of override. Fixed DSDT for many systems are available on the DSDT page, along with a patch that tells the kernel to ignore the BIOS-supplied table but use the compiled-in fixed DSDT.
Basically you need to copy the fixed table into your kernel source with a special filename (or modifying the filename in the patch supplied at the DSDT page) This override is quite easy: instead of loading the DSDT table from bios, the kernel uses the compiled-in DSDT table. That’s all.” Ref: http://tldp.org/HOWTO/ACPI-HOWTO/dsdt.html
Note: While “ This override is quite easy” may be true, it is not intuitive and the some of the process and code has changed with openSUSE 11.0 RC1 – especially the last part, reading it into the kernel.
Note: Please review post #1 of the old howto @ Howto Fix Your Buggy DSDT. - Page 14 - openSUSE Forums to get an overview. Also, please scan through the code fixes for something that may apply to your DSDT should you have a DSDT problem.
Laptops
“Errors are often caused by vendors
+testing their hardware only with Windows or because there is code which is
+executed only on a specific OS with a specific version and Linux hasn’t been
+considered during the development.” Ref: Re: [PATCH 1/3] The basics of DSDT from initramfs (format corrected)
Note: The above is especially true of laptops, See: Search results - openSUSE and note that all the indicated DSDT problems are with laptops.
Section 1: Fixing the DSDT
Is your DSDT broken?
1st, and most important, is go to your OEM; get the latest BIOS; and install it. It may contain a fixed DSDT for you or at least turn on some missing functions. Also:
“+Before you run away from customising your DSDT, you should note that already
+corrected tables are available for a fair amount of computers on this web-page:
+Linux/ACPI - DSDT: Overview . Be careful though, to work correctly a DSDT has to
+match closely the hardware, including the amount of RAM, the frequency of the
+processor and the PCI cards present! “ from Re: [PATCH 1/3] The basics of DSDT from initramfs (format corrected)
Having done that, now, take a look at “dmesg” & see if you have any acpi errors, warnings, dropped IRQs, or just things that acpi didn’t accomplish.
“dmesg | grep -2i acpi” will simplify looking @ acpi lines, but I recommend looking at the full dmesg output.
In a terminal, type “dmesg” or “dmesg | grep -2i acpi” and see if you have any errors, warnings or other problems as above.
(Note: I am building this howto using my desktop. I only had one insignificant warning; we will fix that then proceed to my laptop in the next section to follow.)
How to fix Your buggy DSDT.
Get the DSDT.
Get the DSDT (written for openSUSE 11.0 RC1 file structure). Note: openSUSE 11.0 provides all the tools that we will need – no need to go looking for intel/ibm files named in the readings.
The DSDT resides in /proc/acpi/dsdt and the file will be locked.
So, as root,:
“cat /proc/acpi/dsdt > /home/yourname/dsdt.dat”
My code looks like:
jim@linux-3obf:~> su
Password:
linux-3obf:/home/jim # cat /proc/acpi/dsdt > /home/jim/dsdt.dat
inux-3obf:
Disassemble the DSDT
The “iasl” tools reside in /usr/sbin.
So, cd /usr/sbin
“./iasl -d /home/yourname/dsdt.dat”
This will create a file called dsdt.dsl, which contains the disassembled DSDT.
My code looks like:
jim@linux-3obf:~> su
Password:
linux-3obf:/home/jim # cd /usr/bin
linux-3obf:/usr/bin # ./iasl -d /home/jim/dsdt.dat
Intel ACPI Component Architecture
AML Disassembler version 20080213 [May 30 2008]
Copyright (C) 2000 - 2008 Intel Corporation
Supports ACPI Specification Revision 3.0a
Loading Acpi table from file /home/jim/dsdt.dat
Acpi table [DSDT] successfully installed and loaded
Pass 1 parse of [DSDT]
Pass 2 parse of [DSDT]
Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)
.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Parsing completed
Disassembly completed, written to "/home/jim/dsdt.dsl"
And I now have dsdt.dsl in /home/myname.
Open Kwrite; open /home/yourname/dsdt.dsl; click on view and select line numbers.
The acpi numbered errors and warning from dmesg should show up with the same number line here – but it won’t show the errors.
Find your errors & warnings.
Recompile the DSDT.
Note, Here we have the 1st deviation from the old howto.
linux-3obf:/usr/bin # ./iasl -tc /home/jim/dsdt.dsl
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20080213 [May 30 2008]
Copyright (C) 2000 - 2008 Intel Corporation
Supports ACPI Specification Revision 3.0a
Error 4067 - Could not open file "/home/jim//home/jim/dsdt.aml" (No such file or directory)
linux-3obf:/usr/bin # cd /home/jim
No way could I get around “Error 4067 - Could not open file “/home/jim//home/jim/dsdt.aml” (No such file or directory)” using iasl from that folder/directory; I had to copy it to /home to get it to work.
If you do the above, delete dsdt.src & dsdt.hex > to trash
So, let’s do it the way it worked for me.
Start over:
Find your errors & warnings.
Recompiling the DSDT finds our errors & warnings
In Filemanager Superuser Mode, copy ./iasl from /usr/bin to /home/yourname.
jim@linux-3obf:~> cd /home/jim
jim@linux-3obf:~> ./iasl -tc dsdt.dsl
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20080213 [May 30 2008]
Copyright (C) 2000 - 2008 Intel Corporation
Supports ACPI Specification Revision 3.0a
dsdt.dsl 349: Method (\_WAK, 1, NotSerialized)
Warning 1079 - ^ Reserved method must return a value (_WAK)
ASL Input: dsdt.dsl - 7014 lines, 220284 bytes, 2648 keywords
AML Output: /home/jim/dsdt.aml - 23785 bytes 938 named objects 1710 executable opcodes
Compilation complete. 0 Errors, 1 Warnings, 0 Remarks, 779 Optimizations
jim@linux-3obf:~>
If you have a buggy DSDT; you will get errors & warnings as I did above. If you don’t have a buggy DSDT it will compile and create 2 files: dsdt.hex and DSDT.aml.
The DSDT.aml is our goal for this section.
Continued in the next post.