Talk:How to configure acpid

From ThinkWiki
Revision as of 20:07, 12 February 2006 by Wyrfel (Talk | contribs) (Which event is which)
Jump to: navigation, search

This content was merged from my original T30 specific page T30_ACPI_Sleeping that is now being redirected here. IMO this page is a mistake because the solution is specific to machines with radeon video. It would be better if someone could resurrect the origial page. Also the below script is a little sketchy.


As i wrote you before, the information on this page is not only T30 specific and we don't want to end up with hundreds of pages covering the same topic just designating a different machine in the name.

I.e. would you like to have another page called A31p_ACPI_Sleeping? And another one X31_ACPI_Sleeping? All being the same except for the mentioned model? The instructions for these models would be precisely the same and it would only mean redundant maintenance.

The overall topic of your original page is covered by the following pages:

Furthermore, those pages are directly accessible from the T30 model page and they link to one another as well.

Your only argument for having it on a separate page is that T30 users wanting to use ACPI sleep can find it more easily. I think that a user can find all the needed information pretty easily if he follows a logical path like looking on the T30 model page, and the ACPI-HOWTO page. First you want to make ACPI work in general. Then if you think you managed that but still have a problem, you look for further information, i.e. have a look into the problems pages. In this case you even don't need to since the according problem page is linked directly from the ACPI-Howto page.

What if a A31p user comes to ThinkWiki with the same problem? Will he find the information when it's on a page labelled "T30_ACPI_Sleeping"? I guess not. So what do we do? Make a second page and redirect that to this page? Why then is it bad to redirect "T30_ACPI_Sleeping" to a page where all the relevant information can be accessed from? If you think this page is the wrong target, we can change it to point to the LCD backlight problem page.

Furthermore, this page is not specific to notebooks featuring radeons. The general information in the beginning is acpid-specific and else generic. The example event entry is acpi-sleep and lid specific and else generic. The actual example script features 5 lines that are radeon (or T30, A30, A31p, X30 and X31) specific, as is also stated in a comment below the script.

Specific for notebooks with radeons is the Problem with LCD backlight remaining on during ACPI sleep page. It is in fact even more specific, since it covers the exact problem that doesn't affect all radeon based ThinkPads.

Your original page covered three different topics in one page, making it specific for exactly what your page title designated: T30s, ACPI and sleep mode. But all three of those topics are distinct topics in themselves and are not specific to your what your page title designates.

If you find more intuitive page names than i did feel free to propose them, but i really don't see the point in having a separate page to maintain for each specific question a user might come up with.

Wyrfel


Which event is which

That may be a silly question but which button correspond to which entry in the /etc/acpi/events? I know event=button/lid corresponds to closing the lid event=button/sleep is the Fn-F4 button but the rest? Oub 22:00, 10 February 2006 (CET):


See the ibm-acpi section in How to get special keys to work. Wyrfel 00:04, 11 February 2006 (CET)

Hi I am sorry, but I still don't understand, according to the section How to get special keys to work. Fn F4 is bound as follows
Fn F4 ibm/hotkey HKEY 00000080 00001004
however my script sleeptbtn in /etc/acpi/events is as follows:
event=button[ /]sleep
action=/usr/local/sbin/mihibernate
This way Fn F4 is bound to mihibernate. It works fine. Are you saying that the script could also work with the following instructions:
ibm/hotkey HKEY 00000080 00001004
action=/usr/local/sbin/mihibernate
I am confused. I think it would be good to have a list similar to that in How to get special keys to work.
But instead of using HKEY is should use syntaxes like this, if possible
Fn F4 event=button[ /]sleep
Etc.
Oub 17:18, 11 February 2006 (CET):

Hi, if you use the ibm-acpi driver it should only work with something like "ibm/hotkey HKEY 00000080 00001004". Are you using ibm-acpi? That your config works could indicate the you are using thinkpad-acpi instead, because your config expects a string "button/sleep" or "button sleep", while the event generated by ibm-acpi doesn't include the string "sleep" at all.

We could copy the table fromm How to get special keys to work here, but i'd rather prefer to leave a note here that points there. This reduces double maintenance and strictly seen it is a button config, not a power management one (one could configure it to do something that's not PM related at all).

Wyrfel 03:30, 12 February 2006 (CET)


Hi
It is really confusing! Although for me
event=button[ /]sleep
action=/usr/local/sbin/mihibernate
works, well it seems that I use ibm-acpi. I am using the 2.6.10 kernel, and activated that option in the configuration process. I cannot remember to have installed thinkpad-acpi, and dpkg -l | grep thinkpad does not return anything meaningful (I am on Debian). I have tpb and tpct, thinkpad-base and laptop-mode-tools installed. So I am really puzzled.
You still did not answer my question: what are the string equivalents to the hotkey entries in the list found at http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work. Again in that list I see for example:
key     event
Fn F4   ibm/hotkey HKEY 00000080 00001004
Fn F12  ibm/hotkey HKEY 00000080 0000100c
So I would like to have a list of the form
key    event
Fn F4  event=button[ /]power
Fn F12 ?????
Thanks
Oub 17:13, 12 February 2006 (CET):

I guess i just didn't understand your question, which is because of the fact that to my knowledge there are no "string equivalents" for the hotkey entries. Or in other words, these "hotkey entries" ARE the "string equivalents". Those are exactly the strings that acpid will recieve from ibm-acpi. AFAIK it doesn't recieve anything in the form of "button[ /]sleep" at all. That's why in theory, your config shouldn't work. Don't know why it does in reality, maybe you should install a SETI client and check for the existance extraterrestrical lifeforms in your ThinkPad. ;-) (Sorry, just being rediculous.)

However, let's try discovering it in a more reasonable approach: do a # tar -f /var/log/acpid. Then press the FnF4 combination and see what happens in the terminal. Look for lines that say "recieved event" and then look at the event strings there. Do they more look like "button[ /]sleep" or more like "ibm/hotkey ...."? Also, please do a # dmesg . If it returns some lines you would have ibm_acpi running, if not, probably something else. (Though 2.6.10 was exactly the first kernel that included ibm-acpi, if i remember right, it included both thinkpad-acpi and ibm-acpi.)

Just checking again, it would definately seem to me that you are using thinkpad-acpi. Look at the authors page, his config matches yours.

Wyrfel 20:07, 12 February 2006 (CET)