Skip to main content

Acer Aspire 1694 and ACPI

So, 3 months in from purchasing my laptop, and I finally decided that i would have another shot at trying to fix ACPI problems with it. This being the fact the battery always reports dead by default, while this statement is conclusively not true (the laptop itself tells me it is full ;-)

So, to resolve this, it requires a custom [DSDT][] file to be read in, and used instead of the vendor supplied one. To do this, required some gentoo patching, with the [DSDT initrd patch][patch]. Basically this allows you to put a custom DSDT that is read on boot, from the initrd (or more so, the initramfs).

The kernel patching, and recompiling part wasn't overly hard, as the patch for my kernel applied cleanly to gentoo-sources. Recompiling to simply enable support for RAM disk and DSDT from initramfs was painless.

The hardest part in the task, was the creation of the initramfs image. While some other distributions seem to provide a mkinitramfs application, gentoo does not, only a mkinitrd. So this created some problems, with me trying to work out how to create a initramfs manually. In the end I found the solution by emerging [media-gfx/splashutils][splashutils], which contains a script called splash_geninitramfs, which gave me the answer on how to do it. For notes sake, here is how it is done.

Put all your files to be on the initramfs in a directory, for example ~/disk Then, while in directory of the files (~/disk), type the following command:

find . | cpio --quiet --dereference -o -H newc | gzip -9 > ../initramfs.img

From there, you will find your new initramfs image in the parent directory named initramfs.img.

After that, just copy initramfs.img to /boot, and add to your grub.conf

initrd /initramfs.img

And there, now I have a working Battery meter, so i know when the battery is going to go flat in future :-)

Note: These notes were how it would be done on gentoo, some distros might have a easier way of doing it (can it get much easier tho?! ;-)

[DSDT]: http://en.wikipedia.org/wiki/DSDT [patch]: http://gaugusch.at/kernel.shtml [splashutils]: http://gentoo-portage.com/media-gfx/splashutils