Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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
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?
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 ----
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.