3
alarm_not_supported() {
4
echo org.freedesktop.Hal.Device.SystemPowerManagement.AlarmNotSupported >&2
5
echo Waking the system up is not supported >&2
10
echo org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported >&2
11
echo No suspend method found >&2
17
# Make a suitable command line argument so that the tools can do the correct
18
# quirks for video resume.
19
# Passing the quirks to the tool allows the tool to not depend on HAL for data.
21
[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_S3_BIOS" = "true" ] && QUIRKS="$QUIRKS --quirk-s3-bios"
22
[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_S3_MODE" = "true" ] && QUIRKS="$QUIRKS --quirk-s3-mode"
23
[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_SUSPEND" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-suspend"
24
[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_ON" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-on"
25
[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBESTATE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbestate-restore"
26
[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBEMODE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbemode-restore"
27
[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VGA_MODE_3" = "true" ] && QUIRKS="$QUIRKS --quirk-vga-mode3"
28
[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" = "true" ] && QUIRKS="$QUIRKS --quirk-vbe-post"
29
[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_RADEON_OFF" = "true" ] && QUIRKS="$QUIRKS --quirk-radeon-off"
30
[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_RESET_BRIGHTNESS" = "true" ] && QUIRKS="$QUIRKS --quirk-reset-brightness"
31
[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_NONE" = "true" ] && QUIRKS="$QUIRKS --quirk-none"
33
# We only support pm-utils
34
if [ -x "/usr/sbin/pm-suspend-hybrid" ] ; then
35
if [ $seconds_to_sleep != "0" ] ; then
38
/usr/sbin/pm-suspend-hybrid $QUIRKS
44
# Refresh devices as a resume can do funny things
45
for type in button battery ac_adapter
47
devices=`hal-find-by-capability --capability $type`
48
for device in $devices
50
dbus-send --system --print-reply --dest=org.freedesktop.Hal \
51
$device org.freedesktop.Hal.Device.Rescan