You are not logged in.

#1 2012-10-02 11:30:03

subzero
Member
Registered: 2012-09-04
Posts: 14

swap area problem

hello
I don't have swaparea partition, and I want to use pm-hibernate , so I used this commands

# fallocate -l 512M /swapfile
# dd if=/dev/zero of=/swapfile bs=1M count=512
# chmod 600 /swapfile
# mkswap /swapfile
# swapon /swapfile
then I edited /etc/fstab
/swapfile none swap defaults 0 0

after that I edited /etc/default/grub (GRUB_CMDLINE_LINUX)
GRUB_CMDLINE_LINUX="resume=/dev/sda6 resume_offset=1232896 "

/dev/sda6 contains swapfile and I found resume_offset after using file

[root@arch ~]# filefrag -v /swapfile
Filesystem type is: ef53
File size of /swapfile is 536870912 (131072 blocks, blocksize 4096)
ext logical physical expected length flags
   0       0  1232896           32768
   1   32768  1265664           32768
   2   65536  1298432           32768
   3   98304  1331200           32768 eof
/swapfile: 1 extent found
#######################################

in the end I used "grub-mkconfig > /boot/grub/grub.cfg "

after all this  pm-hibernate can't work it shows me this message
"PM : swap header not found"
what should I do ??

Offline

#2 2012-10-02 11:48:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,517
Website

Re: swap area problem

I have never set up a swap file, so take this with a large grain of salt, but don't you need to use mkswap on the file?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2012-10-02 12:43:18

subzero
Member
Registered: 2012-09-04
Posts: 14

Re: swap area problem

Yes, I used it in the 4th command

Offline

#4 2012-10-02 12:49:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,517
Website

Re: swap area problem

Oh, wow, sorry, I really can't read some days.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2012-10-02 12:57:21

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: swap area problem

Does

mkswap -f <swapfile>

make any difference?

Offline

#6 2012-10-02 21:54:03

subzero
Member
Registered: 2012-09-04
Posts: 14

Re: swap area problem

Ashren,
No difference !

Offline

#7 2012-10-07 10:48:42

subzero
Member
Registered: 2012-09-04
Posts: 14

Re: swap area problem

Now, I use uswsusp to hibernate, but when I turn-on my computer, I find my computer as I didn't use hibernate !!
the new contenents of /boot/grub/grub.cfg are post in this link http://pastebin.mozilla.org/1859526
the contenent of /etc/suspend.conf :
#snapshot device = /dev/snapshot
resume offset = 2367488
resume device = /dev/sda6
#image size = 350000000
#suspend loglevel = 2
#compute checksum = y
#compress = y
#encrypt = y
#early writeout = y
#splash = y
########################
/etc/default/grub :
http://pastebin.mozilla.org/1859527
########################
I regenerated /boot/grub/grub.cfg !!and I used
mkinitcpio -p linux

I don't know how to resilve this problem
what should I do ??

Offline

#8 2012-10-07 21:24:46

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: swap area problem

I have not used uswsusp, but that it did not work with your first method is also strange.

What is the filesystem of /dev/sda6 ?
Maybe you are missing an "insmod" for that in grub.

Offline

#9 2012-10-07 23:51:10

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: swap area problem

What's the underlying filesystem? I'll mention that btrfs doesn't actually support swapfiles: https://btrfs.wiki.kernel.org/index.php … p_files.3F

Offline

#10 2012-10-08 19:04:48

subzero
Member
Registered: 2012-09-04
Posts: 14

Re: swap area problem

my file system is ext3
I resolved the problem by making a new partition for swapping, and I use pm-hibernate
now I have one problem, when I try to suspend
[user@arch ~]$ s2ram
KMS graphics driver is in use, skipping quirks.

Last edited by subzero (2012-10-08 19:39:30)

Offline

#11 2012-10-08 20:23:54

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: swap area problem

subzero wrote:

my file system is ext3
I resolved the problem by making a new partition for swapping, and I use pm-hibernate

Good that works then, but still strange the first method with the swapfile you tried did not.

subzero wrote:

now I have one problem, when I try to suspend
[user@arch ~]$ s2ram
KMS graphics driver is in use, skipping quirks.

If it just is noted in the pm-suspend.log but the machine suspends fine, then I would see it as an information.
In what way is it a problem?

Offline

#12 2012-10-08 20:30:45

subzero
Member
Registered: 2012-09-04
Posts: 14

Re: swap area problem

Strike0 wrote:

In what way is it a problem?

after boot , pm-suspend works very good, then after resume ,when I use it , it suspend for 2 or three seconds and it resumes automaticly !!

Offline

#13 2012-10-08 20:37:45

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: swap area problem

Ok, that's no good then. Have you had a look at the troubleshooting issues: https://wiki.archlinux.org/index.php/Pm … om_suspend
for starters?

Share with us your graphics driver/chip, maybe also a relevant lines of the resume part in the pm-suspend.log when it failed. Any other errors in there apart from the KMS skipping quirks?

Offline

#14 2012-10-08 21:03:44

subzero
Member
Registered: 2012-09-04
Posts: 14

Re: swap area problem

I uploaded the first 171 lines in suspend.log
http://pastebin.mozilla.org/1861107

Offline

#15 2012-10-08 21:12:18

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: swap area problem

Nothing unusual in there that I see, although you seem to have some configurations since then I would suppose ...
To me those lines look like your pc resumed fine on 9th September just after a lunch break. It did not?

Offline

#16 2012-10-08 21:25:15

subzero
Member
Registered: 2012-09-04
Posts: 14

Re: swap area problem

I forgot XD , this file contains 19851 line  , the last 181 lines are posted here http://pastebin.mozilla.org/1861115
I can't understand , if you read it , you will find success .... success success, perhaps it susspend 2 ram successfully but it resume without my permession !

Offline

#17 2012-10-08 21:53:44

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: swap area problem

What you posted now looks like a hibernate, not a suspend. Something might be mixed up there, if you say that is supposed to be the suspend2ram.
Further there is an error you can follow up:

Unloading kernel module button.../usr/lib/pm-utils/functions: ligne89: log : commande introuvable
Failed.

Offline

#18 2012-10-08 22:27:07

subzero
Member
Registered: 2012-09-04
Posts: 14

Re: swap area problem

_rmmod()
{
	if modprobe -r "$1"; then
		touch "${STORAGEDIR}/module:$1"
		return 0
	else
		log "# could not unload '$1', usage count was $2"
		return 1
	fi
}

it says that log  was not found. and I don't think that this is a problem
but you have reason suspend is not montionned at all in this file, I'm sure that I suspended to ram (I can make differance ^^) , perhaps pm-suspend can't writes its log !!

Offline

#19 2012-10-09 09:51:22

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: swap area problem

subzero wrote:
_rmmod()
{
	if modprobe -r "$1"; then
		touch "${STORAGEDIR}/module:$1"
		return 0
	else
		log "# could not unload '$1', usage count was $2"
		return 1
	fi
}

it says that log  was not found. and I don't think that this is a problem
but you have reason suspend is not montionned at all in this file, I'm sure that I suspended to ram (I can make differance ^^) , perhaps pm-suspend can't writes its log !!

I have a different opinion:
1. It is a double-problem that "log" was not found, Why would the script be in that "else" bracket? To log that the unloading of module $1 failed.
2. It is a log about hibernate because it says so all over the place. Compare your two pastebins to see the difference. Besides again it is old: October 2 was last Friday. You probably got the wrong log again - log problem or not.
Try this to look at the last 200 lines of it

tail -n 200 /var/log/pm-suspend.log |more

Troubleshooting the reason behind suspend/resume-problems can be pretty tiresome.

I think you should take more time to gather the information. Also you suddenly changed thread topic, which is fine, but you did so without providing information about how you configured everything around pm-utils - compare it to how you provided the relevant information for your initial question regarding swapfile.

Offline

Board footer

Powered by FluxBB