Advertisement

ACPI Kernel Mod -- DSDT Decompile/Recompile

Started by December 30, 2005 03:48 PM
1 comment, last by Halsafar 18 years, 8 months ago
Okay So I got some instructions to extract a file called DSDT from who knows where using an INTEL ACPI Compile. Once this file was out I had to decompile it then try to recompile to route out all the error. Which after much work I did. Then I successfully recompiled it. This is all good so far, this is a long quest to get Mandriva to even recognize my laptop battery. I found many sites with the EXACT same instruction set but they all leave out the important stuff. After getting a working DSDT.aml file, apparently I need to patch my kernel? insert the new DSDT file? Reinstall LiLO... Bah, none of them state even one step into any of this and it sounds like the most complex part. I am using mandriva 2006 and would love some assistance.
I've been through the same hassle with my dad's laptop and I found out that the exact procedure varies very much depending on your kernel version. All the kernels I have done this with used the initrd method, which is appending the DSDT your initrd file with the appropriate magic header and footer strings. Apparently a patch exists that allows you to compile the DSDT directly into the kernel as well.

At one point I remember having read conflicting instructions on how the magic identifiers had to be inserted. I ended up looking at the kernel source of my distribution to find out exactly how the loading procedure was coded in that particular version.

First you should install the kernel source of your distribution and run make oldconfig on it. Then run make menuconfig and see if you can find an option to load the DSDT from the initrd. If you can't find it then it is time to patch and compile the kernel manually. Finding a working patch for heavily modified kernels such as Mandriva's can be a nightmare.

After compiling the kernel you will have to build yourself a new initrd. This is done differently by almost every distro, but usually the key command is mkinitrd. Read its manual page.

Keep in mind that if you use one of the mainstream distros with the windows-update-wannabe update programs then you'll have to be careful with kernel updates. They might overwrite your custom kernel and initrd or set the boot loader to boot their new version instead.


My dad's laptop is currently using SuSE 9.3, which is the first distro that handles the initrd customization issue exceedingly well. All you have to do to have your custom DSDT inserted into the initrd after every kernel update is copy it to a certain directory under /etc/mkinitrd (IIRC) and run mkinitrd. No recompilations needed. If you find that Mandriva has too many issues and don't mind a reinstall, consider trying SuSE.

It truly is frustrating that most laptops have buggy/nonstandard ACPI implementations these days :(

P.S. A useful link just in case you've missed it: http://acpi.sourceforge.net/
Advertisement
Great reply. Im glad you understand my frusteration.
How nice it would be to have my linux install recognize my battery. I've never compiled my own kernel, getting this all to work sounds like there is way to many chances for me to screw up. Since I've already caused my Mandriva install to be unbootable twice (had to rescue it twice) I think I'll just leave it as it is. If I'm running on battery power then I'll just stay logged in Windows, as sad as that is.

That link is pretty interesting, I'll continue reviewing the page as it may have an elegant solution.

Thanks again,
Halsafar

This topic is closed to new replies.

Advertisement