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 ... 8, 9, 10 ... 12, 13, 14  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
hyp0r
Tux's lil' helper
Tux's lil' helper


Joined: 11 Oct 2003
Posts: 139

PostPosted: Wed Sep 29, 2004 4:54 pm    Post subject: Reply with quote

@Cheesepie
I gave the X.Org-Drivers a try and hibernating works perfectly with those. I'm limited to "working" only, but that's ok for now.
Back to top
View user's profile Send private message
Cheesepie
Apprentice
Apprentice


Joined: 19 Jan 2004
Posts: 154

PostPosted: Wed Sep 29, 2004 8:12 pm    Post subject: Reply with quote

hyp0r wrote:
@Cheesepie
I gave the X.Org-Drivers a try and hibernating works perfectly with those. I'm limited to "working" only, but that's ok for now.


you might wanna think about using the "radeon" drivers instead (if you have a radeon card). They dont support 3d accel whatsoever, but I'm fairly certain they make use of 2d acceleration, or something.
Back to top
View user's profile Send private message
hyp0r
Tux's lil' helper
Tux's lil' helper


Joined: 11 Oct 2003
Posts: 139

PostPosted: Thu Sep 30, 2004 10:30 am    Post subject: Reply with quote

Cheesepie wrote:
hyp0r wrote:
@Cheesepie
I gave the X.Org-Drivers a try and hibernating works perfectly with those. I'm limited to "working" only, but that's ok for now.


you might wanna think about using the "radeon" drivers instead (if you have a radeon card). They dont support 3d accel whatsoever, but I'm fairly certain they make use of 2d acceleration, or something.

Yes, I'm using the Radeon-Drivers. I thought that was clear. :-)
But my experimentes took a strange course.
I had my touchpad with evdev and psmouse compiled as modules and the first tries worked. After updating to X.Org 6.80 I had some erratic issues, which rendered my touchpad completely unuseable. The mousepointer was going nuts while moving.
After switching back to 6.70 and still encountering this issue, I found out, that unloading psmouse and reloading after resuming completely forgets my synaptics-settings. The mousepointer is moving damn slowly.
Now I have compiled evdev and psmouse statically into the kernel and the touchpad is working fine after resuming.

Is this known or have I missed essential settings?
Back to top
View user's profile Send private message
rodericj
Tux's lil' helper
Tux's lil' helper


Joined: 08 Mar 2004
Posts: 97
Location: Rockville, MD

PostPosted: Thu Sep 30, 2004 5:43 pm    Post subject: Reply with quote

Not doing so good.

The original tutorial states:

Code:

cd /usr/src/linux/2.x.x
cat /tmp/swsusp/software-suspend-2.0.0.xx-for-2.x.x/20xxxxxxx | patch -p1
cat /tmp/swsusp/software-suspend-2.0.0.xx-for-2.x.x/21xxxxxxx | patch -p1
// ...and so on...


First of all: I don't have a /usr/src/linux/2.x.x
Which directory do I go into here?

Second: Now it asks for the file I wish to patch. Nobody has said anything about passing in the file name as an argument so I am assuming that I know nothing about patching.

What is the secret here?

(I am way behind)
Back to top
View user's profile Send private message
desertstalker
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 209

PostPosted: Sat Oct 02, 2004 4:16 am    Post subject: Reply with quote

has anyone got swsup2 working with fbsplash (gensplash) I have changed the occurances of /proc/splash in /usr/local/share/hibernate/scriptlets.d/bootsplash to /proc/splash.

Is there anything else I need to do?

EDIT: I dont believe it is compatible. Does anyone know if I can do it?
Back to top
View user's profile Send private message
yamakawa
Guru
Guru


Joined: 28 Jul 2003
Posts: 340

PostPosted: Sat Oct 02, 2004 5:43 pm    Post subject: Reply with quote

Me! :D
swsusp2 is working fine with fbsplash after changed from bootsplash.
i've tried 2.0.0.100,2.0.0.105,2.0.0.107,2.0.0.109 so far and am trying 2.1-rc1 from now...
Back to top
View user's profile Send private message
desertstalker
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 209

PostPosted: Sun Oct 03, 2004 1:46 am    Post subject: Reply with quote

Did you have to cange anything? the defaullt script (when I enables bootsplash support in /etc/hibernate/hibernate.conf) complaied about not being able to find /proc/splash and when I canged it to /proc/fbsplash I still get nothing.
Back to top
View user's profile Send private message
yamakawa
Guru
Guru


Joined: 28 Jul 2003
Posts: 340

PostPosted: Sun Oct 03, 2004 4:07 pm    Post subject: Reply with quote

as for a script, i use 0.98 now. basically i keep the setting from older ones.
Back to top
View user's profile Send private message
tuxlover
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 297
Location: weltweit

PostPosted: Thu Oct 07, 2004 9:14 am    Post subject: Reply with quote

rodericj wrote:
Not doing so good.

The original tutorial states:

Code:

cd /usr/src/linux/2.x.x
cat /tmp/swsusp/software-suspend-2.0.0.xx-for-2.x.x/20xxxxxxx | patch -p1
cat /tmp/swsusp/software-suspend-2.0.0.xx-for-2.x.x/21xxxxxxx | patch -p1
// ...and so on...


First of all: I don't have a /usr/src/linux/2.x.x
Which directory do I go into here?

You need to install the kernel sources you want to patch, first.
Code:
emerge <input-your-favorite-kernel-sources-name-here>

Then you will have a directory /usr/src/linux-<version> (there is a typo in my tutorial, sorry) which contains the kernel source files. These can be patched, then you can compile the kernel and install it. Choose your kernel from http://www.gentoo.org/doc/en/gentoo-kernel.xml
Quote:

Second: Now it asks for the file I wish to patch. Nobody has said anything about passing in the file name as an argument so I am assuming that I know nothing about patching.

Usually, the patch file (the file containing the patch(es)) will contain all the necessary information about which file to patch. So all you need to do is make sure that you're starting the patching in the right path/directory.
Quote:
(I am way behind)

Don't worry, we all were beginners once :)
Back to top
View user's profile Send private message
tuxlover
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 297
Location: weltweit

PostPosted: Thu Oct 07, 2004 9:26 am    Post subject: Re: Which swap partition? Reply with quote

Root Moose wrote:
:?: Which swap partition does swsusp2 need?

Your normal swap partition. swsusp2 doesn't yet support suspending to any other partition, as far as I know.
Quote:
:?: The machine I want to set this up on does not have any swap partition configured in fstab and before I start juggling the exisiting filesystems I wanted to know if it would be adequate to create a MEM+50% (758MB in this case) swap parittion for swsusp2 that was not referenced in the fstab. Does it need to be referenced in the fstab and mounted or can I swapon/swapoff the swap manually somewhere in the swsusp2 configuration? Can swsusp2 write directly to /dev/hd[whatever] without issuing a swapon?

Besides suspending to your normal swap partition (the one that is in use in your system), you can also suspend to a file (like on windows), which is not recommended. I can't check the technical info right now since berlios is offline, so I'm not 100% sure about this.

Quote:
:?: I'm kinda tight for space - embedded device running on a laptop drive - given that I don't use swap for my running OS can I get away with a smaller swap for suspend? I need at least 512 (RAM) + 1 MB for hibernate to work...even with LZF turned on right?

The swsusp2 documentation says that you need at least 30% more space in your swap than you have RAM.
Back to top
View user's profile Send private message
mrv
Tux's lil' helper
Tux's lil' helper


Joined: 29 Mar 2004
Posts: 114
Location: Oulu, Finland

PostPosted: Fri Oct 08, 2004 9:26 am    Post subject: Reply with quote

Hi,

Is there a patch (and ebuild) available for nvidia 1.0.611 yet?

swsusp2 works fine when X is not running, but with X the nvidia driver locks up the machine during resume.

-mrv-
Back to top
View user's profile Send private message
Bepcyc
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2004
Posts: 130
Location: Moscow, Russia

PostPosted: Fri Oct 08, 2004 7:04 pm    Post subject: Reply with quote

The same thing but with radeon
After awakening my screen is white and I have a big square instead of mouse cursor
All I can do is moving this square and halting the machine...

I need suspending..
Who can help?

I use 2.6.8.1-klak5 kernel with X.org radeon drivers, X.org is 6.8.0
Does anybody had success with nearly the same configuration?
Back to top
View user's profile Send private message
snappy173
n00b
n00b


Joined: 09 Sep 2004
Posts: 9

PostPosted: Sun Oct 10, 2004 1:42 am    Post subject: uaccess.h Reply with quote

SeeksTheMoon wrote:
so what can I do to get this thing compiled?

I had the same problem (I'm using mm-sources 2.6.9_rc2-r4). It seems that get_fs and set_fs are implemented in asm/uaccess.h, so I added #include <asm/uaccess.h> to suspend.c and it compiled.

I also had to add #include <linux/irq.h> to arch/i386/power/suspend2.c

I'm about to restart and test it ...
Back to top
View user's profile Send private message
berarul
Tux's lil' helper
Tux's lil' helper


Joined: 12 Apr 2004
Posts: 75
Location: Bucuresti

PostPosted: Mon Oct 11, 2004 9:56 am    Post subject: Re: uaccess.h Reply with quote

snappy173 wrote:
SeeksTheMoon wrote:
so what can I do to get this thing compiled?

I had the same problem (I'm using mm-sources 2.6.9_rc2-r4). It seems that get_fs and set_fs are implemented in asm/uaccess.h, so I added #include <asm/uaccess.h> to suspend.c and it compiled.

I also had to add #include <linux/irq.h> to arch/i386/power/suspend2.c

I'm about to restart and test it ...


While trying to compile gentoo-dev-sources-2.6.8-r7 I also needed to patch drivers/char/keyboard.c and add #include <linux/suspend.h>. Also I applied all the patches not just the 2 and 3 series.
_________________
You need to stand up to your mother, smack her in the face and say "That's enough of your shit, you fucking bitch!"
Back to top
View user's profile Send private message
berarul
Tux's lil' helper
Tux's lil' helper


Joined: 12 Apr 2004
Posts: 75
Location: Bucuresti

PostPosted: Mon Oct 11, 2004 10:31 am    Post subject: Reply with quote

yamakawa wrote:
as for a script, i use 0.98 now. basically i keep the setting from older ones.


Could you post your config file for hibernate & gensplash, your kernel params?
_________________
You need to stand up to your mother, smack her in the face and say "That's enough of your shit, you fucking bitch!"
Back to top
View user's profile Send private message
rodericj
Tux's lil' helper
Tux's lil' helper


Joined: 08 Mar 2004
Posts: 97
Location: Rockville, MD

PostPosted: Wed Oct 13, 2004 1:29 am    Post subject: Reply with quote

Ok. I am getting closer.

I got the patch working (at least parts of it).
I am running 2.6.8r3 on a celeron 500

Fine..
in the software suspend patches director(/tmp/swsusp/soft...mm1), I only came up with these files

Code:

10-kdb-common
10-kdb-v4.4-2.6.7-i386-1
20-software...mm1-rev4-whole
30-soft...core-2.0.0.103-whole
apply
unapply


K so I patched the 20 and 30...I did not patch the 10 things.

Question 1: Should I have patched the 10's?

So moving on. I config'ed the kernel to have all the stuff that the tutorial said to have.

Code:

make && make modules_install
CHK ...
CHK ...
CHK ...
CC    init/do_mounts.o
init/do_mounts.c: In function 'prepare_namespace':
init/do_mounts.c:425: error: 'software_suspend_state' undeclared (first use...)
...
...
...                     426:  error 'SUSPEND_RESUME_DONE' undeclared (first ...)
init/do_mounts.c:426: warning: implicit declaration of function 'software_suspend_try_resume'
make[1]: *** [init/do_mounts.o] Error 1
make *** [init] Error 2


Question 2: (obviously) What did I do wrong? Did I not get all of the patches?

Help por favor!!!
Back to top
View user's profile Send private message
berarul
Tux's lil' helper
Tux's lil' helper


Joined: 12 Apr 2004
Posts: 75
Location: Bucuresti

PostPosted: Wed Oct 13, 2004 7:12 am    Post subject: Reply with quote

rodericj wrote:


Code:

make && make modules_install
CHK ...
CHK ...
CHK ...
CC    init/do_mounts.o
init/do_mounts.c: In function 'prepare_namespace':
init/do_mounts.c:425: error: 'software_suspend_state' undeclared (first use...)
...
...
...                     426:  error 'SUSPEND_RESUME_DONE' undeclared (first ...)
init/do_mounts.c:426: warning: implicit declaration of function 'software_suspend_try_resume'
make[1]: *** [init/do_mounts.o] Error 1
make *** [init] Error 2


Question 2: (obviously) What did I do wrong? Did I not get all of the patches?

Help por favor!!!


most likely you need to add
Code:

#include <linux/suspend.h>

in /usr/src/linux/init/do_mounts.c

You will probably get theese kind of error messages again so to find out where a function/constant is declared do
Code:

thor adi # cd /usr/src/linux
thor linux # find -iname '*.h' | xargs grep software_suspend_state
./include/linux/suspend.h:extern unsigned long software_suspend_state;
./include/linux/suspend.h:      (test_bit(bit, &software_suspend_state))
./include/linux/suspend.h:      (clear_bit(bit, &software_suspend_state))
./include/linux/suspend.h:      (set_bit(bit, &software_suspend_state))
./include/linux/suspend.h:#define get_suspend_state()           (software_suspend_state)
./include/linux/suspend.h:      do { software_suspend_state = saved_state; } while(0)
./include/linux/suspend.h:#define software_suspend_state                (0)

this tells me that software_suspend_state is *declared* in /usr/src/linux/include/linux/suspend.h and, by looking at other includes (with <> not with "") if you don't have any C experience, you can see that you need to specify only <linux/suspend.h> . Then I just go to the offending .c source and add it, usually at the end of the includes.
========
EDIT: *declared* was located
_________________
You need to stand up to your mother, smack her in the face and say "That's enough of your shit, you fucking bitch!"
Back to top
View user's profile Send private message
rodericj
Tux's lil' helper
Tux's lil' helper


Joined: 08 Mar 2004
Posts: 97
Location: Rockville, MD

PostPosted: Thu Oct 14, 2004 1:10 am    Post subject: Reply with quote

berarul. Thanks for your help.
Its a start. But I am doing terrible. I found that the const was declared in a something.rej file. I guess this means that the patch didn't work.

Dernit.

I am going to see if I can start over with the patching. Is that possible?

Do I need to re-emerge the sources and stuff again? Got any experience with this?
Back to top
View user's profile Send private message
berarul
Tux's lil' helper
Tux's lil' helper


Joined: 12 Apr 2004
Posts: 75
Location: Bucuresti

PostPosted: Thu Oct 14, 2004 9:40 am    Post subject: Reply with quote

try to apply all patches
_________________
You need to stand up to your mother, smack her in the face and say "That's enough of your shit, you fucking bitch!"
Back to top
View user's profile Send private message
afftas
n00b
n00b


Joined: 14 Apr 2003
Posts: 16

PostPosted: Tue Oct 19, 2004 3:58 pm    Post subject: Reply with quote

I patched, compiled and installed a 2.6.8-gentoo-r10 kernel. I can suspend, but I can't have bootsplash (no progress bar, no console image...)

Is there anything I can do?

--- edited ---
I emerged development-sources-2.6.8.1, patched it nicely, compiled and installed it. Now everything seems fine ;-)


Last edited by afftas on Wed Oct 20, 2004 12:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
Halanegri
Guru
Guru


Joined: 03 Mar 2003
Posts: 351
Location: Reykjavík, Iceland

PostPosted: Wed Oct 20, 2004 5:41 am    Post subject: Reply with quote

hyp0r wrote:
Seems like swsusp works fine for most of you. Can it be considered as "quite" stable (therefore I quoted the "quite" :-) )?.
What happens while rebooting with the resume2-parameter being passed to kernel after shutting down normally and not hibernating?
Will you need "two" profiles for booting or is the last hibernate-image detected just like under Windows?

Edit: I've taken the risk and tried it.. Seems like it invalidates the old image after loading it once. So fine so good. But resuming fails. System hangs.
I suspect the IPW2200-Driver or my ati-driver (fglrx).

I have a DELL Inspiron 8600c. Has anyone got it running with the same Notebook?


I have a Dell Inspiron 8600c and I'm currently testing swsusp2. Right now I have vanilla 2.6.9 with the swsusp-2.1 patch applied, and it doesn't freeze at all, but note that I use the "radeon" driver included in xorg, not fglrx(maybe I'll try it when ATi releases a version that works with xorg 6.8.0).

There is one problem though. If I have X open when suspending, all sorts of garbage will show up on the monitor when I resume and make the computer unusable, I can't even switch from X to console, and CTRL+ALT+BACKSPACE doesn't work. So I must have it focused on a console when I suspend(X can still be running in the background).

Also, I had to remerge ipw2200(after having patched the kernel), or else eth1 wouldn't show up in `iwconfig`.

I didn't have these problems when using swsusp1, but swsusp2 has the advantage that the suspend/resume process is quicker. So, I recommend you stick to the regular swsusp for now(no patching needed), at least that works.
Back to top
View user's profile Send private message
PranksterO
n00b
n00b


Joined: 25 Sep 2003
Posts: 27

PostPosted: Wed Oct 20, 2004 7:46 pm    Post subject: Reply with quote

Im running a 2.6.8.1 kernel. Ive applied the patches and compiled my kernel. Ive added the swap drive to my grub boot params but I get this message on boot:

Code:
Software Suspend 2.0.0.104: Checking for image...
===Software Suspend===

BIG FAR WARNING! Detected the signature of an alternate implementation

If you want to use the current syspend image reboot and try again with the same kernel that you suspended from. If you want to forget that image, continue and the image will be erased. Press space to reboot.


The only way I can get rid of this is to add noresume and noresume2 to my kernel boot params. But doing this gives me a message on boot that suspending is disabled. Whats going on here?
Back to top
View user's profile Send private message
tobimat80
Apprentice
Apprentice


Joined: 27 May 2003
Posts: 272
Location: Trier - Germany

PostPosted: Fri Oct 22, 2004 6:36 pm    Post subject: Reply with quote

Well ist works (untill now without X). But my laptop doesn't power down. It just reboots. ? Why?
_________________
Wer Rechtschreibfehler findet, darf sie behalten und auf DVD brennen!
Back to top
View user's profile Send private message
DarwinianCoeus
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2003
Posts: 98
Location: Potsdam, NY

PostPosted: Fri Oct 22, 2004 9:35 pm    Post subject: Reply with quote

where should i start looking if i lockup during 'starting to save suspend image' or close to that effect
_________________
karma++;
Back to top
View user's profile Send private message
3nd3r
n00b
n00b


Joined: 25 Aug 2004
Posts: 38
Location: /dev/null

PostPosted: Sat Oct 23, 2004 11:11 pm    Post subject: Reply with quote

perhaps this patch should be put in the kernel by default :P
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 ... 8, 9, 10 ... 12, 13, 14  Next
Page 9 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