LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   machine shuts down itself after successful resume from suspend (https://www.linuxquestions.org/questions/slackware-14/machine-shuts-down-itself-after-successful-resume-from-suspend-949149/)

kite 06-08-2012 01:24 AM

machine shuts down itself after successful resume from suspend
 
Hello,

My slackware 13.37 xbmc htpc system is working very great. But recently I found a problem: it shuts down itself after successful resme from suspend. I suspend or resume the system by single pressing the physical "Power" button. You know suspend function is very important for HTPC due to the long fresh boot time.

What could be wrong?

ls /etc/acpi/events/
Code:

sleep-button
cat /etc/acpi/events/sleep-button
Code:

event=button/power.*
action=/etc/acpi/actions/sleep-button.sh "%e"


cat /etc/acpi/actions/sleep-button.sh
Code:

#!/bin/sh
pm-suspend
modprobe imon


/var/log/message:

Code:

Jun  8 20:49:13 xbmc kernel: [28681.254496] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Jun  8 20:49:13 xbmc kernel: [28681.256899] ata4.00: configured for UDMA/133
Jun  8 20:49:13 xbmc kernel: [28681.323699] PM: resume of devices complete after 6509.510 msecs
Jun  8 20:49:13 xbmc kernel: [28681.323745] input: iMON Panel, Knob and Mouse(15c2:0038) as /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input4
Jun  8 20:49:13 xbmc kernel: [28681.331392] Registered IR keymap rc-imon-pad
Jun  8 20:49:13 xbmc kernel: [28681.331503] input: iMON Remote (15c2:0038) as /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/rc/rc1/input5
Jun  8 20:49:13 xbmc kernel: [28681.331537] rc1: iMON Remote (15c2:0038) as /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/rc/rc1
Jun  8 20:49:13 xbmc kernel: [28681.339458] imon 7-1:1.0: iMON device (15c2:0038, intf0) on usb<7:2> initialized
Jun  8 20:49:13 xbmc kernel: [28681.339479] imon 7-1:1.1: iMON device (15c2:0038, intf1) on usb<7:2> initialized
Jun  8 20:49:16 xbmc kernel: [28684.330999] ata4.00: configured for UDMA/133
Jun  8 20:49:16 xbmc kernel: [28684.331007] ata4: EH complete
Jun  8 20:49:16 xbmc shutdown[14430]: shutting down for system halt
Jun  8 20:49:16 xbmc kernel: [28685.185164] EXT4-fs (sda6): re-mounted. Opts: commit=0
Jun  8 20:49:17 xbmc kernel: [28685.554349] EXT4-fs (sda7): re-mounted. Opts: commit=0
Jun  8 20:49:17 xbmc kernel: [28685.556932] EXT4-fs (sda5): re-mounted. Opts: commit=0
Jun  8 20:49:17 xbmc acpid: client 1943[0:0] has disconnected
Jun  8 20:49:17 xbmc acpid: client connected from 1943[0:0]
Jun  8 20:49:17 xbmc acpid: 1 client rule loaded
Jun  8 20:49:18 xbmc init: Switching to runlevel: 0
Jun  8 20:49:19 xbmc kernel: [28687.968474] ADDRCONF(NETDEV_UP): wlan0: link is not ready
Jun  8 20:49:19 xbmc kernel: [28688.076411] ADDRCONF(NETDEV_UP): wlan0: link is not ready
Jun  8 20:49:20 xbmc avahi-dnsconfd[1917]: Got SIGTERM, quitting.
Jun  8 20:49:20 xbmc avahi-daemon[1910]: Got SIGTERM, quitting.
Jun  8 20:49:20 xbmc avahi-daemon[1910]: avahi-daemon 0.6.31 exiting.
Jun  8 20:49:21 xbmc sshd[1612]: Received signal 15; terminating.
Jun  8 20:49:22 xbmc logger: /etc/rc.d/rc.inet1:  /sbin/ifconfig lo down
Jun  8 20:49:22 xbmc acpid: exiting
Jun  8 20:49:22 xbmc exiting on signal 15


kite 06-08-2012 01:40 AM

update
 
Well, issuing command pm-suspend from remote ssh login instead prevented the system from shutting down itself after resume. Is it a bios setting problem? But I have disabled power off by single pressing the POWER button within bois.

Joshua Eckroth 09-24-2012 11:17 AM

I believe your problem is there is another script in /etc/acpi that performs a shutdown when the power button is pressed. In other words, you have two active scripts: one performs suspend, one performs shutdown. Check /etc/acpi/events/default (I had to remove the default shutdown option in that file after I added my own suspend script).

kite 09-25-2012 12:58 AM

Thanks for your hints. But I think my /etc/acpi/ directory is clean without the original defaults.
Quote:

root@xbmc:/etc/acpi/events# ls
sleep-button

root@xbmc:/etc/acpi/events# cat sleep-button
event=button/power.*
#button/power PWRF 00000080 00000002
action=/etc/acpi/actions/sleep-button.sh "%e"

Quote:

root@xbmc:/etc/acpi/actions# ls
sleep-button.sh*

root@xbmc:/etc/acpi/actions# cat sleep-button.sh
#!/bin/sh
pm-suspend
modprobe imon

TobiSGD 09-25-2012 01:30 AM

Do you have any other power-manager running, like the one from XFCE? I had a similar problem and recognized that the running power-manager interfered with the ACPI scripts.


All times are GMT -5. The time now is 04:24 AM.