Package: hibernate Version: 1.96~pre-svn.r1136-1 Severity: wishlist Tags: patch
Hey, The attached patch adds support for the s2ram -r option to hibernate. Gr. Matthijs -- Package-specific info: --- configuration ==> /etc/hibernate/common.conf <== Verbosity 0 LogFile /var/log/hibernate.log LogVerbosity 1 Distribution debian SaveClock restore-only UnmountFSTypes smbfs nfs vfat UnmountGraceTime 1 OnSuspend 20 wpa_action wlan0 stop || true UnloadModules rt2500pci UnloadBlacklistedModules yes LoadModules psmouse rt2500pci ==> /etc/hibernate/disk.conf <== TryMethod ususpend-disk.conf TryMethod sysfs-disk.conf ==> /etc/hibernate/hibernate.conf <== TryMethod suspend2.conf TryMethod disk.conf TryMethod ram.conf ==> /etc/hibernate/ram.conf <== TryMethod ususpend-ram.conf TryMethod sysfs-ram.conf ==> /etc/hibernate/suspend2.conf <== UseSuspend2 yes Reboot no EnableEscape yes DefaultConsoleLevel 1 Compressor lzf Encryptor none FullSpeedCPU yes Include common.conf ==> /etc/hibernate/sysfs-disk.conf <== UseSysfsPowerState disk Include common.conf ==> /etc/hibernate/sysfs-ram.conf <== UseSysfsPowerState mem Include common.conf ==> /etc/hibernate/ususpend-both.conf <== USuspendMethod both Include common.conf ==> /etc/hibernate/ususpend-disk.conf <== USuspendMethod disk Include common.conf ==> /etc/hibernate/ususpend-ram.conf <== USuspendMethod ram USuspendRamForce yes USuspendRamAcpiSleep 1 Include common.conf --- /sys/power ==> /sys/power/disk <== [platform] test testproc shutdown reboot ==> /sys/power/image_size <== 666318110 ==> /sys/power/resume <== 254:1 ==> /sys/power/state <== standby mem disk --- log Starting suspend at Tue Oct 9 13:33:42 CEST 2007 hibernate: [01] Executing CheckLastResume ... hibernate: [01] Executing CheckRunlevel ... hibernate: [01] Executing LockFileGet ... hibernate: [01] Executing NewKernelFileCheck ... hibernate: [10] Executing EnsureUSuspendCapable ... hibernate: [20] Executing MiscLaunchAuxFunc1 ... Executing wpa_action wlan0 stop || true... hibernate: [45] Executing FSTypesUnmount ... hibernate: [59] Executing RemountXFSBootRO ... hibernate: [89] Executing SaveKernelModprobe ... hibernate: [90] Executing ModulesUnload ... hibernate: [91] Executing ModulesUnloadBlacklist ... hibernate: [98] Executing CheckRunlevel ... hibernate: [99] Executing DoUSuspend ... hibernate: Running /usr/sbin/s2ram -f -a 1 ... hibernate: [90] Executing ModulesLoad ... hibernate: [89] Executing RestoreKernelModprobe ... hibernate: [70] Executing ClockRestore ... hibernate: [59] Executing RemountXFSBootRW ... hibernate: [01] Executing NoteLastResume ... hibernate: [01] Executing LockFilePut ... Resumed at Tue Oct 9 13:33:50 CEST 2007 -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.23-rc9-g18ca6f26-dirty (PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages hibernate depends on: ii console-tools 1:0.2.3dbs-65 Linux console and font utilities Versions of packages hibernate recommends: pn dash <none> (no description available) ii hdparm 7.7-1 tune hard disk parameters for high ii uswsusp 0.7-1 tools to use userspace software su pn vbetool <none> (no description available) -- no debconf information
--- /root/ususpend 2007-10-09 12:05:50.000000000 +0200 +++ /usr/share/hibernate/scriptlets.d/ususpend 2007-10-09 12:08:03.000000000 +0200 @@ -9,6 +9,7 @@ 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 "USuspendRamRadeontool <boolean>" "Passes the -r flag to s2ram to let radeontool turn of the backlight before suspending." 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" @@ -21,6 +22,7 @@ USUSPEND_RAM_VBESAVE=0 USUSPEND_RAM_VBEPOST=0 USUSPEND_RAM_VBEMODE=0 +USUSPEND_RAM_RADEONTOOL=0 USUSPEND_RAM_ACPISLEEP=0 USuspendConfigEnabler() { @@ -58,6 +60,9 @@ ususpendramvbemode) BoolIsOn "$1" "$2" && USUSPEND_RAM_VBEMODE=1 || return 0 ;; + ususpendramradeontool) + BoolIsOn "$1" "$2" && USUSPEND_RAM_RADEONTOOL=1 || return 0 + ;; ususpendramacpisleep) USUSPEND_RAM_ACPISLEEP="$2" || return 0 ;; @@ -93,6 +98,7 @@ [ $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_RADEONTOOL -eq 1 ] && ARGS="$ARGS -r" [ $USUSPEND_RAM_VBEMODE -eq 1 ] && ARGS="$ARGS -m" [ $USUSPEND_RAM_ACPISLEEP -ne 0 ] && ARGS="$ARGS -a $USUSPEND_RAM_ACPISLEEP" fi