Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 03-02-2008, 07:56 AM   #1
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 46
Hibernate (suspend to disk) breaks swap

I've been trying to get hibernation to work on my ThinkPad R50. The machine seems to write the contents of the memory to the swap-partition and then power down exactly as it should, but when I switch the machine back on, it simply boots up again instead of resuming from the hibernation. The swap partition is trashed and I need to do mkswap /dev/[swap-partition] and then swapon -a to get it working again.

The machine has 512 MB of memory and the size of the swap if 1 GB.
Old 03-02-2008, 09:11 AM   #2
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,299

Rep: Reputation: 321Reputation: 321Reputation: 321Reputation: 321
Do you pass 'resume = /dev/[swap]' to kernel in grub/lilo?
Old 03-04-2008, 05:14 PM   #3
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Original Poster
Rep: Reputation: 46
Yep, there is:

append="resume2=swap:/dev/[swap] splash=silent quiet sysrq=1"

in lilo.conf
Old 07-21-2008, 03:32 AM   #4
LQ Newbie
Registered: Oct 2004
Location: Brussels
Posts: 6

Rep: Reputation: 0
Working hibernation on Slackware 12.1

At first, I experienced also problems running s2disk (uwsusp) on Slackware 12.1 but looking further, I discovered that my swap device wasn't valid.

/dev/sda2 swap swap defaults 0 0
/dev/sda1 / reiserfs defaults 1 1
/dev/sda3 /mnt/sda3 reiserfs defaults 1 2
/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0

This issue was fixed by running a check on the swap partition:
mkswap -c /dev/sda2

And hibernating to disk now works great !

Slackware is still there and remains worth-while

my s2disk script

msd=$(cat /etc/suspend.conf |grep resume|sed -e "s/resume.*\/dev/\/dev/")
swt=$(swapon -s|grep $msd)
if [ "$swt" = "" ]; then {
echo -e "\nyour swap device seems to be incorrectlynot defined - please check /etc/fstab and /etc/suspend.conf !"
echo -e "you may try to fix this issue by running: mkswap -c $msd\n"
exit 0
if [ "$mrc" = "0" ]; then {
echo -e "\nusing swap device $swt to suspend to disk ...\n"
echo " Going to suspend mode ... please wait."
echo "8" >/proc/sys/kernel/printk
echo "disk" >/sys/power/state

-- cgoetz
Old 07-21-2008, 10:25 AM   #5
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Original Poster
Rep: Reputation: 46
Still doesn't work for me. I think the problem is with lilo refusing to understand that the machine has to be resumed. Suspending seems to work fine.


Oh god... all this time and the only problem was that there must not be the swap: in append string XD

It works if you put:

append="resume=/dev/[swap] splash=silent quiet sysrq=1"

in lilo.conf and run lilo

Last edited by alienDog; 07-21-2008 at 10:44 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hibernate/suspend with two swap partitions ordealbyfire83 Linux - Hardware 8 07-30-2007 01:11 PM
Possible Suspend/HIbernate fix angryfirelord Linux - Hardware 0 07-20-2007 07:46 PM
Hibernate/Suspend issues on opensuse10.2 with swap on LVM tea of evil SUSE / openSUSE 3 03-26-2007 12:14 PM
Wireless not working after suspend/hibernate fatbeaver SUSE / openSUSE 9 04-26-2006 03:16 PM
suspend a.k.a hibernate on kernel 2.6, how to use it? demmylls Linux - General 1 03-06-2004 01:06 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:06 PM.

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