[ltp] T42p + suspend2 + acpi + hotplug Ultrabay working (fwd)
Michael Olbrich
linux-thinkpad@linux-thinkpad.org
Tue, 19 Apr 2005 13:40:53 +0200
On Tue, Apr 19, 2005 at 01:41:55AM +0200, Eric Van Buggenhaut wrote:
> 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
No need to stop/start hotplug. At least for usb.
If nothing is pugged in it works just fine. And anything else just asks
for trouble. Especially mounted storage devices.
And suspending is a lot faster without it.
I actually have a script that prevents suspend when it can't unmount all
external devices.
Oh and afaik /proc/acpi/sleep is depreciated. /sys/power/state should be
used:
echo -n "mem" > /sys/power/state
Michael