public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* Sleep Button Debounce
@ 2003-07-08 11:44 Matthew Tippett
       [not found] ` <3F0AAEA3.9080902-rieW9WUcm8FFJ04o6PK0Fg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Tippett @ 2003-07-08 11:44 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hello,

I have set up a script to put my system i8500 into sleep mode 1.

The main problem is that there is no way to find out if the button is 
being released or pressed within ACPI (aka closed/open on lid).

So as a result, when I suspend, and resume, I drop back into suspend as 
the SBTN event fires on release.

Any thoughts on doing this pure ACPI? (apart from a userland counting 
script).

Regards,

Matthew



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Sleep Button Debounce
       [not found] ` <3F0AAEA3.9080902-rieW9WUcm8FFJ04o6PK0Fg@public.gmane.org>
@ 2003-07-10 14:49   ` Sérgio Monteiro Basto
  0 siblings, 0 replies; 2+ messages in thread
From: Sérgio Monteiro Basto @ 2003-07-10 14:49 UTC (permalink / raw)
  To: Matthew Tippett; +Cc: acpi-devel

For example:

/etc/acpi/actions/powerchange
#!/bin/sh
status=`sed "s/state: *//" /proc/acpi/ac_adapter/AC/state`
case $status in
        "on-line"       )       /usr/bin/spicctrl -b 255
                                exit 0
                                ;;
        "off-line"      )       /usr/bin/spicctrl -b 100
                                exit 0
                                ;;
        esac
echo "Something bad happened!"
exit 1

On Tue, 2003-07-08 at 12:44, Matthew Tippett wrote:
> Hello,
> 
> I have set up a script to put my system i8500 into sleep mode 1.
> 
> The main problem is that there is no way to find out if the button is 
> being released or pressed within ACPI (aka closed/open on lid).
> 
> So as a result, when I suspend, and resume, I drop back into suspend as 
> the SBTN event fires on release.
> 
> Any thoughts on doing this pure ACPI? (apart from a userland counting 
> script).
> 
> Regards,
> 
> Matthew
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/acpi-devel
-- 
Sérgio Basto
Technology Project Manager
onevision design studios
TECMAIA - Parque de Ciência e Tecnologia da Maia
Rua Frederico Ulrich, 2650
4470-605 MOREIRA DA MAIA
tel. + 351 22 091 5410
fax. + 351 22 091 5419
email: sbasto-n97bsLhj/YhQPh2TJV30h1aTQe2KTcn/@public.gmane.org
web: http://www.onevision-design.com



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-10 14:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-08 11:44 Sleep Button Debounce Matthew Tippett
     [not found] ` <3F0AAEA3.9080902-rieW9WUcm8FFJ04o6PK0Fg@public.gmane.org>
2003-07-10 14:49   ` Sérgio Monteiro Basto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox