# acpi and batterystatus

## kupo

I have a problem on my laptop. It seems that my /proc/acpi/battry and ac_adapter is empty

My laptop is an Acer Travelmate 2301 LCi

Is there any workaround?

----------

## desertstalker

There may be a problem with the DSDT provided by the laptops bios.  There is a howto on how to use a patched DSDT on these forums https://forums.gentoo.org/viewtopic.php?t=122145.

Otherwise you may not have compiled or loaded the batters modules of the kernel ACPI.

Hope this helps

----------

## kupo

Yeah, I did try that howto... however I'm not great with hacking the code   :Crying or Very sad: 

But I give it a try again

----------

## kupo

I think I did it now... must have to reboot to see if...   :Wink: 

----------

## desertstalker

good luck

did you check to see if there is an already fixed DSDT on acpi.sourceforge.net

----------

## kupo

yup, and now as I understand it's not DSDT that's messing with me, it's ECDT.

so I guess I just have to wait for a patch  :Surprised: 

----------

## kupo

man it's annoying not to se how much battery that's left  :Neutral: 

----------

## kupo

So... this is the output of: dmesg | grep -i acpi

as you may see I have done the patchthingy as described in this thread https://forums.gentoo.org/viewtopic.php?t=122145

```

 BIOS-e820: 000000000eee0000 - 000000000eeec000 (ACPI data)

 BIOS-e820: 000000000eeec000 - 000000000ef00000 (ACPI NVS)

ACPI: RSDP (v000 ACER                                  ) @ 0x000f62e0

ACPI: RSDT (v001 ACER   Kestrel  0x20020803  LTP 0x00000000) @ 0x0eee7c68

ACPI: FADT (v001 ACER   Kestrel  0x20020803 PTL  0x00000050) @ 0x0eeebf2c

ACPI: HPET (v001 ACER   Kestrel  0x20020803 PTL  0x00000000) @ 0x0eeebfa0

ACPI: BOOT (v001 ACER   Kestrel  0x20020803  LTP 0x00000001) @ 0x0eeebfd8

ACPI: DSDT (v001 ACER   Kestrel  0x20020803 MSFT 0x0100000e) @ 0x00000000

Kernel command line: root=/dev/hda5 vga=791 acpi=noirq acpi_os_name="Microsoft W                   indows XP"

ACPI: Overriding _OS definition Microsoft Windows XP

ACPI: Looking for DSDT in initrd... found (at offset 0x00).

    ACPI-0291: *** Info: Table [DSDT] replaced by host OS

ACPI: IRQ9 SCI: Edge set to Level Trigger.

ACPI: Subsystem revision 20040816

ACPI: Interpreter enabled

ACPI: Using PIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (00:00)

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCIB._PRT]

ACPI: Embedded Controller [EC0] (gpe 29)

ACPI: Power Resource [PFN0] (off)

ACPI: Power Resource [PFN1] (off)

ACPI: Power Button (FF) [PWRF]

ACPI: Lid Switch [LID]

ACPI: Sleep Button (CM) [SLPB]

ACPI: Fan [FAN0] (off)

ACPI: Fan [FAN1] (off)

ACPI: Processor [CPU0] (supports C1 C2 C3, 8 throttling states)

ACPI: Thermal Zone [THRM] (52 C)

ACPI wakeup devices: 

ACPI: (supports S0 S3 S4 S5)

```

I guess this means that ECDT is missing..?

----------

## Clansman

 *kupo wrote:*   

> I have a problem on my laptop. It seems that my /proc/acpi/battry and ac_adapter is empty
> 
> My laptop is an Acer Travelmate 2301 LCi
> 
> Is there any workaround?

 

sorry for the bad news, but i think you have a smart battery. 

known smartbattery acer models:

Travelmate 4001 LMi/WLMi (mine)

Travelmate 4002 LMi/WLMi

Travelmate 8005LMi

Travelmate 4501WCi

some Travelmate 292 (Extensa 2920)

Extensa 3001

now probably travelmate 2301 LCi.

the problem with the smart battery is that there is NO linux support for it. so you will be left with no AC or battery information for some time.

i'm still to find out a method for people to diagnose the presence smartbatteries.

yes, the DSDT has some warnings that can be fixed but won't make it work if you have a smartbattery.

[]

----------

## kupo

d*mn.  :Sad: 

I hope they'll come with support soon. It's so annoying :/

Oh well, thanks for the info Clansman

----------

## Clansman

 *kupo wrote:*   

> d*mn. 
> 
> I hope they'll come with support soon. It's so annoying :/
> 
> Oh well, thanks for the info Clansman

 

don't hold your breath. there isn't many people willing to write such and those who are (like me) don't have the time or the knowledge/experience to do so.l

the acpi mailing list has little activity on this subject, but some people there are working on it.

[]

----------

## kupo

 *Clansman wrote:*   

>  *kupo wrote:*   d*mn. 
> 
> I hope they'll come with support soon. It's so annoying :/
> 
> Oh well, thanks for the info Clansman 
> ...

 

oh. okey...

well, I join the list and see how it goes   :Rolling Eyes: 

----------

## Necro

does anybody have any news regarding this subject?

I also have a smart battery (acer travelmater 2302LC)

----------

## Clansman

no.

the drivers are being built on a spare-time basis.

as far as i know there is no useful work yet, except for documentation research.

[]

----------

## Chewieip

I've been looking for ACPI battery support for my ACER TRAVELMATE 4002 LMI and finally I found this post. 

What's the diference between SmartBattery and normal Batteries? How can I compute remaining time of my battery? I've noticed that with windows it can work 4 hours more or less at minimus. But if I don't know how long battery left the computer will halt with any notice? 

I'm really annoyed.

----------

## Clansman

 *Chewieip wrote:*   

> I've been looking for ACPI battery support for my ACER TRAVELMATE 4002 LMI and finally I found this post. 
> 
> What's the diference between SmartBattery and normal Batteries? How can I compute remaining time of my battery? I've noticed that with windows it can work 4 hours more or less at minimus. But if I don't know how long battery left the computer will halt with any notice? 
> 
> 

 

the smartbattery system is a structured and modular system for battery management. It supports more than one charger, more than one battery and works standalone. You can communicate with it's several components and control their functioning, but if you leave it alone, it will work without any direct or indirect OS or user influence.

basically it's a well built battery system. unfortunately it isn't a standard. Don't know if it's a question of time or not. the fact is that smartbatteries are rare.

If you don't have a smartbattery driver, there is no way to compute it's battery remaining charge, thus you'll have to wait (hopefully not for long) for a driver that reads your smartbattery settings and information.

[]

----------

## Clansman

hi everyone,

smartbattery test drivers are already written (not by me) and things are looking good. they still need time to mature before thinking of inclusion on the main kernel.

Stay tuned. I'll post download links soon for people to try it out.

[]

----------

## Chewieip

I've followed all notice from acpi-digest and I'm trying to patch my kernel. But I received always the same message: 

```
/bin/sh: line 1: /home/chewie/acpi/acpi_sbs-20050118/.tmp_versions/i2c-acpi-ec.mod: Permiso denegado

/bin/sh: line 1: /home/chewie/acpi/acpi_sbs-20050118/.tmp_versions/acpi-sbs.mod: Permiso denegado

*** Warning: "i2c_del_adapter" [/home/chewie/acpi/acpi_sbs-20050118/i2c-acpi-ec.ko] undefined!

*** Warning: "i2c_add_adapter" [/home/chewie/acpi/acpi_sbs-20050118/i2c-acpi-ec.ko] undefined!

*** Warning: "acpi_ec_read" [/home/chewie/acpi/acpi_sbs-20050118/i2c-acpi-ec.ko] undefined!

*** Warning: "acpi_ec_write" [/home/chewie/acpi/acpi_sbs-20050118/i2c-acpi-ec.ko] undefined!
```

I've read to include EXPORT_FILE(acpi_ec_read) in the drivers/acpi/acpi-ec.c but it doesn't works. Do you have the same problem? How do you solve it?

----------

## Clansman

here's the link for the most recent build

http://shayol.bartol.udel.edu/~rhdt/download/acpi_sbs-20050119.tar.gz

this is not for unexperienced users. documentation is not abundant.

one needs to patch the kernel just to export some symbols in drivers/acpi/ec.c and then just

modprobe i2c-dev

insmod i2c-acpi-ec.ko

insmod acpi-sbs.ko

and /proc/acpi/sbs appears with relevant information. also /proc/acpi/battery and /proc/acpi/ac_adapter appear as legacy proc files.

[]

----------

## Clansman

 *Chewieip wrote:*   

> I've followed all notice from acpi-digest and I'm trying to patch my kernel. But I received always the same message: 
> 
> ```
> /bin/sh: line 1: /home/chewie/acpi/acpi_sbs-20050118/.tmp_versions/i2c-acpi-ec.mod: Permiso denegado
> 
> ...

 

please describe your exact steps. error messages don't mean much without context

[]

----------

## Chewieip

that errors appears when I do the make from the files from the tar archive. I've patched the kernel with the diff file and when I do the make this warning appears. If I run the make install and the 

```
 modprobe i2c-acpi-ec
```

 doesn't work and returns that message:

[code]

FATAL: Error inserting i2c_acpi_ec (/lib/modules/2.6.10-gentoo-r4/i2c/i2c-acpi-ec.ko): Invalid module format

[code]

Anyone knows what could it be?[/code]

----------

## Necro

make and make install worked perfectly here

probing the i2c-acpi-ec module gave an error (the same one as described in the previous reply)

dmesg showed:

```
i2c_acpi_ec: Unknown symbol i2c_del_adapter

i2c_acpi_ec: Unknown symbol i2c_add_adapter

i2c_acpi_ec: Unknown symbol acpi_ec_write

i2c_acpi_ec: Unknown symbol acpi_ec_read
```

so the firts problem i came across was that i didnt have the i2c-core and i2c-dev module compiled in my kernel (be sure to compile them as modules)

```
Device Drivers --->

      I2C support --->

          <M> I2C Support

             <M> I2C Device Interface
```

then i modprobed i2c-dev and now dmesg only shows the last 2 errors

```
i2c_acpi_ec: Unknown symbol acpi_ec_write

i2c_acpi_ec: Unknown symbol acpi_ec_read
```

so modprobing i2c-acpi-ec still doesnt work

the next thing i tried was reinserting the module

```
# insmod i2c-acpi-ec.ko

insmod: error instering 'i2c-acpi-ec.ko' : -1 Unknown symbol in module
```

and dmesg shows this agin:

```
i2c_acpi_ec: Unknown symbol acpi_ec_write

i2c_acpi_ec: Unknown symbol acpi_ec_read
```

so that didnt work at all :p

modprobing the acpi-sbs module works fine though

----------

## Necro

ow my god, i got it working now  :Very Happy: 

this is what i did:

1) download the source from http://shayol.bartol.udel.edu/~rhdt/download/acpi_sbs-20050119.tar.gz

2)  Patch the kernel

```
# cd /usr/src/linux

# patch -d1 < [PATH_TO_SOURCE]/acpi-ec-2.6.10.diff
```

3) Enabeling I2C support (be sure to compile as a module)

```
Device Drivers --->

      I2C support --->

          <M> I2C Support

             <M> I2C Device Interface
```

also, make sure you have disabled acpi battery and acpi ac adapter support in your kernel

they can be found in 'Power Management ---> ACPI ( ... )  ---> '

4) Compiling the kernel and booting into the new kernel (example shows a 2.6 kernel)

```
# make && make modules_install

# mount /boot

# cp System.map /boot/.... (whatever the system.map name is in your /boot)

# cp arch/i386/boot/bzImage /boot/.... (whatever the kernel image is in you /boot)

# umount /boot

# reboot
```

5) modprobing all the right modules

```
# modprobe i2c-dev

# modprobe i2c-acpi-ec

# modprobe acpi-sbs
```

6) enjoy  :Very Happy: 

congratz to all who helped develop this, realy nice work   :Wink: 

----------

## Chewieip

Thank you all have done that driver! It works correctly now. It only rests to look for the throtle of my cpu.

----------

## Skyhawk

 *Quote:*   

> # patch -d1 < [PATH_TO_SOURCE]/acpi-ec-2.6.10.diff

 

I did this with the p1 option, because d1 give me an error. (not a directory)

 *Quote:*   

>  # patch -p1 < [PATH_TO_SOURCE]/acpi-ec-2.6.10.diff

 

----------

## buckminster

Hi Guys,

I hope somebody of you is willing to write a little answer to my question, that is only asked to see, if there´s a little hope for me and my Acer Extensa 3002.

You were just talking about Acer and their smart battery. I don´t know if my 3002 has such battery, but I also didn´t got any files in AC_Adapter and Battery.

So, first of all, you repaired your DSDT. After that you patched the kernel-sources, as mentioned above.

That was it? Is there a real chance to get it to work.

Nevertheless there´s a lot of work for me. At the moment I have an empty DSDT file in the acpi folder. Maybe it´s because I made a mistake in configure the kernel?

I hope someone of you will write an answer.

Many thanks.

Frank

----------

## phrozen77

i got an acer extensa 3000 wlmi and mine apparently has a smart battery and therefore broken /proc/acpi/battery, too...

but i got it fixed with the mentioned kernel-fix  :Smile: 

things that were not too clear to me in the first place (as they were not mentioned explicitly earlier) but i came to upon reading the README supplied together with the patch:

you need to make && make install after you patched your kernel (patching mine also didnt work with the -d1 but with the p1 option)

then modprobe the 3 modules and if you dont get any errors back, i guess your safe to autoload them on startup...

happy battery-watching  :Wink: 

----------

## buckminster

Thanks for the reply phrozen77,

I will try that later on. If it works for me, I will be a happy battery-watcher all day long.

Bye

Frank

----------

## buckminster

Hi,

maybe I´m too noob, I read the README of the patch, but I got some questions now.

It was the first time I had to patch the kernel, so I was a little bit unsure what to do. But here´s what I understand:

1) The patch cmd does change a certain file in the (defined by the link ln) sources.

2) (I did the changes about acpi battery and the ac_adapter in the kernel config already)

3) The "make" and the "make install" - run from the folder with the patch files - build the modules and install them into the the drivers folder of the actual kernel (/lib/.../drivers).

4) Now the README says: do a modprobe - but for my understanding, the patch didn´t have any affect to the kernel - isn´t it necessary to build a new kernel (including the patch) from the top of /usr/src/linux ???

I tried the modprobe, but it ends with an error message. For me it would be logic to build a new kernel.

Please be so kind and tell me if I´m getting things wrong or right how to go on with this.

Many thanks.

Frank

----------

## phrozen77

yes, you need to rebuild your kernel after patching... (probably you already need to because of the changes to acpi -> ac & battery)

followed by a reboot, you may try to modprobe the 3 modules and if everything wents well, autoload / insmod them

----------

## buckminster

Thanks again,

I tried it, although I wasn´t sure. Now you see me  :Laughing: .

It worked without correcting the DSDT. Were you able to cat your DSDT into a seperate file to disassemble it? Mine is empty. But for the moment I´m a happy man with a little battery symbol in my taskbar.

Bye

Frank

----------

## phrozen77

yes, my DSDT wasnt empty...

also tried recompilig it and only (?) got 3 warnings, no errors...

so i decided to leave what it is and head for the solution of my problem  :Wink: 

regards

----------

## Lightspeed

Wow, smart battery support!

I have applied the kernel patch as described and now get the /proc/acpi/sbs/ hierarchy which gives the correct information for my battery. I didn't have to alter the DSDT for it to work. This is on an Acer Aspire 1681LCi.

I also disabled the entries for ACPI ac_adapter and battery support in the kernel config, but I still don't get the /proc/acpi/ac_adapter or /proc/acpi/battery files.

----------

## buckminster

Hi,

does it mean it works?

On my Acer Extensa 3002 WLMI there are ac_adapter and battery, and also there are sbs and ec.

It works properly with kde.

Greets

Frank

----------

## santa_claus

seems the acer aspire1680 has smart batteries too. 

Is there a patch for 2.6.11 or do I have to go back?

thanks,

Klaus

----------

## buckminster

Hi,

I didn´t look for a patch for 2.6.11. I have the 2.6.10 working.

Bye

Frank

----------

## santa_claus

Hi,

I finally got time to go back to kernel 2.6.10 and apply the patch. Everything is working fine  :Smile:  . So, the ACER 1681WLCI-XPH PM715 has smart batteries, too.

----------

## teixeira

Hi I don't know if this happen to someone but with smart battery support enable my system freeze 5 on 5 seconds.... if i write something during this freeze it no appear it's like I didn't write anything... the freeze take 1 second or less but it's very annoying... aspire 4002LMI

----------

## sepultado

this thing is not working

 # modprobe i2c-acpi-ec

FATAL: Module i2c_acpi_ec not found.

modprobe acpi-sbs

FATAL: Module acpi_sbs not found.

besides ..

Battery status : <not available>

 AC adapter     : <error>  :Exclamation: 

----------

## sepultado

im sorry for my post before...

it was that i was missing a few steps.

i got a Acer TravelMate 4000... and the AC y Battery Status are working fine.. 

dont forget after patch the file... to run make && make install..  :Rolling Eyes: 

----------

## sepultado

hi,,, I just updated my kernell to 2.6.11-r11 

i was trying to get my smartbattery working with acpi_sbs-20050120... like i have done it before.. but this time when i tried to 

load the module i2c-acpi-ec .. i got this error:

#modprobe i2c-acpi-ec  

FATAL: Error inserting i2c_acpi_ec (/lib/modules/2.6.11-gentoo-r11/i2c/i2c-acpi-ec.ko): Unknown symbol in module, or unknown parameter (see dmesg)

Even worse.. when i tried to compile my kernel .. i couldnt!!! i got a bunch of errors... ive been googling to see if i can find a patch 

for 2.6.11.. i mean this patch "acpi-ec-2.6.10.diff",,,  cause i thought since the patch is for 2.6.10.. ive been getting these errors..

if any of u could give me any help... :Confused: 

----------

## Necro

I updateted to 2.6.11-r9 a few days ago, and I had no problems getting it to work again.

what does your dmesg say?

And could you make sure "i2c" and "i2c device interface" are compiled as modules in your new kernel.

----------

## sepultado

well.. i do have them as modules... And the errors that the dmesg shows "

i2c_acpi_ec: Unknown symbol acpi_ec_write

i2c_acpi_ec: Unknown symbol acpi_ec_read

i had it working before... i dont know what im doing wrong..

this is what i did..I patched the kernel.. Compile the modules and then install them.. but it seems like there is a

problem with the i2c_acpi_ec ... im more worry cause... now i cant even compile my kernell... i get these mesg:

 :Sad: 

# make 

  CHK     include/linux/version.h

make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.

  CHK     include/linux/compile.h

  CHK     usr/initramfs_list

  CC      drivers/acpi/ec.o

drivers/acpi/ec.c:138: error: `acpi_ec_write' undeclared here (not in a function)

drivers/acpi/ec.c:138: error: initializer element is not constant

drivers/acpi/ec.c:138: error: (near initialization for `__ksymtab_acpi_ec_write.value')

drivers/acpi/ec.c:243: error: redefinition of `__kstrtab_acpi_ec_write'

drivers/acpi/ec.c:138: error: `__kstrtab_acpi_ec_write' previously defined here

drivers/acpi/ec.c:243: error: redefinition of `__ksymtab_acpi_ec_write'

drivers/acpi/ec.c:138: error: `__ksymtab_acpi_ec_write' previously defined here

drivers/acpi/ec.c:336: error: redefinition of `__kstrtab_acpi_ec_write'

drivers/acpi/ec.c:243: error: `__kstrtab_acpi_ec_write' previously defined here

drivers/acpi/ec.c:336: error: redefinition of `__ksymtab_acpi_ec_write'

drivers/acpi/ec.c:243: error: `__ksymtab_acpi_ec_write' previously defined here

drivers/acpi/ec.c:390: error: redefinition of `__kstrtab_acpi_ec_write'

drivers/acpi/ec.c:336: error: `__kstrtab_acpi_ec_write' previously defined here

drivers/acpi/ec.c:390: error: redefinition of `__ksymtab_acpi_ec_write'

drivers/acpi/ec.c:336: error: `__ksymtab_acpi_ec_write' previously defined here

drivers/acpi/ec.c:412: error: redefinition of `__kstrtab_acpi_ec_write'

drivers/acpi/ec.c:390: error: `__kstrtab_acpi_ec_write' previously defined here

drivers/acpi/ec.c:412: error: redefinition of `__ksymtab_acpi_ec_write'

drivers/acpi/ec.c:390: error: `__ksymtab_acpi_ec_write' previously defined here

drivers/acpi/ec.c:436: error: redefinition of `__kstrtab_acpi_ec_write'

drivers/acpi/ec.c:412: error: `__kstrtab_acpi_ec_write' previously defined here

drivers/acpi/ec.c:436: error: redefinition of `__ksymtab_acpi_ec_write'

drivers/acpi/ec.c:412: error: `__ksymtab_acpi_ec_write' previously defined here

drivers/acpi/ec.c:517: error: redefinition of `__kstrtab_acpi_ec_write'

drivers/acpi/ec.c:436: error: `__kstrtab_acpi_ec_write' previously defined here

drivers/acpi/ec.c:517: error: redefinition of `__ksymtab_acpi_ec_write'

drivers/acpi/ec.c:436: error: `__ksymtab_acpi_ec_write' previously defined here

drivers/acpi/ec.c:138: error: __ksymtab_acpi_ec_write causes a section type conflict

{standard input}: Assembler messages:

{standard input}:107: Error: symbol `__kstrtab_acpi_ec_write' is already defined

{standard input}:143: Error: symbol `__kstrtab_acpi_ec_write' is already defined

{standard input}:149: Error: symbol `__ksymtab_acpi_ec_write' is already defined

{standard input}:164: Error: symbol `__kstrtab_acpi_ec_write' is already defined

{standard input}:170: Error: symbol `__ksymtab_acpi_ec_write' is already defined

{standard input}:176: Error: symbol `__kstrtab_acpi_ec_write' is already defined

{standard input}:182: Error: symbol `__ksymtab_acpi_ec_write' is already defined

{standard input}:188: Error: symbol `__kstrtab_acpi_ec_write' is already defined

{standard input}:194: Error: symbol `__ksymtab_acpi_ec_write' is already defined

{standard input}:200: Error: symbol `__kstrtab_acpi_ec_write' is already defined

{standard input}:206: Error: symbol `__ksymtab_acpi_ec_write' is already defined

{standard input}:249: Error: symbol `__ksymtab_acpi_ec_write' is already defined

make[2]: *** [drivers/acpi/ec.o] Error 1

make[1]: *** [drivers/acpi] Error 2

make: *** [drivers] Error 2

----------

## sepultado

SORRY ... MY BAD MAN ...

my problem was that i forgot to compile the kernel after i patched it..

so far so good  :Laughing: 

But thanks anyways!!

----------

## garo

If somebody is wondering : Travelmate 2201WLC's (and probably all travelmate 2200's) don't have a smart battery but they do have a bad DSDT.

----------

## santa_claus

hi,

I recently changed to udev and the smart battary support stopped to work. I am just wondering if I screwed something up or wheather the smart battery support doesnt go with udev?

Thanks,

Klaus

----------

