All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Capello <luca-wlebWZzHoyE@public.gmane.org>
To: ML ACPI-devel
	<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: bug in acpid scripts
Date: Sat, 24 Jul 2004 16:40:05 +0200	[thread overview]
Message-ID: <410274C5.1050809@pca.it> (raw)
In-Reply-To: <20040724135111.GC2328-MEqNC12sBsHxa7XIdbXXog@public.gmane.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

on 07/24/04 15:51, Mattia Dongili wrote:
> On Sat, Jul 24, 2004 at 01:50:20PM +0100, Matthew Garrett wrote:
>>My current workaround is to make button support modular, and then remove
>>the button module during suspend. The power button event then gets
>>ignored on wakeup.
> You may simply want to stop acpid just before suspending and restarting
> it after having resumed.
or you can use an hack similar to my script attached (original one at
http://sourceforge.net/mailarchive/forum.php?thread_id=3676335&forum_id=6102
as this problem was already reported in this list).

Thx, bye,
Gismo / Luca

=====
luca@gismo:~/download$ cat /etc/acpi/tbtn_power.sh
#!/bin/sh
#
# /etc/acpi/btn-power.sh
# BASH script which acts when the 'power button' is pressed, causing
#   - shutdown
#
# Useful infos at
#   - http://acpi.sourceforge.net/documentation/sleep.html
#
# (C) 2004 - Gismo / Luca Capello <luca.pca.it> http://luca.pca.it

# 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
luca@gismo:~/download$
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQFBAnTEVAp7Xm10JmkRAjGWAJ9nFHsoIIDg298SXBF4VIDQ6QoK3ACeOBy2
UdlexHHxH2oiVYAOQjtBRM0=
=gB7h
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click

  parent reply	other threads:[~2004-07-24 14:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-23 19:36 bug in acpid scripts Russell Neches
     [not found] ` <20040723193658.GA3331-5z3TbH0F9hyr8sbHwu5NIg@public.gmane.org>
2004-07-23 20:39   ` Vernon Mauery
     [not found]     ` <1090615197.9015.7.camel-DNmeG3802II@public.gmane.org>
2004-07-23 23:34       ` Russell Neches
2004-07-24 12:50   ` Matthew Garrett
     [not found]     ` <1090673420.4412.14.camel-myFlNLNQP+Q@public.gmane.org>
2004-07-24 13:51       ` Mattia Dongili
     [not found]         ` <20040724135111.GC2328-MEqNC12sBsHxa7XIdbXXog@public.gmane.org>
2004-07-24 14:40           ` Luca Capello [this message]
2004-08-11 13:40   ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2004-07-24 13:23 Li, Shaohua
     [not found] ` <B44D37711ED29844BEA67908EAF36F03665E4F-4yWAQGcml65pB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-07-25  1:42   ` Russell Neches
2004-08-12  7:07 Li, Shaohua
     [not found] ` <B44D37711ED29844BEA67908EAF36F038AD732-4yWAQGcml65pB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-08-13  0:24   ` Nathan Bryant
2004-08-13  6:18   ` Stefan Seyfried
2004-08-13  0:52 Li, Shaohua
     [not found] ` <B44D37711ED29844BEA67908EAF36F038ADB3E-4yWAQGcml65pB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-08-13  0:55   ` Nathan Bryant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=410274C5.1050809@pca.it \
    --to=luca-wlebwzzhoye@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.