Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Suspend2 2.6.18 & genkernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Mythril
n00b
n00b


Joined: 07 Oct 2006
Posts: 52

PostPosted: Sat Oct 07, 2006 10:18 am    Post subject: Suspend2 2.6.18 & genkernel Reply with quote

Hi,

I was using suspend2-sources-2.6.16-r8 and hibernate-script-1.12-r1 until now but I upgraded to
suspend2-sources-2.6.18 and hibernate-script-1.93-r6 and it does not work anymore

I can hibernate without problem but when resuming, everything works fine until suspend2 tries to load the swap and fails with message "Unable to find swap-space signature".

I have looked on Google and it seems to be related to the initramfs generated by genkernel :
With the previous versions of suspend2-sources and hibernate-script, you had to update the /usr/share/genkernel/generic/linuxrc file and add the line 'echo > /proc/suspend2/do_resume' after 'mount -t proc proc /proc'. But in the new version of suspend2, location of /proc/suspend2 has been changed to /sys/power/suspend2 and thus updating the line to 'echo > /sys/power/suspend2/do_resume' does not work anymore (maybe /sys has not been loaded yet).

So, I think it is just a matter of adding a line or two in genkernel's linuxrc file but I can't find where.

Anyone who was able to have this work with genkernel and the latest versions of suspend2-sources and hibernate-script ?

Thanks !
Back to top
View user's profile Send private message
Snoozz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Feb 2006
Posts: 76

PostPosted: Fri Oct 13, 2006 8:46 am    Post subject: Reply with quote

I have the same problem :s. Doesn't anyone know what to do?

K found it!

This is what you'll have to do:

1.open /usr/share/genkernel/generic/linuxrc with your favorite editor

2.Search for the line: exec /bin/busybox chroot (normally line number 764)

3.Replace everything from "exec /bin/busybox chroot . /bin/sh <<- EOF" to " exec /sbin/init ${REAL_INIT}
EOF" WITH
Code:

        exec /bin/busybox chroot . /bin/sh <<- EOF
        mount -t sysfs none /sys
        mount -t proc proc /proc >/dev/null 2>&1
        echo > /sys/power/suspend2/do_resume
        umount /proc;umount /sys ; mount -o remount,rw / >/dev/null 2>&1
        exec /sbin/init ${REAL_INIT}
EOF


4a. genkernel --install initrd
4b People with gensplash: genkernel --install --gensplash=yourtheme initrd

Voila, enjoy hibernate ;)
Back to top
View user's profile Send private message
Mythril
n00b
n00b


Joined: 07 Oct 2006
Posts: 52

PostPosted: Fri Oct 13, 2006 7:20 pm    Post subject: Reply with quote

yep ! worked for me too !

Thanks ! :D

I just had to remove the 'mount -o remount,rw' command cause fsck failed at boot with a message telling / was mounted so checking it would be dangerous.

Thanks a lot.
Back to top
View user's profile Send private message
punter
Guru
Guru


Joined: 25 Nov 2002
Posts: 506

PostPosted: Fri Oct 20, 2006 12:19 pm    Post subject: Reply with quote

I'm using the same kernel and hibernate-script... but my hibernation worked in an unusual manner:
it resumed not after the kernel loading, but even _after_ the modules were loaded.

there is a "suspend2_resume" command in the middleware of linuxrc file.... what did you guys do with that?
my resume works fine when it reaches that command, but i'm concerned about my root partition...

do you guys know if i should leave it as is... or alter the start to resume at that point?

cheers,
shane
Back to top
View user's profile Send private message
Mythril
n00b
n00b


Joined: 07 Oct 2006
Posts: 52

PostPosted: Fri Oct 20, 2006 2:14 pm    Post subject: Reply with quote

punter wrote:
I'm using the same kernel and hibernate-script... but my hibernation worked in an unusual manner:
it resumed not after the kernel loading, but even _after_ the modules were loaded.

there is a "suspend2_resume" command in the middleware of linuxrc file.... what did you guys do with that?
my resume works fine when it reaches that command, but i'm concerned about my root partition...

do you guys know if i should leave it as is... or alter the start to resume at that point?

cheers,
shane


I've got the same behaviour... Don't know anything about how this works internally but it seems to work fine for me...
Back to top
View user's profile Send private message
punter
Guru
Guru


Joined: 25 Nov 2002
Posts: 506

PostPosted: Wed Oct 25, 2006 12:23 pm    Post subject: Reply with quote

well, i can confirm that the default "suspend2_resume" command in the linuxrc file is not sufficient..... it hanged my computer 5 minutes after resuming....

so, we need to put the resume operation at the start.... but how do you know whether to use the traditional "echo > /proc" approach, or this new "suspend2_resume" command ??
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum