HowTO: Fix Laptop Battery not Detected in LXDE Applet

Although it is really the fault of the application having a certain location hard coded into them, one way to workaround a problem with the battery not being detected by the battery applet.

First though, to confirm that this fix applies to you, run the following:

ls /proc/acpi/battery

If you get something other than CMB0 in the output, this fix may not apply to you.

First thing we need to do is install the iasl compiler/decompiler

sudo apt-get install iasl

Then obtain a copy of your motherboard’s dsdt

sudo cat /proc/acpi/dsdt > dsdt.dat

Decompile the dsdt

iasl -d dsdt.dat

Then change all instances of CMB0 with BAT0 using sed

sed -i 's/CMB0/BAT0/g' dsdt.ds

and finally compile the dsdt again

iasl -tc dsdt.dsl

You may receive errors/warnings when compiling. If your system runs just fine, you can safely ignore these, else you may want to look into fixing them, as a buggy dsdt can mean that you are unable to suspend/hibernate.

To implement the new dsdt into your system, run the following:

sudo cp dsdt.aml /etc/initramfs-tools/DSDT.aml
sudo update-initramfs -u all

and then just reboot.

To test that dsdt is working, run the following:

ls /proc/acpi/battery

and you will now see BAT0 in the output.

Note: The Kernel Devs will no longer use the patch to enable custom DSDTs for all releases after Karmic. Jaunty will be the last release that this works on.


About ibuclaw
An avant developer and support analyst.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: