I installed Debian Jessie on my laptop. To send the laptop to sleep (suspend), I began to try to edit the files in /etc/acpi (including the subdirectory /events ), using numerous tips from Google. Finally, he came to the following behavior: when you press the power key, the laptop goes to sleep, but if you press it again, the laptop turns on and ... immediately turns off.
Going to sleep was able to set the file /etc/acpi/powerbtn.sh with the following content:
#!/bin/bash /usr/sbin/pm-suspend Question: how to make the laptop go to sleep by pressing the power button and go out without turning it off (as it is now)?
UPD_0 (deleted the second block with files due to loss of relevance):
I created for the powerbtn.sh , powerbtn-acpi-support.sh , events/powerbtn and events/powerbtn-acpi-support files that I started the file and found out the following: the files in the /etc/acpi/ folder are not used, but only files from /etc/acpi/events/ .
events/powerbtn :
event=button[ /]power action=sh /etc/acpi/events/powerbtn-log.sh events/powerbtn-log.sh :
#!/bin/bash echo "events/powerbtn" >> /home/rostislav/log.txt /usr/sbin/pm-suspend File events/powerbtn-acpi-support :
event=button[ /]power action=sh /etc/acpi/events/powerbtn-acpi-support-log.sh events/powerbtn-acpi-support-log.sh :
#!/bin/bash echo "events/powerbtn-acpi-support" >> /home/rostislav/log.txt /usr/sbin/pm-suspend Log output:
events/powerbtn-acpi-support events/powerbtn And the problem arises: why after running powerbtn-acpi-support computer does not restart?
UPD_1 : another paradox. If you delete any file from events/powerbtn-acpi-support or events/powerbtn - the reboot stops working!