Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
howto: get swsusp2 (hibernate, suspend to disk) working
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... , 12, 13, 14  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
tuxlover
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 297
Location: weltweit

PostPosted: Fri Mar 25, 2005 7:17 pm    Post subject: Re: hibernate crashing Reply with quote

iandow wrote:
The swsusp2 patch does not apply cleanly to the 2.6.11-mm kernel. Do you know how hard it is to do the matches manually?
Depends on how many chunks are failing... suspend2 is a big patchset but usually you don't need all of the patches. Simply take a look at the names, if you don't use bootsplash, then you don't need to apply the bootsplash patch either.
Back to top
View user's profile Send private message
BeaTtheMeaT666
n00b
n00b


Joined: 12 Nov 2002
Posts: 54

PostPosted: Mon Apr 04, 2005 9:53 pm    Post subject: Re: anyone? Reply with quote

EASYdoor wrote:
has anyone figured out the suspend2+xorg 6.8.*+ati 8.10.19 ?!?!

in konsole everything works just fine with 2.6.11-morph2 sources but X freezes constantly,...


Hi EASYdoor,

Suspend-to-disk works with the latest ati-drivers and xorg 6.8.2 if you install vbetool, which is not currently in portage.
The ebuild attached to this bugreport works fine for me: https://bugs.gentoo.org/show_bug.cgi?id=82325
vbetool is used to save/restore the state of the videocard.

Don't forget to add/uncomment "EnableVbetool yes" in /etc/hibernate/hibernate.conf

I am using a 2.6.11 vanilla-flavor with swsusp2-patches, but i am going to try the morph-sources soon.

Enjoy,

Bobo
Back to top
View user's profile Send private message
btlee
Apprentice
Apprentice


Joined: 03 Sep 2004
Posts: 168
Location: San Francisco

PostPosted: Sat Apr 09, 2005 1:00 am    Post subject: Reply with quote

I found that software suspend 2 patch is a little annoying from the aspect of the gentoo package management.

So, I made an ebuild file for gentoo-sources 2.6.11-r5 and software suspend 2.

This ebuild file has another patch for using 1g low memory.

However, some software suspend 2 patch files conflicts with gentoo sources, so I dropped several files from

gentoo-patches. I don't know what this makes.

Anyway, in my laptop (dell-700m), the patch works fine, but the suspend works very unstably.

If you are interested in this file, you can get the files from

http://wordnote.com/btlee/linux/gentoo/gentoo-sources.

From above url, you can get the ebuild files, specifically gentoo-sources-2.6.11-r7 is that one.

You must have another patchsets for gentoo-patch modified for avoiding the conflict with software suspend 2.

These files can be aquired from http://wordnote.com/btlee/linux/gentoo/distfiles.

At the url, genpatches files are what you need.

Actually, what I made is the one by novice of gentoo.

If you have better way for this, post it.

Thanks.
Back to top
View user's profile Send private message
bzagh
n00b
n00b


Joined: 16 Apr 2005
Posts: 3

PostPosted: Sun Apr 17, 2005 2:43 pm    Post subject: Reply with quote

@btlee
how do I apply your ebuild patch?
Back to top
View user's profile Send private message
btlee
Apprentice
Apprentice


Joined: 03 Sep 2004
Posts: 168
Location: San Francisco

PostPosted: Mon Apr 18, 2005 9:18 am    Post subject: Reply with quote

bzagh wrote:
@btlee
how do I apply your ebuild patch?


Just download the gentoo-sources directory on your PORTAGE_OVERLAY, for example /usr/local/portage/sys-kernel.
And then download the patch files in the distfiles to your /usr/portage/distfiles.
Third step is emerge.
After emerge, you must build the kernel sources using make menuconfig or other things.
If you finish the kernel compile (maybe 'make bzImage modules modules_install install), you will get the new kernel image. The name in the /boot should be vmlinuz-2.6.11.5. With this name, you correct your lilo file or grub file.
This patch files is not perfect, so take your own risk.
Back to top
View user's profile Send private message
jphelps
n00b
n00b


Joined: 06 Nov 2004
Posts: 21

PostPosted: Mon Apr 18, 2005 11:55 am    Post subject: Reply with quote

With a 2.6.x kernel do a:

make xconfig or menuconfig (save yourself some time by copying your old .config and do a make oldconfig first!)
make
make modules_install

then install the kernel in boot & updated grub/lilo/etc.

Arbitrarily dropping patch files sounds like a bad idea to me though. We really need a proper merge. If you have gentoo splash installed (splashutils) it's much worse of course.
Back to top
View user's profile Send private message
mlybarger
Guru
Guru


Joined: 04 Sep 2002
Posts: 473

PostPosted: Mon Apr 18, 2005 3:25 pm    Post subject: Reply with quote

does anyone know what the specific patched in gentoo-sources are that conflict with the swsusp2 patch? i'm still using a 2.6.7 kernel just mainly because it was such a pain to patch in this patch properly. it would be really nice if htere were a gentoo-laptop-sources with this patch, or even better if hte vanilla sources would adopt this patchset.
Back to top
View user's profile Send private message
tuxlover
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 297
Location: weltweit

PostPosted: Mon Apr 18, 2005 5:41 pm    Post subject: Reply with quote

mark_lybarger wrote:
or even better if hte vanilla sources would adopt this patchset.

Everyone interested in that should check out this FeatureUserRegister page at the suspend2.net wiki which aims to build support for inclusion in vanilla.
Back to top
View user's profile Send private message
btlee
Apprentice
Apprentice


Joined: 03 Sep 2004
Posts: 168
Location: San Francisco

PostPosted: Mon Apr 18, 2005 5:53 pm    Post subject: Reply with quote

jphelps wrote:
With a 2.6.x kernel do a:

make xconfig or menuconfig (save yourself some time by copying your old .config and do a make oldconfig first!)
make
make modules_install

then install the kernel in boot & updated grub/lilo/etc.

Arbitrarily dropping patch files sounds like a bad idea to me though. We really need a proper merge. If you have gentoo splash installed (splashutils) it's much worse of course.


I agree with you. Arbitrary dropping of patch files is not good. But if you know what the patch files do, it doesn't matter. The inclusion of the software suspend 2 patchset to the kernel tree is desirable, but now it is just our or my desire. By the way, I don't use this patch set any more. Now, I am satisfied with the ACPI suspend (to ram), which is supported by kernel without patch. It works well except a few patch in the user-level. :)

Cheers
Back to top
View user's profile Send private message
mlybarger
Guru
Guru


Joined: 04 Sep 2002
Posts: 473

PostPosted: Tue Apr 19, 2005 11:19 am    Post subject: Reply with quote

i couldn't find how to work the wiki that was posted (or rather what i was suppose to add my name to).

i'm interested in more information about this suspend to ram feature. that would also be nice. i think my win xp can suspend to ram for some time before it fully hibernates (ala swsusp2). my battery only lasts about an hour, probably less on this laptop. it's pretty silly how these batteries are
Back to top
View user's profile Send private message
tuxlover
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 297
Location: weltweit

PostPosted: Tue Apr 19, 2005 1:28 pm    Post subject: Reply with quote

mark_lybarger wrote:
i couldn't find how to work the wiki that was posted (or rather what i was suppose to add my name to).

You're supposed to add your name to the feature(s) of swsusp2 that you use. These are mostly new features not in swsusp1 yet. To edit a page, click "edit" on the left side of the page.
Quote:
i'm interested in more information about this suspend to ram feature.

--> redirect... This is completely different from suspend2/swusp2/suspend-to-disk. But I'm sure there are a bunch of other threads on this forum. And of course, there's always the linux acpi pages.
Back to top
View user's profile Send private message
tuxlover
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 297
Location: weltweit

PostPosted: Sat May 21, 2005 2:31 am    Post subject: Reply with quote

Tsuna wrote:
im reading and following the howto
it seems that installing their unofficial ebuild (sys-kernel/suspend2-sources) doesn't actually patch you current kernel sources but rather install new ones... does it differe from gentoo-sources only by the fact that suspend2 is patched in the kernel or is it actually based on a normal 2.6.11.9 kernel (which makes us loose benefit of the patches applied to the 2.6.11 by gentoo-sources)

gentoo-sources differ so much from official/vanilla, that it's usually not possible to apply the suspend2 patchset to gentoo-sources. So I guess this inofficial ebuild (suspend2-sources) installs a vanilla kernel sourcetree first. The only extra patch it contains is an fbsplash or so. Take a look at what it downloads, or directly at the ebuild.

Quote:
im going to try to use the patch given on suspend2 website
Code:
/usr/src/linux # /tmp/software-suspend-2.1.8-for-2.6.11/apply /tmp/software-suspend-2.1.8-for-2.6.11/
Applying 101-kdb-v4.4-2.6.11-rc3-common-1 ...
101-kdb-v4.4-2.6.11-rc3-common-1 will not apply cleanly. Reverse applied patches [Yn]?
Reversing patches...
Done.

is this normal?

No. It's saying "I couldn't apply a patch. do you want me to undo what I've already done?" This is because these patches don't apply all too well to gentoo-sources.

The easiest thing is to use the vanilla sources. Many of the patches in the gentoo patchset are actually compatible with suspend2, maybe simply try the ones you really need only. The gentoo patchset is downloaded to /usr/portage/distfiles/genpatches-2.6.*.tar.bz2 when you install gentoo-sources.
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Sat May 21, 2005 9:43 am    Post subject: Reply with quote

ok
i thought it could work with Gentoo Sources because the HOWTO on Gentoo-WIKI said you had to emerge developement-sources (which doesnt seem to exist, and thats why I edited the wiki: http://gentoo-wiki.com/index.php?title=HOWTO_Software_Suspend_v2&diff=0&oldid=21065 )

I think they should add suspend2 in the gentoo patchset (and mark it as experimental) it's a pain in the ass otherwise

no, i'm hesitating: vanilla flavor + suspend2 or gentoo flavor?
will the splashutils work properly with vanilla patched by suspend2 ?
what are the benefits of the gentoo patchset?
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
tuxlover
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 297
Location: weltweit

PostPosted: Sat May 21, 2005 10:59 am    Post subject: Reply with quote

Tsuna wrote:
i thought it could work with Gentoo Sources because the HOWTO on Gentoo-WIKI said you had to emerge developement-sources (which doesnt seem to exist, and thats why I edited the wiki: http://gentoo-wiki.com/index.php?title=HOWTO_Software_Suspend_v2&diff=0&oldid=21065 )

That's right - the vanilla sources 2.6 used to be called "development-sources" but now they're called "vanilla-sources" as 2.6 is not in dev status any more.
Quote:
I think they should add suspend2 in the gentoo patchset (and mark it as experimental) it's a pain in the ass otherwise

As I said, there seem to be way too many collisions (suspend2 <-> gentoo patchset). Solving these would be a lot of manual work (and maybe even some incompatibilities).
Quote:
no, i'm hesitating: vanilla flavor + suspend2 or gentoo flavor?
will the splashutils work properly with vanilla patched by suspend2 ?
what are the benefits of the gentoo patchset?

I don't know about the latter. The only thing I know is that a well working suspend system is much more important and useful to me than any splash screen :)
Maybe someone else here could enlighten us regarding this compatibility quostion (splashutils + suspend2)...?
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Sat May 21, 2005 3:07 pm    Post subject: Reply with quote

It's annoying when you have to choose between design and functionnality...
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Sat May 21, 2005 3:33 pm    Post subject: Reply with quote

im compiling a kernel with swsup2 and splashutils compatibility
we'll see if it works

my laptop doesn't have a big hdd (like most laptops) so my swap partition is only 430Mb whereas I have 1Gb RAM
i chose to use a file instead of the swap partition to hibernate, anyone has tested it before? does this properly work?
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Sat May 21, 2005 4:41 pm    Post subject: Reply with quote

actually i dont find any documentation about suspend how to suspend to file instead of swap 8O
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Mon May 23, 2005 5:56 pm    Post subject: Reply with quote

any help please about how to suspend to file?
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
tuxlover
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 297
Location: weltweit

PostPosted: Tue May 24, 2005 6:55 pm    Post subject: Reply with quote

Obviously no one here has done it before.
Take a look at http://suspend2.epfl.ch/HOWTO-2.html

First configure your kernel to support the suspend2 filewriter. Configure everything in suspend2 to be in the kernel (not as modules).

In your /etc/hibernate/hibernate.conf you should have a a section like
Code:
## For filewriter:
FilewriterLocation /suspend_file 1000
VerifyFilewriterResume2

It's already there just uncomment it. 1000 is the size of the /suspend_file. You don't need that much if you use compression which is very much recommended.

The first time you try to suspend it should take a while to create the suspend file.

Then configure your grub as follows (from the page above):
Quote:
For the filewriter, you should first prepare your suspend file - this can be done by configuring your hibernate.conf file with the "FilewriterLocation" option, and running hibernate --no-suspend. Then take a look in /proc/software_suspend/resume2 for what to pass to your kernel. You should see something like file:/dev/hda7:0x10011f, in which case you should append "resume2=file:/dev/hda7:0x10011f" as a kernel parameter in your lilo.conf file or GRUB's menu.lst.

If all this works, please add it to the wiki suspend2 howto. Thanks.
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Tue May 24, 2005 10:22 pm    Post subject: Reply with quote

ok, thank you very much, although I browsed the whole site of suspend2, it seems I missed out this piece of information!
I will try by the end of the week, not before because I have exams and I need my laptop so I don't want to mess with it

from what i've read @ suspend2's website, bad use of swsup2 can compromise your data (as in screw up your filesystem)
if, say, suspend to file doesn't work for me. I'll go in hibernate mode and won't be able to resume. Ok fine, can I boot normally afterwards? Or will I be screwed and my root fs stuck by the hibernation process for some reason?

I mean, is it safe to give it a try or should I take care to backup my root fs before trying?
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
tuxlover
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 297
Location: weltweit

PostPosted: Thu May 26, 2005 9:00 pm    Post subject: Reply with quote

Tsuna wrote:
I mean, is it safe to give it a try or should I take care to backup my root fs before trying?

In my opinion suspend2 is fairly mature (read: I haven't had any problems with it). But as always, backups are good anyway.

Suspending and then not using the image to resume is not very dangerous. That should be no problem if you use a decent filesystem.

You will have a big problem though when you resume from an image that is too old (meaning that you have rebooted before using this image). This most definitely WILL screw up all your filesystems BADLY.

So here's how to screw up your fs (i.e. DON'T DO THIS):
1. suspend
2. reboot, but without using the image from step 1
3. resume from the image from step 1
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Thu May 26, 2005 9:18 pm    Post subject: Reply with quote

yeah ok, thanks
I use ext3 on my laptop

it's obvious that resuming an image after having rebooted normally will screw things up, I wouldn't try that anyway
from what I understood, you should use the noresume2 option when you want to reboot normally -- I guess this destroyes the suspended data so you can't resume the older session later on

I will try all that tomorrow or after tomorrow
thank you for your advices !
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
strerror
Retired Dev
Retired Dev


Joined: 16 Jan 2004
Posts: 24

PostPosted: Wed Jun 01, 2005 9:10 pm    Post subject: Reply with quote

My HOWTO might be of interest to readers of this thread. Check it out here http://www.disciplina.net/howto/HOWTO-lvm_dm-crypt_suspend2.html
Back to top
View user's profile Send private message
sludink
n00b
n00b


Joined: 14 Feb 2005
Posts: 16
Location: The Netherlands

PostPosted: Mon Jun 06, 2005 12:12 pm    Post subject: Swsusp for hardened Gentoo Reply with quote

sterror: Thanks for the HOWTO, I use LVM + dmcrypt too.
I also tried patching a hardened gentoo kernel (Use PaX) with swsusp2 manually.

Well, it's a sad thing, but after a long day of manually patching things (more than 20 files I believe, which include more than one patch per file), my kernel wouldn't compile (It was the first time I was manually patching a kernel).
Anyway, I'm afraid since I use LVM and encrypted swap, it will be really difficult to get it to work, but it would be a begin if my kernel just compiled. (Backed up everything, so screwing up isn't too bad). As a summary, half of the patches 'merged' cleanly against the 2.6.7 hardened kernel I was using then, some were patches to files I didn't seem to have, some were rather easy to patch manually, and some were too difficult.

So if there are people who have tips for manually patching a kernel, please tell me!

By the way, are kernel patches cumulative? I think so, because if they were independent, it would be possible to add swsusp2 patches to the hardened gentoo patches.
_________________
Registered Linux user #368987
Back to top
View user's profile Send private message
anz
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 279
Location: Vienna

PostPosted: Thu Jun 09, 2005 2:38 pm    Post subject: !!!THANK YOU!!! Reply with quote

EASYdoor wrote:
has anyone figured out the suspend2+xorg 6.8.*+ati 8.10.19 ?!?!

Suspend-to-disk works with the latest ati-drivers and xorg 6.8.2 if you install vbetool, which is not currently in portage.
The ebuild attached to this bugreport works fine for me: https://bugs.gentoo.org/show_bug.cgi?id=82325
vbetool is used to save/restore the state of the videocard.

Don't forget to add/uncomment "EnableVbetool yes" in /etc/hibernate/hibernate.conf

I am using a 2.6.11 vanilla-flavor with swsusp2-patches, but i am going to try the morph-sources soon.

Enjoy,

Bobo


Thank you very much for your tip - my nx7010 works with the frglx and swsusp2 and vbetool without X-crashes ...
... and the vbetool is in the portage (masked) now!
_________________
Greetings from Vienna
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... , 12, 13, 14  Next
Page 13 of 14

 
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