[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



I just went through this a few months back... quite painful, but
productive.  In the end, however, I had to switch back to APM due to
some BIOS/hw issues.   You need to look in /etc/acpi/events/*
and /etc/acpi/actions/*.  

In my (leftover) /etc/acpi/events/lid file (laptop) I have this:

     event=button[ /]lid
     action=/etc/acpi/actions/suspend.sh

In my /etc/acpi/actions/suspend.sh I have this:

     #!/bin/sh

     # pre-suspend actions here
     /etc/init.d/hotplug stop
     /etc/init.d/alsa suspend
     /etc/init.d/hwclock.sh stop

     # suspend
     echo 3 > /proc/acpi/sleep

     # when this returns, we are resuming
     sleep 2
     /etc/init.d/hwclock.sh start
     /etc/init.d/alsa resume
     /etc/init.d/hotplug start

You can create a similar events file that contains things like:

     event=button[ /]power

and point it to a similar script that contains
  
     echo 4 > /proc/acpi/sleep 

which will put your system into hibernation (if I remember correctly)

hth,

-Jim P.


On Mon, 2005-06-06 at 21:53 -0600, Michael Hirsch wrote:
> A while ago I had a computer that would suspend to ram when I pressed
> the power button.  This rather surprised me, but was actually quite
> nice, but I don't know why it did that.
> 
> I have a nice machine now and I'd like to be able to do that.  I've
> been reading ACPI howtos, and getting almost nothing out of them. 
> They seem to spend all their time talking about how to compile ACPI
> into the kernel, but no time at all talking about how you control it.
> 
> Can anyone point me to a nice write-up of how to configure and use
> ACPI assuming that it is already installed?
> 
> Thanks,
> 
> Michael
> _______________________________________________
> Ale mailing list
> Ale at ale.org
&gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00280" href="msg00280.html">[ale] Howto suspend on power button press</a></strong>
<ul><li><em>From:</em> mdhirsch at gmail.com (Michael Hirsch)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00265" href="msg00265.html">[ale] Howto suspend on power button press</a></strong>
<ul><li><em>From:</em> mdhirsch at gmail.com (Michael Hirsch)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00265.html">[ale] Howto suspend on power button press</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00267.html">[ale] erasing ext3 filesystems securely</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00265.html">[ale] Howto suspend on power button press</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00280.html">[ale] Howto suspend on power button press</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00266"><strong>Date</strong></a></li>
<li><a href="threads.html#00266"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>