#!/bin/bash . /etc/default/acpi-support . /usr/share/acpi-support/power-funcs . /usr/share/acpi-support/policy-funcs if [ x$ACPI_HIBERNATE != xtrue ] && [ x$1 != xforce ]; then exit; fi # Unset video posting - it's not needed for suspend to disk unset POST_VIDEO . /etc/acpi/prepare.sh #if [ x$LOCK_SCREEN = xtrue ]; then # for x in /tmp/.X11-unix/*; do # displaynum=`echo $x | sed s#/tmp/.X11-unix/X##` # getXuser; # if [ x"$XAUTHORITY" != x"" ]; then # export DISPLAY=":$displaynum" # . /usr/share/acpi-support/screenblank # fi # done #fi echo -n $HIBERNATE_MODE >/sys/power/disk echo -n "disk" >/sys/power/state $LAPTOP_MODE stop . /etc/acpi/resume.sh