clear/enable power button on resume
Hello,
after trying 2.6.4-rc1 I discovered some strange behavior: My machine simply shut down after resuming from S3.
Since [ACPI] ACPICA 20040220 from Bob Moore there is code to clear/enable the power button on resume in acpi_leave_sleep_state(). This leads to an acpi event which is handled by acpid if active. In my case acpid executed the corresponding shutdown script.
I guess this is going to clutter many people.
Regards,
Timo
A message that is not in the archive (sent off-list or not yet received): [email protected]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Quoted 9 lines · Timo Hoenig
after trying 2.6.4-rc1 I discovered some strange behavior: My machine simply shut down after resuming from S3.
Since [ACPI] ACPICA 20040220 from Bob Moore there is code to clear/enable the power button on resume in
acpi_leave_sleep_state(). This leads to an acpi event which is handled by acpid if active. In my case acpid executed the corresponding shutdown script.I guess this is going to clutter many people.
this is a known problem at least for resuming from S1, please refers to the thread called 'ASUS M3N and sleep states' started 20031227 by me or the direct link to the relevant post here:
http://sourceforge.net/mailarchive/forum.php?thread_id=3676335&forum_id=6102
BTW, my simple workaround for S1 is using this trick on the ACPI power button script:
=====
#!/bin/sh
#
# /etc/acpi/btn-power.sh
# shutdown echo "Checking if resuming from S1..." if tail -n 5 /var/log/messages | grep 'Restarting tasks... done' then echo "Resuming from S1, so not acting, exited." exit 0 else echo "Shutdown in progress" fi
if ps -Af | grep -q '[k]desktop' && test -f /usr/bin/dcop then
dcop --all-users ksmserver ksmserver logout 0 2 0 && exit 0
fi/sbin/init 0
=====
Thx, bye,
Gismo / Luca
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org
iD8DBQFAS3oaVAp7Xm10JmkRAha3AJsF9j0VIFD4DHxXq/n8KpmgYiTFDACcCZ63 8pP1UHalIUnSpiRfibleBkU=
=58ik
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Luca Capello
this is a known problem at least for resuming from S1, please refers to the thread called 'ASUS M3N and sleep states' started 20031227 by me or the direct link to the relevant post here:
http://sourceforge.net/mailarchive/forum.php?thread_id=3676335&forum_id=6102
Since S1 is broken for me, I can not verify that.
Quoted 2 lines
BTW, my simple workaround for S1 is using this trick on the ACPI power button script:
Thanks. But I don't use the power event anyway. As long as acpi works I am happy with suspend / resume. rm -rf /etc/acpi/events/powerbtn did it for me.
Isn't the acpi spec telling whether the pressing of the power button after suspending has to be reported to the OS?
Timo
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · Timo Hoenig
Thanks. But I don't use the power event anyway. As long as acpi works I am happy with suspend / resume. rm -rf
/etc/acpi/events/powerbtndid it for me.
That's what I did, too. On my system, it happens after S3 sleep (I haven't tested S1/S2).
And the power button is the only way to power on after S3, since all other wake-capable devices aren't enabled.
Quoted 2 lines
Isn't the acpi spec telling whether the pressing of the power button after suspending has to be reported to the OS?
The ACPI spec says that the pressing of a button (e.g. the power button) that leads to a wake event is reported differently to the OS. The Notify value (second column in output of /proc/acpi/event) of a regular button event is 0x80, that of a wake event is 0x02. Nevertheless, on my system, 0x80 is generated for a power button wake. Strange.
Sebastian
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
A message that is not in the archive (sent off-list or not yet received): 20040307224318.GA1551-nlVyBo/[email protected]
Quoted 5 lines · Sebastian Seifert
The ACPI spec says that the pressing of a button (e.g. the power button) that leads to a wake event is reported differently to the OS. The Notify value (second column in output of
/proc/acpi/event) of a regular button event is0x80, that of a wake event is0x02. Nevertheless, on my system,0x80is generated for a power button wake. Strange.
Yes. Same here.
[[email protected]:~]$ cat acpid.log_2.6.4-rc1-mm2 (0:23) Linux 2.6.4-rc1-mm4 [Sun Mar 7 19:19:40 2004] 1 client rule loaded [Sun Mar 7 19:19:50 2004] received event "button/power PWRF 00000080 00000006" [Sun Mar 7 19:19:50 2004] notifying client 525[1000:1000] [Sun Mar 7 19:19:50 2004] completed event "button/power PWRF 00000080 00000006"
Timo