[ltp] Thinkpad PM R50e

Michael Perry linux-thinkpad@linux-thinkpad.org
Wed, 09 Mar 2005 16:45:37 -0800


Adrian Pantea wrote:
>  
> How do i enable standby or hibernate on lid close ? Ntpctl says "function is
> not supported" . Does this have anything to do with the fact that i use ACPI
> instead of APM ?
> 
> Adrian
> 
> 
> 
Adrian-

You may need to write a lid close handler script that will intercept the 
acpi call and do what you need.  I have a sample one here:


/etc/acpi/events/lid
======================

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

You most likely will need a bash shell script which in this case is 
named suspend.sh.  A possible one looks thus:

/etc/acpi/suspend.sh
=======================

#!/bin/sh
echo mem > /sys/power/state

You can add more mileage to the default suspend.sh script as you need. 
I usually add stopping the linuxant drivers on suspend and then waking 
the linksys card back up again when the laptop comes back to life.

Anyways, these are just samples and I took them off a ThinkPad T23 when 
it was not looking :)



-- 
Michael Perry | do or do not. There is no try. -Master Yoda
mperry@lnxpowered.org | http://www.lnxpowered.org