LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-05-2006, 11:42 AM   #1
rob666
LQ Newbie
 
Registered: Jul 2005
Posts: 9

Rep: Reputation: 0
Suspend2


Hi,
I'm running a 2.6.15.7 custom kernel with a suspend2 2.2 patch on etch. Bringing the computer down with suspend works, but when I try bring her back up I get the following message:

swap on /dev/sda5: invalid argument
swap activation failed with error code 255

The boot then goes on normally and there's the suspended session isn't resumed. I can't find this message in anywhere /var/log/... I can only see it scroll by when I'm bringing her up. The only related in messages is:

Unable to find swap-space signature

I installed the suspend2 patch by the books, with the resume swap partition written in the kernel.

Anyone have an idea what's going on.

Rob
 
Old 07-05-2006, 11:44 PM   #2
patrokov
Member
 
Registered: Jan 2006
Location: Riviera Beach
Distribution: Slackware -current, ArchLinux
Posts: 59

Rep: Reputation: 15
not sure if it's just a typo, but there shouldn't be a space in "swapon" You might have the hibernate.conf or other config file with a typo "swap on" instead.
 
Old 07-06-2006, 01:16 PM   #3
rob666
LQ Newbie
 
Registered: Jul 2005
Posts: 9

Original Poster
Rep: Reputation: 0
swap on

hi,
well is there a way to check into that? There is no mention of it in suspend2.conf or hibernate.conf. I doubt it though because I've tried hibernate 1.9.2 from debian, as well as hibernate-script-1.91, and get the same message. I'm not even sure "Swap on /dev/sda5:invalid argument" has anything to do with suspend2. Maybe it's just swapon trying to activate the swap disk like it would normally on a boot and finding that it's full of the suspend image which isn't resuming, then afterwards the swap partition is flushed by hibernate-cleanup and made usable. But I'm not enough of an expert in init.d to clearly understand in what order things are happening. i.e. first suspend2 tries to resume, then swapon tries to turn swap on, then hibernate-cleanup tries to flush the swap of suspend images?

I also find the suspending is a bit strange. I'm used to a progress bar, or a bar spinning, or the completion percentage being flashed while I suspend, but all I get is the following:

Suspend2 2.2 : swap writer : signature found
Suspend2 2.2 : suspend enabled
Suspend2 2.2 : initiating a software suspend cycle
Freezing programmes
Preparing image
Starting to save
Writing cache
Doing atomic coppy
Writing kernel & process data

(It's not exact though, because I had to copy it by hand.)
Is this what other people get when they suspend?
Anyway, I appreciate your help, rob

Last edited by rob666; 07-06-2006 at 01:18 PM.
 
Old 07-07-2006, 01:24 AM   #4
patrokov
Member
 
Registered: Jan 2006
Location: Riviera Beach
Distribution: Slackware -current, ArchLinux
Posts: 59

Rep: Reputation: 15
Those messages are normal for text suspending.

This might help you with your problem: http://kerneltrap.org/node/6766
Specifically:

Code:
6. What do all those entries in /proc/suspend2 do?

+   /proc/suspend2 is the directory which contains files you can use to
+   tune and configure Suspend2 to your liking. The exact contents of
+   the directory will depend upon the version of Suspend2 you're
+   running and the options you selected at compile time. In the following
+   descriptions, names in brackets refer to compile time options.
+   (Note that they're all dependant upon you having selected CONFIG_SUSPEND2
+   in the first place!)
+
+   Since the values of these settings can open potential security risks, they
+   are usually accessible only to the root user. You can, however, enable a
+   compile time option which makes all of these files world-accessible. This
+   should only be done if you trust everyone with shell access to this
+   computer!

+   - swapfile:
+
+   This entry is used to specify the swapfile or partition that
+   Suspend2 will attempt to swapon/swapoff automatically. Thus, if
+   I normally use /dev/hda1 for swap, and want to use /dev/hda2 for specifically
+   for my suspend image, I would
+
+   echo /dev/hda2 > /proc/suspend2/swapfile
+
+   /dev/hda2 would then be automatically swapon'd and swapoff'd. Note that the
+   swapon and swapoff occur while other processes are frozen (including kswapd)
+   so this swap file will not be used up when attempting to free memory. The
+   parition/file is also given the highest priority, so other swapfiles/partitions
+   will only be used to save the image when this one is filled.
+
+   The value of this file is used by headerlocations along with any currently
+   activated swapfiles/partitions.
It sounds like you'll need to make sure that your /proc/suspend2/swapfile has the correct location. Also, what is your grub/lilo entry for the resumed kernel?
 
Old 07-07-2006, 07:56 PM   #5
rob666
LQ Newbie
 
Registered: Jul 2005
Posts: 9

Original Poster
Rep: Reputation: 0
suspend2

Hi,
wow great link, really interesting article. unfortunately doesn't "just work" for me, but some great tips. here's the output for hibernate --bug-report, it shows that suspend2 is led to the right swap partition, everything seems in order so the problem must be during the resume. Not sure how to use ksymoops, will try fooling around with it tomorrow, so that I can find out what's happening during the boot:

/usr/share/hibernate/scriptlets.d/suspend2: line 363: lspci: command not found
System information follows. (Please include with bug reports).
--- Hibernate script version: 1.91
--- kernel config not compiled into kernel. Please attach this separately.
--- Modules loaded: ipv6 i915 drm ac battery sk98lin dm_mod sbp2 pcmcia hw_random i2c_i801 intel_agp eth1394 snd_hda_intel snd_hda_codec i2c_core yenta_socket rsrc_nonstatic pcmcia_core rtc snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_page_alloc firmware_class serio_raw pcspkr joydev evdev mousedev ext3 jbd uhci_hcd ehci_hcd usbcore skge ohci1394 ieee1394 thermal fan
--- Active swaps:
Filename Type Size Used Priority
/dev/sda5 partition 1485972 0 -1
--- /proc/cmdline: root=/dev/sda1 ro BOOT_DEBUG=3 libata.atapi_enabled=1 hdc=noprobe resume2=/dev/sda5
--- /proc/cpuinfo:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.60GHz
stepping : 8
cpu MHz : 1597.046
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe est tm2
bogomips : 3194.37

--- lspci:
---- Output from dmesg: ----
Suspend2 2.2: Swapwriter: Signature found.
Suspend2 2.2: Suspending enabled.
Suspend2 2.2: Initiating a software suspend cycle.
suspend_userui: program not configured. suspend_userui disabled.
Freezing processes
Preparing Image.
Suspend2 debugging info:
- SUSPEND core : 2.2
- Kernel Version : 2.6.15.7-mekernel
- Compiler vers. : 4.0
- Attempt number : 1
- Parameters : 0 160 0 1 0 0
- Overall expected compression percentage: 0.
- Compressor lzf enabled.
- Swapwriter active.
Swap available for image: 371493 pages.
- No I/O speed stats available.
---- End of dmesg output ----

Any other ideas?
Rob
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux: Reviewing Suspend2 LXer Syndicated Linux News 0 06-27-2006 03:03 PM
suspend2 corrupted the hard drive !?! divukman Linux - General 1 04-28-2006 06:58 AM
Computer rehibernates right away after waking up, using Suspend2. cellist Linux - Laptop and Netbook 1 03-19-2006 04:55 PM
suspend2 in mm kernels? is there an easier way? cheater1034 Linux - Software 0 03-07-2006 09:47 PM
suspend2 and ATI tanaselia Linux - Hardware 3 01-25-2006 03:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration