Some toshiba notebooks wont recognize battery state <SOLVED>
Posted: Fri Jun 01, 2012 9:44 am
In some Toshiba notebook models, like mines (Toshiba Satellite L645-SP4135L) Linux doesn't recognize the battery. I will try to make it easy so the kernel gets the data from the battery state
There are two ways to solve this issue, modify some parameters and recompile the kernel ore solve it via grub without the need to recompile anything. I'm going to focus on the second option so, if I update my kernel, I don't have to recompile it again.
First I have to see if the kernel really doesn't detect my battery by running in terminal cat/proc/acpi/battery/BAT1/*
mukenio@notebook:~$ cat/proc/acpi/battery/BAT1/
cat /proc/acpi/battery/BAT1/*
present: no
present: no
present: no
mukenio@notebook:~$ dmesg | grep batt
[ 1.370268] ACPI: Battery Slot [BAT1] (battery absent)
Here we see that the kernel doesn't recognize it, so, from here, the only thing we need is the terminal open.
Obtain the DSDT (Differentiated System Description Table) by running
$sudo cat /sys/firmware/acpi/tables/DSDT > DSDT.dat
(The DSDT is one of the tables where OS can obtain data from the hardware)
Now we dissemble it by the command
$sudo iasl -d DSDT.dat
(if the command fails, you need to install iasl package)
Edit the file that has been generated from the step below,
Don't try to edit it with gedit or kate, it can give you some troubles
I recommend vi or nano
$sudo nano DSDT.dsl
and replace
OperationRegion (EMEM, SystemMemory, 0xFF808001, 0xFF)
with
OperationRegion (EMEM, EmbeddedControl, 0×00, 0xFF)
IMPORTANT: do not copy / paste this string... write it, if you copy/paste it, it wont work.
(In nano you can find the string by pressing Ctrl-W)
Save changes and exit. (Ctrl-O in nano to save, Ctrl-X exits)
Generate the file DSDT.aml by running
$sudo iasl -tc DSDT.dsl
Copy these las file to the directory /boot
sudo cp DSDT.aml /boot
Download http://dl.dropbox.com/u/155504/toshiba% ... on/01_acpi and give permissions to execute and copy it to /etc/grub.d/
Supposing that the download was made to the user directory, the command goes like this:
$chmod +x 01_acpi ; sudo cp 01_acpi /etc/grub.d
Re-generate the grub by running:
sudo update-grub2
Now, by restarting and login in, you should see the batter icon
If it doesn't, run
cat /proc/acpi/battery/BAT1/*
And see if you get anything like these:
$cat /proc/acpi/battery/BAT1/*
alarm: unsupported
present: yes
design capacity: 4500 mAh
last full capacity: 2389 mAh
battery technology: rechargeable
design voltage: 10825 mV
design capacity warning: 300 mAh
design capacity low: 200 mAh
cycle count: 0
capacity granularity 1: 32 mAh
capacity granularity 2: 32 mAh
model number: PA3817U-1BRS
serial number:
battery type: LION
OEM info: SANYO
present: yes
capacity state: ok
charging state: discharging
present rate: 1820 mA
remaining capacity: 132 mAh
present voltage: 10701 mV
If you don't get this, repeat the steps.
Sorry for my English... is not my mother language, I hope it helps you.
Original document: http://heraldolinux.blogspot.com.ar/201 ... ia-no.html by mukenio
Translated by jeroseijas
There are two ways to solve this issue, modify some parameters and recompile the kernel ore solve it via grub without the need to recompile anything. I'm going to focus on the second option so, if I update my kernel, I don't have to recompile it again.
First I have to see if the kernel really doesn't detect my battery by running in terminal cat/proc/acpi/battery/BAT1/*
mukenio@notebook:~$ cat/proc/acpi/battery/BAT1/
cat /proc/acpi/battery/BAT1/*
present: no
present: no
present: no
mukenio@notebook:~$ dmesg | grep batt
[ 1.370268] ACPI: Battery Slot [BAT1] (battery absent)
Here we see that the kernel doesn't recognize it, so, from here, the only thing we need is the terminal open.
Obtain the DSDT (Differentiated System Description Table) by running
$sudo cat /sys/firmware/acpi/tables/DSDT > DSDT.dat
(The DSDT is one of the tables where OS can obtain data from the hardware)
Now we dissemble it by the command
$sudo iasl -d DSDT.dat
(if the command fails, you need to install iasl package)
Edit the file that has been generated from the step below,
Don't try to edit it with gedit or kate, it can give you some troubles
I recommend vi or nano
$sudo nano DSDT.dsl
and replace
OperationRegion (EMEM, SystemMemory, 0xFF808001, 0xFF)
with
OperationRegion (EMEM, EmbeddedControl, 0×00, 0xFF)
IMPORTANT: do not copy / paste this string... write it, if you copy/paste it, it wont work.
(In nano you can find the string by pressing Ctrl-W)
Save changes and exit. (Ctrl-O in nano to save, Ctrl-X exits)
Generate the file DSDT.aml by running
$sudo iasl -tc DSDT.dsl
Copy these las file to the directory /boot
sudo cp DSDT.aml /boot
Download http://dl.dropbox.com/u/155504/toshiba% ... on/01_acpi and give permissions to execute and copy it to /etc/grub.d/
Supposing that the download was made to the user directory, the command goes like this:
$chmod +x 01_acpi ; sudo cp 01_acpi /etc/grub.d
Re-generate the grub by running:
sudo update-grub2
Now, by restarting and login in, you should see the batter icon
If it doesn't, run
cat /proc/acpi/battery/BAT1/*
And see if you get anything like these:
$cat /proc/acpi/battery/BAT1/*
alarm: unsupported
present: yes
design capacity: 4500 mAh
last full capacity: 2389 mAh
battery technology: rechargeable
design voltage: 10825 mV
design capacity warning: 300 mAh
design capacity low: 200 mAh
cycle count: 0
capacity granularity 1: 32 mAh
capacity granularity 2: 32 mAh
model number: PA3817U-1BRS
serial number:
battery type: LION
OEM info: SANYO
present: yes
capacity state: ok
charging state: discharging
present rate: 1820 mA
remaining capacity: 132 mAh
present voltage: 10701 mV
If you don't get this, repeat the steps.
Sorry for my English... is not my mother language, I hope it helps you.
Original document: http://heraldolinux.blogspot.com.ar/201 ... ia-no.html by mukenio
Translated by jeroseijas