Bug#441801: hibernate: fails with suspend2 and filewriter plugin

2007-10-02 Thread me
On Monday 01 October 2007 01:25:00 martin f krafft wrote:
 Please see if the attached patch by Matthias Henseler fixes the
 issue.

Hello. Patch from Matthias didn't solve the problem. But i found message 
(http://lists.tuxonice.net/lurker/message/20070927.120028.f880919b.en.html) 
on suspend2-devel maillist with small patch which solve this issue. 

--
Eugene
diff -ruN hibernate-1.96~pre-svn.r1136.orig/scriptlets.d/suspend2 hibernate-1.96~pre-svn.r1136/scriptlets.d/suspend2
--- hibernate-1.96~pre-svn.r1136.orig/scriptlets.d/suspend2	2007-10-03 02:53:23.0 +1100
+++ hibernate-1.96~pre-svn.r1136/scriptlets.d/suspend2	2007-10-03 02:59:39.0 +1100
@@ -99,6 +99,8 @@
 [ -d $SWSUSP_ROOT/swap/ ]  SWAPWRITER_ROOT=$SWSUSP_ROOT/swap
 [ -d $SWSUSP_ROOT/user_interface/ ]  UI_ROOT=$SWSUSP_ROOT/user_interface
 [ -d $SWSUSP_ROOT/storage_manager/ ]  STORAGEMAN_ROOT=$SWSUSP_ROOT/storage_manager
+[ -e $SWSUSP_ROOT/resume ]  RESUME_FILE=resume 
+[ -e $SWSUSP_ROOT/resume2 ]  RESUME_FILE=resume2 
 
 SWSUSP_DEFAULT_ALL_SETTINGS_FILE=$SWSUSP_D/swsusp2-all-settings.conf
 HIBERNATE_FILEWRITER_TRAIL=/var/run/suspend2_filewriter_image_exists


Bug#441801: hibernate: fails with suspend2 and filewriter plugin

2007-10-02 Thread martin f krafft
also sprach me [EMAIL PROTECTED] [2007.10.02.1717 +0100]:
 Hello. Patch from Matthias didn't solve the problem. But i found
 message
 (http://lists.tuxonice.net/lurker/message/20070927.120028.f880919b.en.html)
 on suspend2-devel maillist with small patch which solve this
 issue. 

Thanks, this is included in 1.97, which is not yet released, but
soon...

-- 
 .''`.   martin f. krafft [EMAIL PROTECTED]
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


Bug#441801: hibernate: fails with suspend2 and filewriter plugin

2007-09-30 Thread martin f krafft
tags 441801 moreinfo
thanks

also sprach Eugene Korbut [EMAIL PROTECTED] [2007.09.11.1057 +0100]:
 hibernate fails with suspend2 and filewriter plugin
 
 % sudo hibernate
 cat: /sys/power/suspend2/: Is a directory
 ABORTING: /sys/power/suspend2/ did not return a valid result.
 hibernate: Aborting.

Please run

  sudo hibernate -v4

and provide the entire output.

-- 
 .''`.   martin f. krafft [EMAIL PROTECTED]
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


Bug#441801: hibernate: fails with suspend2 and filewriter plugin

2007-09-30 Thread martin f krafft
tags 441801 confirmed patch fixed-upstream pending
thanks

Please see if the attached patch by Matthias Henseler fixes the
issue.

-- 
 .''`.   martin f. krafft [EMAIL PROTECTED]
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
diff -ruN hibernate-script-1.96/scriptlets.d/suspend2 hibernate-script-1.96.fixed/scriptlets.d/suspend2
--- hibernate-script-1.96/scriptlets.d/suspend2	2007-07-16 14:33:09.0 +0200
+++ hibernate-script-1.96.fixed/scriptlets.d/suspend2	2007-07-30 18:40:13.0 +0200
@@ -74,9 +74,13 @@
 	/sbin/modprobe --first-time ${mod} /dev/null 21   SWSUSP_RMOD=${mod} ${SWSUSP_RMOD}
 done
 
+# signature for filewriter
+FILEWRITER_SIGNATURE=Suspend2
+
 # Detect where suspend2 is these days.
 if [ -d /sys/power/tuxonice/ ] ; then
 	SWSUSP_ROOT=/sys/power/tuxonice
+	FILEWRITER_SIGNATURE=TuxOnIce
 elif [ -d /sys/power/suspend2/ ] ; then
 	SWSUSP_ROOT=/sys/power/suspend2
 elif [ -d /proc/swsusp/ ] ; then
@@ -748,22 +752,31 @@
 if ! [ -e $SWSUSP_FILEWRITER_LOC ] ; then
 	vecho 0 $EXE: Creating $SWSUSP_FILEWRITER_SIZE MB filewriter target.
 	{
-	echo Suspend2
+	echo $FILEWRITER_SIGNATURE
 	dd if=/dev/zero bs=1M count=$SWSUSP_FILEWRITER_SIZE 2/dev/null
 	}  $SWSUSP_FILEWRITER_LOC
 	sync
 fi
 
 case `dd \if=$SWSUSP_FILEWRITER_LOC\ bs=8 count=1 2/dev/null` in
-	Suspend2)
+	$FILEWRITER_SIGNATURE)
 	# We're good to go.
 	vecho 1 $EXE: Detected filewriter image ready for use.
 	;;
+	Suspend2|TuxOnIce)
+	# Eeek! This is an incompatible image
+	# reliably preserve the starting block.
+	vecho 1 $EXE: Killing incompatible filewriter image.
+	if ! /bin/echo -ne $FILEWRITER_SIGNATURE\n\0\0 | dd of=$SWSUSP_FILEWRITER_LOC bs=11 count=1 conv=notrunc 2/dev/null ; then
+		vecho 0 $EXE: Failed to kill imcompatible image!
+		return 2 # Abort even with force
+	fi
+	;;
 	HaveImag)
 	# Eeek! There's already an image here. Erase it using dd to
 	# reliably preserve the starting block.
 	vecho 1 $EXE: Killing existing filewriter image.
-	if ! /bin/echo -ne Suspend2\n\0\0 | dd of=$SWSUSP_FILEWRITER_LOC bs=11 count=1 conv=notrunc 2/dev/null ; then
+	if ! /bin/echo -ne $FILEWRITER_SIGNATURE\n\0\0 | dd of=$SWSUSP_FILEWRITER_LOC bs=11 count=1 conv=notrunc 2/dev/null ; then
 		vecho 0 $EXE: Failed to kill existing image!
 		return 2 # Abort even with force
 	fi
@@ -794,17 +807,17 @@
 [ x$SWSUSP_FILEWRITER_NOVERIFY = x1 ]  return 0
 
 local new_resume2
-new_resume2=`cat $SWSUSP_ROOT/$RESUME_FILE`
+new_resume2=`cat $SWSUSP_ROOT/$RESUME2_FILE`
 if [ -z $new_resume2 ] ; then
-	vecho 0 ABORTING: $SWSUSP_ROOT/$RESUME_FILE did not return a valid result.
+	vecho 0 ABORTING: $SWSUSP_ROOT/$RESUME2_FILE did not return a valid result.
 	return 2 # abort even if forced
 fi
 
 if ! grep $new_resume2 /proc/cmdline ; then
-	filewriter_target=`cat $SWSUSP_ROOT/$RESUME_FILE`
-	vecho 0 ABORTING: $RESUME_FILE is not setup correctly. Unless you have setup your bootloader
+	filewriter_target=`cat $SWSUSP_ROOT/$RESUME2_FILE`
+	vecho 0 ABORTING: $RESUME2_FILE is not setup correctly. Unless you have setup your bootloader
 	vecho 0   correctly, resuming will most likely fail. To correct this, add
-	vecho 0   \$RESUME_FILE=$filewriter_target\ to your kernel command line in your
+	vecho 0   \$RESUME2_FILE=$filewriter_target\ to your kernel command line in your
 	vecho 0   LILO or GRUB configuration file and reboot.
 	return 2 # abort even if forced
 fi


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


Bug#441801: hibernate: fails with suspend2 and filewriter plugin

2007-09-11 Thread Eugene Korbut
Package: hibernate
Version: 1.96~pre-svn.r1136-1
Severity: important


hibernate fails with suspend2 and filewriter plugin

% sudo hibernate
cat: /sys/power/suspend2/: Is a directory
ABORTING: /sys/power/suspend2/ did not return a valid result.
hibernate: Aborting.

-- Package-specific info:

--- configuration
== /etc/hibernate/common.conf ==
Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 3
Distribution debian
SaveClock restore-only
UnloadBlacklistedModules yes
LoadModules auto
SwitchToTextMode yes
== /etc/hibernate/disk.conf ==
TryMethod ususpend-disk.conf
TryMethod sysfs-disk.conf
== /etc/hibernate/hibernate.conf ==
TryMethod suspend2.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
FilewriterLocation /suspend-file 1024
ProcSetting userui_program /usr/lib/suspend2-userui/suspend2ui_fbsplash -T 
debian-black
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
Include common.conf

--- /sys/power
== /sys/power/state ==
standby mem disk
== /sys/power/suspend2 ==

--- log
Starting suspend at Tue Sep 11 20:55:00 VLAST 2007
hibernate: [01] Executing CheckLastResume ... 
hibernate: [01] Executing CheckRunlevel ... 
hibernate: [01] Executing LockFileGet ... 
hibernate: [01] Executing NewKernelFileCheck ... 
hibernate: [06] Executing Swsusp2SetupFilewriter ... 
hibernate: Detected filewriter image ready for use.
ABORTING: /sys/power/suspend2/ did not return a valid result.
hibernate: Swsusp2SetupFilewriter refuses to let us continue.
hibernate: Aborting.
hibernate: [06] Executing Swsusp2CleanupFilewriter ... 
hibernate: [01] Executing NoteLastResume ... 
hibernate: [01] Executing LockFilePut ... 
hibernate: [00] Executing RemoveSwsuspProcCruft ... 
Resumed at Tue Sep 11 20:55:01 VLAST 2007

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.22.6monk (SMP w/2 CPU cores; 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  hdparm7.7-1  tune hard disk parameters for high
pn  uswsusp   none (no description available)
ii  vbetool   0.7-1.1run real-mode video BIOS code to a

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]