[ltp] T42p + suspend2 + acpi + hotplug Ultrabay working (fwd)

Eric Van Buggenhaut linux-thinkpad@linux-thinkpad.org
Tue, 19 Apr 2005 01:41:55 +0200


On Sun, Apr 17, 2005 at 10:51:20AM -0400, David A. Desrosiers wrote:
> 
> >Bit confused here - by suspend2 you mean swsusp2?
> 
> 	No, I mean suspend2, from suspend2.net.
> 
> >It might be fixed in the latest kernels - which are you using?
> 
> 	As mentioned in the original email, 2.6.11.7
> 
> >Google ibm-acpi or look it up in the list archives - depending on 
> >how much ACPI you have working - there are examples on how to do 
> >just this in the ibm-acpi distribution tarball.
> 
> 	ibm-acpi is built into the kernel now, I just haven't found 
> the right doco that describes how to get these two function keys 
> hooked into suspend2 for suspend-to-ram and suspend-to-disk.

You need to catch the acpi event like:

event=(button/sleep|ibm/hotkey HKEY 00000080 00001004)
action=/etc/acpi/ibm-sleep.sh
 
and let it call such a script:

less /etc/acpi/ibm-sleep.sh     
/etc/init.d/hotplug stop
sync
echo 3 > /proc/acpi/sleep
/etc/init.d/hotplug start

for suspend-to-ram


and for suspend-to-disk:

less /etc/acpi/events/ibm-hibernate 
event=(ibm/hotkey HKEY 00000080 0000100c)
action=/etc/acpi/ibm-hibernate.sh

less /etc/acpi/ibm-hibernate.sh 
/usr/sbin/hibernate

-- 
"Un disco para gobernarlos a todos.
 Un disco para encontrarlos y atarlos en las tinieblas.
 En la tierra de Redmond donde se extienden las sombras"

Eric VAN BUGGENHAUT
eric@sindominio.net