# ACPI on Laptop (several questions)

## ElCondor

Hi out there  :Smile: 

I own a Sony Vaio GRX316 (P4 processor), most things work pretty well, but I have some questions concerning ACPI (since this notebook has no longer APM-support):

 Since 2.4.19-gentoo-r4 ACPI support works fine, I can read loads of values out of /proc/apci/

but acpid does not start, it complains

```
 * Starting acpid...

acpid: this kernel does not support proper event file handling.

Please get the patch from http://acpid.sourceforge.net                    [ !! ]
```

 has anyone got acpid running?

 how do I suspend my laptop using acpi, like I did with apm -z?

 how can I make my laptop change the cpu-frequency or sleep-states? during booting it either goes to 1.6GHz when AC is online or 1.2GHz when offline.

 are there any (gnome-)applets supporting ACPI? everything I found supports APM .. only.

Any hint appreciated!  :Smile: 

* ElCondor pasa *

----------

## pbienst

I figured I'd upgrade the kernel to r7, as it contains a new version of ACPI.

However, the kernel crashed when trying to bring up ACPI, so I think I'll wait a couple more versions to enable ACPI...

----------

## rphillips

Be careful with ACPI... Some laptops don't support it, or don't support it fully.

----------

## tekmage

I got the same error on my Toshiba 5005-S505 when I tried to start acpid.  You can still power off the machine with 'shutdown -h' even without acpid running. so you may not need it. But to your question, It looks like you need to have the latest patches from http://www.sourceforge.net/projects/acpi/  on your kernel to support the event interfaces. It looks like they have patches for 2.4.18 and  2.5.18.  You could try  'emerge vanilla-sources' to get a base 2.4.18, then apply the patches  and rebuild your kernel with acpi support enabled.  I have not been able to get the patch to cleanly apply to 2.4.18, but maybe you will have better luck.

happy hacking,

rca

----------

## Hole

On a sony vaio laptop you could check out vaiod which will handle the screen brightness with ac power etc.

http://www.leenux.org.uk/ - Goto downloads and look in Linux - Laptops.

/me is author (shameless plug)

----------

## ElCondor

I have the sonypi module loaded and i'm using spicctrl program to access the bios for changing brightness, reading battery status, etc. I tried to compile vaiod, but something with aclocal seems to be broken .. due to lack of time currently, I will have to check this out late, but thanks for the hint!  :Smile: 

* ElCondor pasa *

----------

## swingarm

I tried using it on my Dell I8200 and received kernel panics too.  Later found out it has to do with the r7 version of the Gentoo 2.14.19 kernel, I too will wait until the next revision or two has come out and several people have successfully tried it before doing it myself again..

----------

## linux_student

Greetings,

      I have had similar problems with my Gateway 450; acpid wouldn't start w/ linux-2.4.19-gentoo-r5, and kernel panics w/ vanilla 2.4.18... kernel 2.5.24 seems to work, but I am in a peculiar situation :

What the fsck am I supposed to do with this now that it works?

LS

----------

## hanno

Some older versions of the kernel-acpi-patch are broken (including the one in the gentoo-sources). If you want to use acpid, you have to get a vanilla 2.4.18-kernel and patch it with the newest acpi-patch from

www.sourceforge.net/projects/acpi/

----------

## cpwins

 *hanno wrote:*   

> Some older versions of the kernel-acpi-patch are broken (including the one in the gentoo-sources). If you want to use acpid, you have to get a vanilla 2.4.18-kernel and patch it with the newest acpi-patch from
> 
> www.sourceforge.net/projects/acpi/

 

Why does the gentoo-r7 kernel use such an old kernel patch? In gentoo-sources-2.4.19-r7.ebuild, it says that they used the acpi-20020503-2.4.18.diff patch from http://www.sourceforge.net/projects/acpi. The latest version of the patch is acpi-20020709-2.4.18.diff   :Exclamation:  The gentoo-r7 kernel was (according to the ebuild file) released on the same day, but still they could have taken a newer patch.

So, is there any way to get acpid to work on this kernel? I get the same error message as ElCondor, acpid tells me to install a patch from http://acpid.sourceforge.net (which is NOT the same site as the one mentioned above!). This patch is for kernels prior to 2.4.10, so that won't help me either.

Anybody out there running acpid on the gentoo-r7 kernel?

----------

## yoteweasel

I have gotten ACPI working on my Clevo laptop with a i845mp chipset (p4 northwood). I 've been using kernel 2.4.19-rc1-ac2 and also 2.5.25 (with and without the latest intel patches).

Anyway, having gotten it working and having gotten acpid running nicely I think I can safely say that your SoL if you want to actually do anything with them.  /var/log/acpid properly records all buttons press and lid closings but sadly there don't seem to be any userland apps to actually make your system standy, suspend or hibernate.

I've combed through a lot of ACPI information on the net and some of it is extremely stale and most of it was well hidden so who knows what the real truth is.  I could be wrong and if I am I'd love to know it because I want standby and suspend resume working, darn it.

Anyone actually gotten an acpi set-up to standby and wakeup?

This is just my experience with it,

Yote

----------

## hanno

As far as I know, it is not possible to use acpid with the current gentoo-kernel. You have to wait until drobbis updates gentoo-sources. Until then, you have to use the patch from www.sf.net/projects/acpi on a vanilla-kernel. (Or you can hack it into gentoo-sources manually, but for that you need skills in kernel-hacking)

The patch on the acpid-page doesn't help, it's totally outdated.

The problem is, the complete acpi-system is currently rewritten and gentoo-sources has an early (and buggy) version of the new acpi-system.

----------

## linux_student

Greetings again,

       I have found that there is ver little that you can do w/ acpi currently;

You can do an "echo on < /proc/acpi/FAN/FANx/status (or something like that) to manually turn your fans on and off, as well as editing the files in /etc/acpi and /etc/acpi/events to run /sbin/init 0 when you press the power button (turns off the PC)...for now, I would suggest using APM, ACPI is a bit of a toy; for some reason neither one of the wants to turn fans off and on properly (my 1.6GHz P4 got up to 95°C once; felt like it was going to burst into flames!) so be advised.

LS

----------

## DataShark

on my Toshiba 5105-s607 (P4) ACPI sttarted to work both realiabily and correctly with this kernel (which IMHO is the best one i ever run) With the latest gentoo-sources kernel enabling acpi simmply halted the system at boot

just my .02 Euros ...

Best Regards

----------

## fraterm

Looks like someone Haxored his machine...

 *Hole wrote:*   

> On a sony vaio laptop you could check out vaiod which will handle the screen brightness with ac power etc.
> 
> http://www.leenux.org.uk/ - Goto downloads and look in Linux - Laptops.
> 
> /me is author (shameless plug)

 

 :Evil or Very Mad:   :Evil or Very Mad: 

----------

## cpwins

 *fraterm wrote:*   

> Looks like someone Haxored his machine...
> 
>  

 

It wasn't me! Really! You have to believe me!   :Rolling Eyes: 

----------

## Hypnos

Say I take the vanilla sources and patch it with the latest ACPI (not waiting for an updated gentoo-sources):

* Can I read the battery capacity, either on the command line or the GNOME applet (I think I could easily hack the GNOME applet to work, if need be)?  This is the biggest thing for me.  With the current gentoo-sources, the battery (and fan) modules seem to not work; the module loads, but no /proc/acpi/battery or /proc/acpi/fan directory is created.

* With the outdated patch in the current gentoo-sources I see a sleep file in /proc/acpi, but "echo 1 > /proc/acpi/sleep" does absolutely nothing as far as i can tell -- will this change?

* Will the ACPI patch play nicely with the swsusp patch so suspend will work?

The only other function I would want would be a working sleep state, but that's not as high a priority as being able to read the battery capacity and suspending.  Also, there are userland apps for adjusting the backlight; these can be used in conjunction with the lid closing event.

----------

## jay

I own an ASUS L2400 notebook and haven't gotten ACPI working properly. The daemon starts fine, but the battery info in the gnome applet isn't showing proper informations. Does anybody did "emerge acpi-sources" and tested these out?

----------

## Qball

just info:

The Toshiba Satellite Pro 4600 bios id is on the blacklist off the acpi build into the kernell. This is an error, this was done for an older laptop.

its save (on own risk) to remove it from the banlist.  (dont know the file name . could look it up.)

We had (me and a few other students) contact with the author.. who said he allready reported it. but nothing is done.

----------

## pazz

hi,

i'm usind autospeedstep for my p4 and it works quite well:

http://gpsdrive.kraftvoll.at/speedstep.shtml

i run it at boottime using /etc/init.d/autospeedstep

```

#/etc/init.d/autospeedstep

start() {

   ebegin "starting Intel SpeedStep"

   /usr/local/sbin/autospeedstep >/dev/null

   eend 0

}

stop() {

   ebegin "stopping Intel SpeedStep"

   killall autospeedstep &>/dev/null

   eend 0

}

```

my p4 1800 runs at 1200 mhz by default and when the deamon recognizes a havier cpu load it switches it to 1800mhz.

works pretty cool  :Wink: 

ciao,

pazz

----------

## jay

That nifty program well deserves an ebuild!

----------

## azote

i haven't use yet but if it works it really deserves an ebuild!

----------

## kha

Well it won't work on my laptop, I guess I will have to find something else(I do have throttling control but no performance management). 

There is still something that kinda bothers me, it looks like the programe switches from maxspeed mode to powersave mode without any consideration about the actual temperature of the processor. Normally this shouldn't be an issue since a well made ACPI should refuse to increase the CPU throttling if heat is an issue. Yet if it is not the case we can imagine what might happen. 

Another thing that bother me a little is that some ACPI implementations manages alerts from the battery, switching the cpu to powersave mode when the battery goes low automatically. Normally this function should be turned off when the OS takes the hand on ACPI.(/proc/acpi/battery/BAT1/alarm should show disabled or unsupported) But if it is not your CPU might end up switching back and forth from powersave mode to full speed mode twice every 5 seconds, and I am cleary not sure it is a good thing to do....

Yet the program can still remain very usefull, and it opens the road to quite a lot of experimantations. 

Kha

----------

## ribo

On my laptop (Toshiba 5105) ACPI in 2.4.x would cause kernel processes to take 100% CPU constantly (well documented for my lappy).  2.6 works beautifully though, and I suggest 2.6 kernels for laptops (plus 2.6 tends to support some of the strange hardware configurations of a lot of laptops)

----------

