On Thu, 2005-06-16 at 11:56 -0400, Brian Ronk wrote:

> everything seems to be working ok, except that it doesn't go to sleep
> when I close it.

Hi,

Leaving the other issues to one side... :-)

The below are a couple of files I find useful for handling the ACPI lid
event on my ThinkPad.  I'm not sure what vintage a "760XL" is (it
doesn't sound like a recent model, but maybe US models are different to
the ones I see).  Anyway, if it does do ACPI then this should be roughly
what you need.

With various kernels I have found that it was also useful to stop /
start hotplug, alsa adn wireless LAN within the suspend_to_ram.sh
script, but that doesn't seem to be the case since around 2.6.8 or so.

Regards,
                                        Andrew McMillan

=============================================================
# /etc/acpi/events/lid
# This is called when the user closes the power button and calls
# /etc/acpi/suspend_to_ram.sh to perform the suspend operation

# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.

# We need to react on "button power.*" and "button/power.*" because
# of kernel version differences.

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

=============================================================
#!/bin/sh
# /etc/acpi/suspend_to_ram.sh
# Initiates a suspend to memory [when the lid is closed]

logger -t "acpi-sleep" "Initiating sleep at `date`"
sync

echo mem >/sys/power/state

sleep 1
logger -t "acpi-sleep" "Awakening from sleep at `date`"
=============================================================


-------------------------------------------------------------------------
Andrew @ Catalyst .Net .NZ  Ltd,  PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/            PHYS: Level 2, 150-154 Willis St
DDI: +64(4)803-2201      MOB: +64(272)DEBIAN      OFFICE: +64(4)499-2267
Whereof one cannot speak, thereon one must remain silent. -- Wittgenstein
-------------------------------------------------------------------------

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to