You are not logged in.

#1 2008-07-17 00:02:53

KRTac
Member
From: Croatia
Registered: 2008-07-01
Posts: 99

how to interpret acpi events?

Hi.

I installed acpid and with a little tweaking of the handler.sh I got the basic actions to be recognized. Now, how can i get a list, or something, of all avalible events and thay're explanation.  Whan i monitor the /var/log/messages.log i often get 'ACPI group/action undefined: processor / CPU0' or '... termal_zone / TZ1'. How can i find out what those events meen, and how i can use them.

edit: BTW, i tested the fn key and it seems to work with a lot of keys, including the one for seting up the brightness of the monitor. Does that have something to do with acpid?

Last edited by KRTac (2008-07-17 00:03:19)

Offline

#2 2008-07-18 04:17:31

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: how to interpret acpi events?

I don't know that there is any definitive source where you can look up the ACPI events, their parameters and what they mean. Perhaps the ACPI specification (http://www.acpi.info/spec.htm) might have some info, but its 600+ pages of very boring reading. Also note that different manufacturers will use different events. When I moved from a Dell to a ThinkPad I had to modify my ACPI scripts to change names of a number of events and parameters.

Probably the best you could do is log every ACPI event, run tail -f on the log file and put the laptop through its paces, noting which events correspond to which actions. Try things like opening/shutting the lid (if its a laptop), press various Fn buttons, unplug and plug in the AC cord, run the battery down to zero, run the temperature up as high as you can. This is basically what I did when I first set up my custom ACPI scripts.

Another thing you should do is look at other peoples ACPI scripts. That will give you ideas about how to use ACPI events. Look up your laptop on http://www.linux-laptop.net/ and scan through the configs to see if anyone set up ACPI scripts.

Finally, the Fn keys may or may not have to do with ACPI. You can check this by logging ACPI events. My Thinkpad sends an event for every Fn combination. However, some combos have an action hard-wired so that ACPI is not needed. For example, the monitor brightness probably does not have to do with ACPI.

Good luck.

Offline

#3 2008-07-18 09:53:08

KRTac
Member
From: Croatia
Registered: 2008-07-01
Posts: 99

Re: how to interpret acpi events?

Thank you for the reply. I was starting to think that the topict was long gone.

I've searched through the acpi specs pages for TZ0, TZ1 and so on, but couldn't find anything interesting, except then that it has something to do with a certain thermal zone (probably the processor). I don't have the time, or the nerves, to read it all as you can imagine.

As for the loging of unknown events... I've done that (as I mentiond above), and its a great way for troubleshooting. I've set up the handler.sh script for the ac adapter connect/disconnect, lid open/close, power button, etc., but the events I don't know about happen internally, they are not triggered by my actions. I dident look at other peoples acpi scripts. Thats a good advice, and I'll do that.

As for the Fn keys...same here. Some of the combos don't have nothing to do with acpi, like the brightness combo. Some alsow give a message.log entry, like for example whan I press Fn+F8 (the button with the battery logo) I get a message:

atkbd.c: Unknown key pressed (translated set 2, code 0x89 on isa0060/serio0).
atkbd.c: Use 'setkeycodes e009 <keycode>' to make it known.

I know this is a little off topic, but it'll be good to know what to do with it. I've tryed setkeycodes, but it doesn't help.

Offline

#4 2008-07-18 18:34:43

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: how to interpret acpi events?

Well the thermal events are probably caused by the temperature crossing some threshold. You could run your CPU at 100% (run "yes") and watch the temperature and the thermal events that come in to see if you can figure out what is happening. Perhaps this way you code decode with the thermal zone parameters mean. As for processor events, I don't know how to cause those.

That message you get about "unknown keys" is not from ACPI, it's from the keyboard driver. If setkeycodes isn't working initially, you may need to use the keyboard "soft raw" mode to get the real scan codes. Try "man showkey" and read about atkbd.softraw. Be aware, though, that some keys will give you odd behavior, even with setkeycodes and the correct scan codes.

Offline

Board footer

Powered by FluxBB