Hello, My machine is unknown to s2ram, fortunately adding the --force option is enough to get s2ram to work. s2ram --force: works as expected (both from X and the console) s2disk: works as expected (both from X and the console) s2both == s2disk, but s2both --force: works as expected (both from X and the console) Now, with the hibernate script: Since I need to use --force for s2ram, I set 'USuspendRamForce' to 'yes' in /etc/hibernate/ususpend-ram.conf. This result in the following behaviour: hibernate-ram: works as expected ( == s2ram) hibernate -F /etc/hibernate/ususpend-disk.conf: works as expected ( == s2disk) but hibernate -F /etc/hibernate/ususpend-both.conf: doesn't work as expected since the computer is shutdown. I tried adding "USuspendRamForce yes" to /etc/hibernate/ususpend-both.conf, but that didn't help. (I even tried the potential hidden option: "USuspendBothForce yes"... :p ) Anyway, the hibernate script should give the possibility to --force s2both, as it does for s2ram Reproducible: Always Actual Results: hibernate -F /etc/hibernate/ususpend-both.conf does a 's2both' instead of 's2both --force' which then is equivalent to just do a 's2disk' Expected Results: The ability to resume from RAM Workaround: use s2both directly hibernate -F /etc/hibernate/ususpend-both.conf -v3 hibernate: Including configuration from common.conf hibernate: [01] Executing CheckLastResume ... hibernate: [01] Executing CheckRunlevel ... hibernate: [01] Executing LockFileGet ... hibernate: [01] Executing NewKernelFileCheck ... hibernate: [10] Executing EnsureUSuspendCapable ... hibernate: [11] Executing XHacksSuspendHook1 ... hibernate: [19] Executing LogoutPidgin ... Logging out sam's Pidgin using D-Bus session bus address No existing libpurple instance detected. hibernate: [59] Executing RemountXFSBootRO ... hibernate: [89] Executing SaveKernelModprobe ... Saved /proc/sys/kernel/modprobe is /sbin/modprobe hibernate: [91] Executing ModulesUnloadBlacklist ... Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules Module version for ipw2100 is Module version for ipw2200 is Module version for snd_bt_sco is Module version for ndiswrapper is Unloading blacklisted module uvcvideo (and dependencies) Unloading uvcvideo ... Removing modules with rmmod. hibernate: [95] Executing XHacksSuspendHook2 ... xhacks: changing console from 7 to 15 hibernate: [98] Executing CheckRunlevel ... hibernate: [99] Executing DoUSuspend ... hibernate: Running /usr/sbin/s2both ... hibernate: [90] Executing ModulesLoad ... Loading module uvcvideo (from auto)... hibernate: [89] Executing RestoreKernelModprobe ... hibernate: [85] Executing XHacksResumeHook2 ... xhacks: changing console back to 7 hibernate: [70] Executing ClockRestore ... hibernate: [59] Executing RemountXFSBootRW ... hibernate: [19] Executing LoginPidgin ... Logging back (to status ) sam's Pidgin using D-Bus session bus address No existing libpurple instance detected. hibernate: [11] Executing XHacksResumeHook1 ... hibernate: [01] Executing NoteLastResume ... hibernate: [01] Executing LockFilePut ...
Created attachment 190480 [details, diff] Patch to add the USuspendBothForce option With this patch, it's now possible to use the hibernate script to do a ususpend-both, even if the machine is unknown to s2ram. One just need to set USuspendBothForce to yes in (for example) /etc/hibernate/ususpend-both.conf
Created attachment 190481 [details] ebuild using this patch
--- hibernate-script-2.0-r1.ebuild 2009-05-05 15:34:48.000000000 +0200 +++ hibernate-script-2.0-r2.ebuild 2009-05-06 08:15:56.000000000 +0200 @@ -25,6 +25,7 @@ src_unpack() { cd "${S}" epatch "${FILESDIR}/${P}-init.d.patch" + epatch "${FILESDIR}/${P}-USuspendBothForce.patch" } src_install() {
Created attachment 190483 [details] hibernate-script-2.0-USuspendBothForce.patch typo in my previous patch: ( need => needs )
Created attachment 190520 [details, diff] hibernate-script-2.0-USuspend-use-long-options.patch From this debian bug report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505410 it seems s2both should accept every USuspendRam* options. The attached patches are an improvement over the one posted on 'bdo' (as opposed to 'bgo' ;) ) First patch ( hibernate-script-2.0-USuspend-use-long-options.patch ): * uses long options instead of short ones because for example s2both doesn't support the '-f' (for --force) short option. Same for the '-a' short option ( --acpi_sleep ) * adapts the comments about the different USuspendRam* options in ususpend-ram.conf to reflect that changes. And the second patch ( hibernate-script-2.0-USuspendRam-options-for-s2both.patch ) * also suggests for the suspend-to-both method to read about s2ram, and USuspendRamForce if the machine is unknown and the option unset. * Duplicates and adapts the comments about the different USuspendRam* options in and from ususpend-ram.conf to ususpend-both.conf
Created attachment 190521 [details, diff] hibernate-script-2.0-USuspendRam-options-for-s2both.patch
Created attachment 190523 [details] hibernate-script-2.0-r2.ebuild
Created attachment 190633 [details, diff] hibernate-script-2.0-USuspendRam-options-for-s2both.patch Use s2ram for EnsureUSuspendCapable function, as s2both doesn't support the --test option And, this should be the last change I make.
This package is now orphan: http://my.opera.com/pacho/blog/2012/11/27/about-maintainer-needed
Fixed in hibernate-script-2.0-r6 Thanks!