Bug#372729: Add configuration entry for sleep button
Package: acpid Version: 1.0.4-5 Severity: wishlist acpid contains a sample entry /etc/acpi/events/powerbtn , which shuts down the system if the power button is pressed. I propose to add a similar entry for the sleep button, which activates suspend-to-RAM. That way the sleep button should automatically work on most systems :-). Add the following files to the package: file /etc/acpi/sleepbtn.sh -cut- #!/bin/sh # /etc/acpi/sleepbtn.sh # Initiates suspend-to-RAM when the sleep putton has been # pressed. # If powersaved is running, let it process the acpi event if pidof powersaved; then exit 0 fi sync # just to be safe :-) # initiate suspend-to-RAM via sysfs interface echo -n mem /sys/power/state -cut- file /etc/acpi/events/sleepbtn -cut- # /etc/acpi/events/sleepbtn # This is called when the user presses the sleep button and calls # /etc/acpi/sleepbtn.sh for further processing. # Optionally you can specify the placeholder %e. It will pass # through the whole kernel event message to the program you've # specified. # We need to react on button sleep.* and button/sleep.* because # of kernel changes. event=button[ /]sleep action=/etc/acpi/sleepbtn.sh -cut- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#372729: Add configuration entry for sleep button
also sprach Sebastian Leske [EMAIL PROTECTED] [2006.06.11.1237 +0200]: Package: acpid Version: 1.0.4-5 Severity: wishlist acpid contains a sample entry /etc/acpi/events/powerbtn , which shuts down the system if the power button is pressed. Please see #285779. We are possibly removing this feature in a future release. Or at least make debconf ask about it. I propose to add a similar entry for the sleep button, which activates suspend-to-RAM. That way the sleep button should automatically work on most systems :-). ... and we'll do the same to this suggestion, although it's way more likely this will come through... Anyway, I'll probably rewrite it to use the hibernate script if present. Thanks for the code. -- Please do not send copies of list mail to me; I read the list! .''`. martin f. krafft [EMAIL PROTECTED] : :' :proud Debian developer and author: http://debiansystem.info `. `'` `- Debian - when you have better things to do than fixing a system signature.asc Description: Digital signature (GPG/PGP)
Bug#372729: Add configuration entry for sleep button
On Sun, Jun 11, 2006 at 06:18:12PM +0200, martin f krafft wrote: also sprach Sebastian Leske [EMAIL PROTECTED] [2006.06.11.1237 +0200]: acpid contains a sample entry /etc/acpi/events/powerbtn , which shuts down the system if the power button is pressed. Please see #285779. We are possibly removing this feature in a future release. Or at least make debconf ask about it. Yes, I read that. I actually considered filing a similar bug before seeing this one. I agree with the problem of data loss outlined there. Still, please do not just remove the scripts, as they are very useful for those people who want them. I'd propose to disable them by default, and tell the user how to activate / customize them. Doing this through debconf would probably be a good idea. Something like do you want to enable the power and sleep button?. I propose to add a similar entry for the sleep button, which activates suspend-to-RAM. That way the sleep button should automatically work on most systems :-). ... and we'll do the same to this suggestion, although it's way more likely this will come through... That could also be enabled at the user's request, for those who want it (and on whose systems suspend-to-RAM works...). -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]