Package: hibernate Version: 1.96~pre-svn.r1116-1 Severity: wishlist This patch adds -m and -a parameters for ususpend (needed if you are using an intel graphic card and the modesetting X drivers)
#! /bin/sh /usr/share/dpatch/dpatch-run ## 50-ususpend.dpatch by Enrico Tassi <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ diff -urNad hibernate-1.96~pre-svn.r1116~/scriptlets.d/ususpend hibernate-1.96~pre-svn.r1116/scriptlets.d/ususpend --- hibernate-1.96~pre-svn.r1116~/scriptlets.d/ususpend 2007-05-26 00:10:18.000000000 +0200 +++ hibernate-1.96~pre-svn.r1116/scriptlets.d/ususpend 2007-06-05 21:18:41.000000000 +0200 @@ -8,6 +8,8 @@ AddConfigHelp "USuspendRamForce <boolean>" "Passes the -f flag to s2ram to force suspending even if the machine is not recognised" AddConfigHelp "USuspendRamVbeSave <boolean>" "Passes the -s flag to s2ram to save VBE state before suspending and restore after resume" AddConfigHelp "USuspendRamVbePost <boolean>" "Passes the -p flag to s2ram to VBE POST the graphics card after resume" +AddConfigHelp "USuspendRamVbeMode <boolean>" "Passes the -m flag to s2ram to get VBE mode before suspend and set it after resume" +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" AddShortOption "n" AddLongOption "no-suspend" @@ -18,6 +20,8 @@ USUSPEND_RAM_FORCE=0 USUSPEND_RAM_VBESAVE=0 USUSPEND_RAM_VBEPOST=0 +USUSPEND_RAM_VBEMODE=0 +USUSPEND_RAM_ACPISLEEP=0 USuspendConfigEnabler() { case "$1" in @@ -51,6 +55,12 @@ ususpendramvbepost) BoolIsOn "$1" "$2" && USUSPEND_RAM_VBEPOST=1 || return 0 ;; + ususpendramvbemode) + BoolIsOn "$1" "$2" && USUSPEND_RAM_VBEMODE=1 || return 0 + ;; + ususpendramacpisleep) + USUSPEND_RAM_ACPISLEEP="$2" || return 0 + ;; *) return 1;; esac @@ -84,6 +94,8 @@ [ $USUSPEND_RAM_FORCE -eq 1 ] && ARGS="$ARGS -f" [ $USUSPEND_RAM_VBESAVE -eq 1 ] && ARGS="$ARGS -s" [ $USUSPEND_RAM_VBEPOST -eq 1 ] && ARGS="$ARGS -p" + [ $USUSPEND_RAM_VBEMODE -eq 1 ] && ARGS="$ARGS -m" + [ $USUSPEND_RAM_ACPISLEEP -ne 0 ] && ARGS="$ARGS -a $USUSPEND_RAM_ACPISLEEP" fi $USUSPEND_PROG_PATH $ARGS 2>&1 | vcat 2 \ || vecho 0 "$EXE: $USUSPEND_PROG_PATH failed."