HowTO: Fix Laptop Battery not Detected in LXDE Applet
September 15, 2009 Leave a comment
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.