Lines 5-18
AddConfigHandler USuspendConfigEnabler
Link Here
|
5 |
AddOptionHandler USuspendOptionHandler |
5 |
AddOptionHandler USuspendOptionHandler |
6 |
|
6 |
|
7 |
AddConfigHelp "USuspendMethod <disk|ram|both>" "Enables use of the uswsusp suspend method of newer kernels (>= 2.6.17rc1)" |
7 |
AddConfigHelp "USuspendMethod <disk|ram|both>" "Enables use of the uswsusp suspend method of newer kernels (>= 2.6.17rc1)" |
8 |
AddConfigHelp "USuspendRamForce <boolean>" "Passes the -f flag to s2ram to force suspending even if the machine is not recognised" |
8 |
AddConfigHelp "USuspendRamForce <boolean>" "Passes the --force flag to s2ram/s2both to force suspending even if the machine is not recognised" |
9 |
AddConfigHelp "USuspendRamUnsureOk <boolean>" "Instructs s2ram to continue when it's unsure about the system type, thus not requiring -f to be passed" |
9 |
AddConfigHelp "USuspendRamUnsureOk <boolean>" "Instructs s2ram/s2both to continue when it's unsure about the system type, thus not requiring --force to be passed" |
10 |
AddConfigHelp "USuspendRamVbeSave <boolean>" "Passes the -s flag to s2ram to save VBE state before suspending and restore after resume" |
10 |
AddConfigHelp "USuspendRamVbeSave <boolean>" "Passes the --vbe_save flag to s2ram/s2both to save VBE state before suspending and restore after resume" |
11 |
AddConfigHelp "USuspendRamVbePost <boolean>" "Passes the -p flag to s2ram to VBE POST the graphics card after resume" |
11 |
AddConfigHelp "USuspendRamVbePost <boolean>" "Passes the --vbe_post flag to s2ram/s2both to VBE POST the graphics card after resume" |
12 |
AddConfigHelp "USuspendRamVbeMode <boolean>" "Passes the -m flag to s2ram to get VBE mode before suspend and set it after resume" |
12 |
AddConfigHelp "USuspendRamVbeMode <boolean>" "Passes the --vbe_mode flag to s2ram/s2both to get VBE mode before suspend and set it after resume" |
13 |
AddConfigHelp "USuspendRamRadeontool <boolean>" "Passes the -r flag to s2ram to let radeontool turn of the backlight before suspending." |
13 |
AddConfigHelp "USuspendRamRadeontool <boolean>" "Passes the --radeontool flag to s2ram/s2both to let radeontool turn of the backlight before suspending." |
14 |
AddConfigHelp "USuspendRamAcpiSleep <number>" "Passes the -a flag to s2ram to set the acpi_sleep parameter before suspend: 1=s3_bios, 2=s3_mode, 3=both" |
14 |
AddConfigHelp "USuspendRamAcpiSleep <number>" "Passes the --acpi_sleep flag to s2ram/s2both to set the acpi_sleep parameter before suspend: 1=s3_bios, 2=s3_mode, 3=both" |
15 |
AddConfigHelp "USuspendRamPciSave <boolean>" "Passes the -v flag to s2ram to have the PCI config space of the VGA card before suspend, and restore it on resume" |
15 |
AddConfigHelp "USuspendRamPciSave <boolean>" "Passes the --pci_save flag to s2ram/s2both to have the PCI config space of the VGA card before suspend, and restore it on resume" |
16 |
|
16 |
|
17 |
AddShortOption "n" |
17 |
AddShortOption "n" |
18 |
AddLongOption "no-suspend" |
18 |
AddLongOption "no-suspend" |
Lines 105-117
DoUSuspend() {
Link Here
|
105 |
if [ -z "$USUSPEND_NO_SUSPEND" ] ; then |
105 |
if [ -z "$USUSPEND_NO_SUSPEND" ] ; then |
106 |
ARGS= |
106 |
ARGS= |
107 |
if [ "$USUSPEND_PROG" = s2ram ]; then |
107 |
if [ "$USUSPEND_PROG" = s2ram ]; then |
108 |
[ $USUSPEND_RAM_FORCE -eq 1 ] && ARGS="$ARGS -f" |
108 |
[ $USUSPEND_RAM_FORCE -eq 1 ] && ARGS="$ARGS --force" |
109 |
[ $USUSPEND_RAM_VBESAVE -eq 1 ] && ARGS="$ARGS -s" |
109 |
[ $USUSPEND_RAM_VBESAVE -eq 1 ] && ARGS="$ARGS --vbe_save" |
110 |
[ $USUSPEND_RAM_VBEPOST -eq 1 ] && ARGS="$ARGS -p" |
110 |
[ $USUSPEND_RAM_VBEPOST -eq 1 ] && ARGS="$ARGS --vbe_post" |
111 |
[ $USUSPEND_RAM_RADEONTOOL -eq 1 ] && ARGS="$ARGS -r" |
111 |
[ $USUSPEND_RAM_RADEONTOOL -eq 1 ] && ARGS="$ARGS --radeontool" |
112 |
[ $USUSPEND_RAM_VBEMODE -eq 1 ] && ARGS="$ARGS -m" |
112 |
[ $USUSPEND_RAM_VBEMODE -eq 1 ] && ARGS="$ARGS --vbe_mode" |
113 |
[ $USUSPEND_RAM_ACPISLEEP -ne 0 ] && ARGS="$ARGS -a $USUSPEND_RAM_ACPISLEEP" |
113 |
[ $USUSPEND_RAM_ACPISLEEP -ne 0 ] && ARGS="$ARGS --acpi_sleep $USUSPEND_RAM_ACPISLEEP" |
114 |
[ $USUSPEND_RAM_PCISAVE -eq 1 ] && ARGS="$ARGS -v" |
114 |
[ $USUSPEND_RAM_PCISAVE -eq 1 ] && ARGS="$ARGS --pci_save" |
115 |
fi |
115 |
fi |
116 |
vecho 1 "$EXE: Running $USUSPEND_PROG_PATH $ARGS..." |
116 |
vecho 1 "$EXE: Running $USUSPEND_PROG_PATH $ARGS..." |
117 |
$USUSPEND_PROG_PATH $ARGS 2>&1 | vcat 2 \ |
117 |
$USUSPEND_PROG_PATH $ARGS 2>&1 | vcat 2 \ |