On September 10, 2004 04:06 am, [EMAIL PROTECTED] wrote: > Thanks for your answer Andreas. I did the same, except for I don't know > how to restart the daemon during the wake up sequence. Can you tell me? I > still think this is not the elegant way to solve the problem, but at least > it works. If anyone knows a nicer solution, please tell us. BTW, do you > think, its a bug in kernel acpi code?
No, it's not a bug in the kernel acpi code. What can it do? You have a button that's used to do two things - sleep and wakeup. All it tells the kernel is that it has been pressed. The same problem occurs with LID events. Most, if not all, LIDs seem to send a counter of the number of times they've been pressed, so you could just test for even/odd - but you don't know whether the lid was open or closed when the system booted. Anyway, for any such event you put both the deactivation and the reactivation code in the same script: # deactivate code here echo 4 > /proc/acpi/sleep # good idea to sleep for a moment to let things wake up properly sleep 1 # activate code here - because the script is still running when the machine comes out of hibernation. -- derek -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]