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 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 May 07, 2004 3:35 pm    Post subject: howto: get swsusp2 (hibernate, suspend to disk) working Reply with quote

Update:This HowTo is not up to date anymore. It has been updated and moved to the gentoo wiki: HOWTO Software Suspend v2 at the gentoo wiki

HowTo: Get swsusp2 working

I recently got swsusp2 (aka software suspend 2, aka hibernation, aka suspend to disk) working on my acer travelmate 800 (a centrino machine). It has been working flawlessly so far, which is very good, considering that I never got swsusp*1* to work completely on this machine. All this on a 2.6.5-gentoo-r1 kernel (currently: 2.6.7 vanilla).

Supposedly the swsusp*2* code works much better, so it might really be worth a try.

Note: This is work in progress, any ideas, corrections and/or ebuilds more than welcome!

Table of contents:
0. What is swsusp?
1. emerge gentoo-dev-sources
2. Download 3 patches and suspend-script from the swsusp homepage
3. Patch kernel
4. Configure kernel
5. Compile & install kernel, configure boot loader for swsusp2
6. Install suspend-script
7. Hibernate!
Appendix:
8. swsusp2 configuration
9. sudo - make users suspend, too
10. ACPI configuration - use your power button to suspend
11. Tips & Tricks
12. Links

0. What is swsusp?
Software suspend is a way to save power when your computer is not needed. Basically, it stores the contents of your RAM to your hard disk and then shuts your computer off. When you turn your machine back on, swsusp will re-read the contents of your RAM back into RAM. This process is usually much quicker than shutting your operating system off completely, and booting it again. You can leave your applications running and it doesn't consume any power at all.
swsusp saves the contents of your RAM to your swap partition, that's why as a rule of thumb, your swap partition should be at least 30% larger than your RAM.

1. emerge gentoo-dev-sources
I tried this with 2.6.5-gentoo-r1, if you use a different kernel, your results may vary.
Code:
emerge gentoo-dev-sources


2. download swsusp2 patch(es) and suspend-script
Go to swsusp2's download page, and download:

The suspend-script-x.xx.tar.gz *and*

~~~For kernelversion <= 2.4.25 and <= 2.6.2~~~
"Current Kernel Patches":
latest kernel specific one (apply first), *and*
software-suspend-core-2.0-whole.bz2

~~~For kernelversion >= 2.4.26 and >= 2.6.7:~~~
Download the one for your kernel ("Current Beta Patches").

3. Patch your kernel sources

~~~For kernelversion <= 2.4.25 and <= 2.6.2:~~~
Apply the downloaded patches in this order: Kernel specific one first, then the core-whole patch:
Code:
cd /usr/src/linux-2.6.5-gentoo-r1
bzcat software-suspend-linux-2.x.xx-whole.bz2 | patch -p1
bzcat software-suspend-core-2.0-whole.bz2 | patch -p1
One of the patches might not apply cleanly. You can either patch manually (it's just a few lines in drivers/char/keyboard.c) or replace that file with mine (only 2.6.5).

~~~For kernelversion >= 2.4.26 and >= 2.6.7:~~~
Download only one patch ("Current Beta Patches"), untar it:
Code:
cd /tmp/swsusp/
tar xjf software-suspend-2.0.0.xx-for-2.x.x.tar.bz2

This results in a number of files. You only need to use the 20- and 30-series patches. Apply them in order, starting with smaller numbers:
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...

Sometimes there can be several patches starting with 31 for example, in that case apply the one with the smaller revision number first (e.g., rev2 before rev3).

4. Configure your kernel
Go to your kernel dir, make menuconfig, and choose the following things:
Code:
Power management options (ACPI, APM)  --->
  Software Suspend 2  --->
    [*]    Swap Writer

Basically you can leave it like that, you can turn on anything else you want later.

As an extra option, you should consider turning on compression of the suspend RAM image:
Code:
[*]    LZF image compression

Some users report a faster suspend process, but this depends largely on the relation of your cpu and hard drive speeds, and the size of your (used) system memory.

5. Compile and install your kernel, configure boot loader for swsusp2; reboot with new kernel
swsusp stores the suspend data in your swap partition. When booting the kernel, you need to tell it where the partition is via a kernel option. So add this to your kernel parameters in lilo.conf or menu.lst (grub):
resume2=swap:/dev/hdx
and set this to your swap partition.
Hint: Should resuming not work for some reason, you have to add noresume2 (and maybe also noresume) to your kernel options when booting.

6. Install suspend-script
The script you downloaded needs to be extracted:
Code:
tar xvzf suspend-script-x.xx.tar.gz

and then installed:
Code:
# cd suspend-script-x.xx
# ./install.sh

This will make a file /usr/local/sbin/hibernate which when executed will suspend your machine. It will also make some script and config files in /etc/hibernate/.

7. Hibernate!
As root, execute /usr/local/sbin/hibernate to hibernate.
To minimize any risks resulting from unsuccessful resuming, try it first without X (from console), then with X, but without being logged in (otherwise you can easily kill your kde config and similar things). Maybe also umount mounts that aren't needed before suspending for the first time.

Appendix:

8. swsusp2 configuration
In /etc/hibernate/hibernate.conf, there are some things you should configure.
USB: as of 2.6.5, the usb modules do not support swsusp. That's why you should simply unload them before suspending, and reload them after resuming.
This can easily be automated by simply telling swsusp to restart the hotplug service:
Code:
RestartServices hotplug

Sound: the soundcard is often a problem. That's why you should consider restarting alsasound (if you use alsa) on resume and extend RestartServices:
Code:
RestartServices hotplug alsasound

Mounted hdd partitions:
If you partitions that you would like to access while your linux system has been swsusp'ed (like a windows partition), swsusp should umount them before, and mount them again after a suspend:
Code:
Unmount /mnt/c
OnResume 20 mount /mnt/c

Otherwise you will easily corrupt the data on that device!

Problematic modules:
In general it's good to compile things as modules when using swsusp because it allows you to unload/reload them. If you have problems with some modules (I had a problem with sd_mod, the scsi module responsible for my burner, which would not work after suspending), tell swsusp to unload and reload them:
Code:
UnloadModules sd_mod
LoadModules sd_mod


Since you're probably on Gentoo, you can also set
Code:
GentooModulesAutoload yes


9. sudo configuration - make users suspend, too
(Skip this and read on if you (want to) use acpid)
In order for your non-root user(s) to be able to swsusp, you can use sudo. First, install sudo:
Code:
emerge sudo

Then, use visudo to edit the /etc/sudoers file, and add an entry like this:
Code:
%wheel ALL=NOPASSWD: /usr/local/sbin/hibernate

This will allow the members of your wheel group to execute /usr/local/sbin/hibernate:
Code:
sudo /usr/local/sbin/hibernate
Having a special group "hibernate" would be nicer of course, you could then add all users to it.

If you use bootsplash, you should use visudo to add this to /etc/sudoers:
Code:
%wheel ALL = NOPASSWD: /sbin/splash


10. ACPI configuration - use your power button to suspend
First, configure your kernel with acpi. Then, install acpid, and add it to your default runlevel, to start it automatically:
Code:
emerge acpid

rc-update add acpid default

Then edit /etc/acpi/events/default to contain the lines (I don't remember if that's the default):
Code:
event=button.*
action=/etc/acpi/default.sh %e

which should pass all button events to /etc/acpi/default.sh, which you edit next:
Code:
#!/bin/sh
# Default acpi script that takes an entry for all actions

set $*

group=${1/\/*/}
action=${1/*\//}

case "$group" in
   button)
      case "$action" in
         power)  /usr/local/sbin/hibernate
            ;;
         *) logger "ACPI action $action is not defined"
            ;;
      esac
      ;;

   *)
      logger "ACPI group $group / action $action is not defined"
      ;;
esac

Then simply restart acpid:
Code:
/etc/init.d/acpid restart

Which should result in the hibernate script being called when you press the power butten. This allows you to skip sudo configuration as well, since acpid runs with root priviliges anyway.

11. Tips & Tricks
  • To make swsusp reboot rather than shut off, press "R" while suspending (this toggles it)
  • Change verbosity (console logging level) while suspending/resuming by pressing 0 and 1


12. Links


Last edited by tuxlover on Thu Nov 11, 2004 9:22 pm; edited 17 times in total
Back to top
View user's profile Send private message
hanzotutu
Apprentice
Apprentice


Joined: 10 Apr 2003
Posts: 170

PostPosted: Sun May 09, 2004 5:54 am    Post subject: Re: howto: get swsusp2 (hibernate, suspend to disk) working Reply with quote

tuxlover wrote:
HowTo: Get swsusp2 working
...
I read that you also need to take out "preemptible kernel", this can be found under "Processor type and features --->"
...


swsusp2 should have preemptible kernel support. I had no problem with preemptible kernel selected.
_________________
Dell D600, P-M 1.4G, 512M DDR, Radeon M9 32M
Back to top
View user's profile Send private message
|T5|
n00b
n00b


Joined: 13 Dec 2003
Posts: 33

PostPosted: Sun May 09, 2004 1:12 pm    Post subject: Reply with quote

hi,

i got my uhci problem solved, but now i experience endless trouble with the ati fglrx module. If this module is loaded, X.org crashes at resuming..,

Any solution?
Back to top
View user's profile Send private message
tuxlover
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 297
Location: weltweit

PostPosted: Sun May 09, 2004 7:30 pm    Post subject: Re: howto: get swsusp2 (hibernate, suspend to disk) working Reply with quote

hanzotutu wrote:
swsusp2 should have preemptible kernel support.

Thanks, I updated this!
|T5| wrote:
i experience endless trouble with the ati fglrx module

One idea would be to unload the module before suspending, and to reload it after resuming. If I got it right, simply make a script that handles this process:
Code:
#!/bin/sh
#load xfree opengl driver
opengl-update xfree
#suspend
/usr/local/sbin/hibernate
#on resume, load ati opengl driver
opengl-update ati

Should work, shouldn't it?
Back to top
View user's profile Send private message
|T5|
n00b
n00b


Joined: 13 Dec 2003
Posts: 33

PostPosted: Sun May 09, 2004 7:49 pm    Post subject: Reply with quote

No it doesn't, i think this is because fglrx is used for 2d graphics/X11 too. And as I'm using tvout, i really need that driver...
Back to top
View user's profile Send private message
Verteron
Apprentice
Apprentice


Joined: 23 Jul 2003
Posts: 189

PostPosted: Sat May 15, 2004 10:22 pm    Post subject: Reply with quote

Excellent, this works perfectly on my APM laptop.
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Germany

PostPosted: Sun May 16, 2004 3:51 pm    Post subject: Reply with quote

Very nice :)

Two minor annoyances left here: On resume, USB mouse is not working anymore (there'll be an easy workaround, probably module reloading) and reloading the battery module makes the kde laptop daemon think I'm running out of power and forcing a panic shutdown :wink:
Had to disable that feature.

I'm currently re-doing the suspend section in my ACPI howto (see sig) to include the swsusp2 support. I think I'll just put a link to your howto instead of writing another one.

What I'm missing right now is proper bootsplash support. I got it running somehow by adding
Code:

SWSUSP_START_PROGS_BEFORE_SUSPEND="/sbin/splash -s -u 0 /etc/bootsplash/livecd-2004.1/config/bootsplash-1024x768.cfg"
SWSUSP_START_PROGS_AFTER_RESUME="/sbin/splash -s -u 0"

to /etc/suspend.conf but there's no progress bar support yet.

Edit: Ok, got the USB mouse working by just re-inserting the USB modules, /etc/suspend.conf makes this very easy.

I think you should encourage people to activate
Code:
[*]    LZF image compression

which seems to be a speed improvement for most machines. The trick is to compress main memory before writing to disk and uncompress on resume, which results in a smaller amount of data to be written to/read from disk. The bigger main memory and the slower the disk, the greater will be the speed improvement.
_________________
KDE
Back to top
View user's profile Send private message
tuxlover
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 297
Location: weltweit

PostPosted: Sun May 16, 2004 5:02 pm    Post subject: Reply with quote

Thanks for the input, guys.

I updated the howto, and added two sections in the appendix (swsusp configuration and sudo configuration).

Earthwings wrote:
I think I'll just put a link to your howto instead of writing another one.
Great!
Earthwings wrote:
What I'm missing right now is proper bootsplash support.
I don't use a bootsplash, so I can't really comment on that. Maybe I will start playing around with it.
Earthwings wrote:
Edit: Ok, got the USB mouse working by just re-inserting the USB modules, /etc/suspend.conf makes this very easy.
[...]
I think you should encourage people to activate
Code:
[*]    LZF image compression
I added both, even though I couldn't find any benchmarks on speed improvemenst from compression. Maybe I will test this myself.
Back to top
View user's profile Send private message
pakman
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jan 2004
Posts: 100

PostPosted: Sun May 16, 2004 8:05 pm    Post subject: Reply with quote

Nice one tuxlover :)

I've been trying allsorts to get suspend working with 2.6 and now it all works fairly well, even with X running.

I had problems with the ati_agp module not behaving properly (X wouldnt start after resume) so after reading this page that has patches for intel-agp and via-agp:
http://cpbotha.net/dri_resume.html
I bodged this up:
http://unixhead.org/docs/thinkpad/ati-agp/

that adds the required methods to ati_agp to make it suspend and resume.


Last edited by pakman on Mon May 17, 2004 10:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Germany

PostPosted: Mon May 17, 2004 8:30 am    Post subject: Reply with quote

Just some more additions:
Another nice feature is the reboot selection, just press "R" during suspend to have it rebootet instead of power off. This can also be made default in /etc/suspend.conf. Furthermore you can cancel a running suspend by pressing "Esc".

I elimininated the need for sudo by editing /etc/acpi/default.sh as following (emerge acpid if you don't have it yet):
Code:

#!/bin/sh

set $*

group=${1/\/*/}
action=${1/*\//}

case "$group" in
        button)
                case "$action" in
                        sleep)      /sbin/hibernate
                                    ;;
                        *)          logger "ACPI group button / action $action not defined"
                                    ;;
                esac
                ;;
        *)
                logger "ACPI group $group / action $action is not defined"
                ;;
esac

Now my laptop hibernates when pressing the "Sleep" button.

There should however be a password prompt during reboot, the current way is too insecure (no password prompt at all). I don't think there is support for this yet, or did I overlook it?
Back to top
View user's profile Send private message
altorus
Tux's lil' helper
Tux's lil' helper


Joined: 17 Aug 2003
Posts: 89
Location: Melbourne, Australia

PostPosted: Mon May 17, 2004 11:51 am    Post subject: Reply with quote

Sage word of advice: if you link this to a acpi lid switch event, close the lid and leave it bloody closed, don't open it to check it is suspending.

I did this a few times and it created a stream of lid events in /proc/acpi/events, i'm lazy i'll just yank this from my chat log:

<altorus> i got software suspend 2 working - you think i'd stop there? of course not i link it to a lid switch acpi event, this event got triggered like 6 times as i closed lid, wondered why the blank it was taking so long, opened lid, saw it was supsending closed lid - it just generated a blanking stream of lid events
<altorus> now all it does is turn on and suspend again, i got to a diff kernel, turned the blank off, but all the shutting and susping borked a lot of module configs. silly me thought the regernerated when you deleted them - now it doens't boot on any kernel :|
<altorus> i wonder again why i use gentoo, you tweak it so much that eventually it breaks

Nobody's fault but my own, just be very careful what acpi event you link it too. Very cery careful

In case you were wondering:

/proc/acpi/events/lidswitch

event=button[ /]lid
command=/etc/acpi/lid.sh

/proc/acpi/lid.sh
/usr/sbin/local/hibernate

This could be a little rusty, going from memory here. I'd recommend mapping it to something more sane like button[ /]power

This is of course done with kernel acpi modules for button and lid

And emerge acpid
Back to top
View user's profile Send private message
tuxlover
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 297
Location: weltweit

PostPosted: Mon May 17, 2004 2:12 pm    Post subject: Reply with quote

[edited]
I updated the howto... hibernate by pressing power.
Earthwings wrote:
I elimininated the need for sudo by editing /etc/acpi/default.sh as following (emerge acpid if you don't have it yet): [...]

This is good, too, but I followed altorus' advice and configured the power button to hibernate.
For me it is, too, still reassuring to see that it's correctly hibernating...
Earthwings wrote:

[...] password prompt during reboot, the current way is too insecure [...]

I didn't find an option for it in suspend.conf. One idea I had was to simply call some screen locker like xlock before suspending. Simply emerge xlockmore, then you can just call xlock before suspending via SWSUSP_START_PROGS_BEFORE_SUSPEND="xlock" in /etc/suspend.conf. The only problem is that it's started by root like this.
I couldn't get this to work using "su - username -c xlock", so I simply made a script /usr/bin/su_xlock.sh:
Code:
#!/bin/bash
su - username -c xlock

(substitute username with the name of the user you use)
and set swsusp to execute it before suspending in /etc/suspend.conf:
SWSUSP_START_PROGS_BEFORE_SUSPEND="/usr/bin/su_xlock.sh"
This defeats part of the idea of a multi user os, so does anybody have a better idea (like consulting "users")?
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Germany

PostPosted: Mon May 17, 2004 4:07 pm    Post subject: Reply with quote

tuxlover wrote:

Earthwings wrote:

[...] password prompt during reboot, the current way is too insecure [...]

I didn't find an option for it in suspend.conf. One idea I had was to simply call some screen locker like xlock before suspending. Simply emerge xlockmore, then you can just call xlock before suspending via SWSUSP_START_PROGS_BEFORE_SUSPEND="xlock" in /etc/suspend.conf. The only problem is that it's started by root like this.
I couldn't get this to work using "su - username -c xlock", so I simply made a script /usr/bin/su_xlock.sh:
Code:
#!/bin/bash
su - username -c xlock

(substitute username with the name of the user you use)
and set swsusp to execute it before suspending in /etc/suspend.conf:
SWSUSP_START_PROGS_BEFORE_SUSPEND="/usr/bin/su_xlock.sh"
This defeats part of the idea of a multi user os, so does anybody have a better idea (like consulting "users")?

I thought of the screensaver possibility, too, but another problem is that it doesn't respect the other ttys. What would be perfect IMHO is to have the suspend code log which user issued the hibernate and ask on resuming for his password or the root password before resume is finished. That catches every possibility and can be handled at a central place in the hibernate script. Hopefully.
Back to top
View user's profile Send private message
altorus
Tux's lil' helper
Tux's lil' helper


Joined: 17 Aug 2003
Posts: 89
Location: Melbourne, Australia

PostPosted: Tue May 18, 2004 3:56 am    Post subject: Reply with quote

tuxlover: glad it helped, just learn from my mistake and only do it to a button, not a switch. I've had a very bad 10 days with gentoo, my herd has been releases to one solitary gentoo machine.

That problem with the laptop was the final straw, it was my fault, but its back ton windows XP for the lappy it is :|

Still softsuspend2 was very nice for the 30 minutes or so before i broke my system
Back to top
View user's profile Send private message
lorenzo saint dupois
n00b
n00b


Joined: 11 Apr 2004
Posts: 12

PostPosted: Wed May 19, 2004 1:59 am    Post subject: bootloader? Reply with quote

wow this looks awesome, but do you add a seperate listing in your bootloader or append the new code to the current listing for the linux install?
Back to top
View user's profile Send private message
bfkeats
Apprentice
Apprentice


Joined: 20 Feb 2004
Posts: 268

PostPosted: Wed May 19, 2004 5:57 pm    Post subject: Reply with quote

When I hibernate, it immediately resumes. Here is the verbose output. Is this caused by the problems unloading modules?

Code:

# /usr/local/sbin/hibernate --verbose
which: no usleep in (/opt/adabas/bin:/opt/adabas/pgm:/bin:/sbin:/usr/bin:/usr/sbin:
/usr/local/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3:/usr/X11R6/bin:
/opt/blackdown-jre-1.4.1/bin:/usr/qt/3/bin:/usr/kde/3.2/sbin:/usr/kde/3.2/bin:
/sbin:/usr/sbin:/usr/local/sbin)
/bin/fgconsole
Preparing to suspend (suspend script vers. 0.18)...
Running suspend programs... (suspend script vers. 0.18)...
Stopping services...




Killing progs...
Unmounting devices...
Stopping interfaces...
Bringing eth0 down...
 * Bringing eth0 down
 *   Releasing DHCP lease for eth0...                                     [ ok ]
 *   Stopping eth0...                                                     [ ok ]
 * ERROR:  wrong args. (  eth0 / eth0 )

 * Usage: net.eth0 { start|stop|restart }
 *        net.eth0 without arguments for full help
Unloading modules...
driverloader 153860 0 - Live 0xdc9f9000
ohci_hcd 16900 0 - Live 0xdc9a8000
ds 14148 2 - Live 0xdc9c8000
pcmcia_core 55428 1 ds, Live 0xdc9b9000
evdev 8256 1 - Live 0xdc8f8000
snd_ali5451 20868 2 - Live 0xdc8eb000
 * Removing driverloader
 * Removing ohci_hcd
modules failed to unload:
ds 14148 2 - Live 0xdc9c8000
pcmcia_core 55428 1 ds, Live 0xdc9b9000
evdev 8256 1 - Live 0xdc8f8000
snd_ali5451 20868 2 - Live 0xdc8eb000

Suspension system call in progress...

Resuming (suspend script vers. 0.18)...
 * Restoring clock...
hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
hwclock from util-linux-2.12
Using direct I/O instructions to ISA clock.
Last drift adjustment done at 1084930753 seconds after 1969
Last calibration done at 1084930753 seconds after 1969
Hardware clock is on local time
Assuming hardware clock is kept in local time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2004/05/19 02:10:57
Hw clock time : 2004/05/19 02:10:57 = 1084932657 seconds since 1969
Calling settimeofday:
        tv.tv_sec = 1084932657, tv.tv_usec = 0
        tz.tz_minuteswest = 0
Reload modules...
Loading modules listed /etc/modules.autoload.d/kernel-2.6
 * Loading snd-ali5451...
 * Loading ohci-hcd...
 * Loading evdev...
Starting interfaces...
 * Bringing up eth0...
 * Bringing eth0 up via DHCP...                                           [ ok ]
 *   eth0 received address 129.97.120.116
 * ERROR:  wrong args. (  eth0 / eth0 )

 * Usage: net.eth0 { start|stop|restart }
 *        net.eth0 without arguments for full help
Remounting devices...
Restarting progs...
Restarting services...





Welcome back! Suspend done.



Any insight?
Back to top
View user's profile Send private message
bfkeats
Apprentice
Apprentice


Joined: 20 Feb 2004
Posts: 268

PostPosted: Thu May 20, 2004 6:28 pm    Post subject: Reply with quote

OK, I had forgotten to format my swap. (mkswap /dev/hdaX). I found it by doing a grep suspend /var/log/messages

Whoops.
Back to top
View user's profile Send private message
Kesereti
Guru
Guru


Joined: 07 Nov 2002
Posts: 520

PostPosted: Thu May 20, 2004 9:28 pm    Post subject: Reply with quote

OK, wait, I'm confused a bit ... is there a patch for kernel 2.6.6? What files do I need to download for swsusp2 on 2.6.6? There appears to be a file for 2.6.6, but the file size is MUCH larger and the naming convention is different than for the 2.6.5-test kernels mentioned in this thread...
Back to top
View user's profile Send private message
jewps
n00b
n00b


Joined: 29 Mar 2004
Posts: 74

PostPosted: Fri May 21, 2004 1:22 am    Post subject: Reply with quote

there is a patch for 2.6.6 but i'm not even sure how to/what to patch.

software-suspend-2.0.0.78-for-2.6.6.tar.bz2

cant seem to figure it out either :(
Back to top
View user's profile Send private message
zmedico
Developer
Developer


Joined: 02 Jan 2004
Posts: 352
Location: California USA

PostPosted: Sun May 23, 2004 5:30 am    Post subject: software-suspend-2.0.0.78-for-2.6.6.tar.bz2 Reply with quote

You have to do untar it and do something like this:
Code:
for NAME in ../current-2.6-patches/*; do patch -p1 -b < $NAME; done


It's explained in the swsusp-devel mailing list here:

http://marc.theaimsgroup.com/?l=swsusp-devel&m=108436936003411&w=2
_________________
Zac
Back to top
View user's profile Send private message
jewps
n00b
n00b


Joined: 29 Mar 2004
Posts: 74

PostPosted: Sun May 23, 2004 8:35 pm    Post subject: Re: software-suspend-2.0.0.78-for-2.6.6.tar.bz2 Reply with quote

zmedico wrote:
You have to do untar it and do something like this:
Code:
for NAME in ../current-2.6-patches/*; do patch -p1 -b < $NAME; done


It's explained in the swsusp-devel mailing list here:

http://marc.theaimsgroup.com/?l=swsusp-devel&m=108436936003411&w=2


oh great that works! it works if you apply it to a vanilla 2.6.6 source, doesn't work with the love sources tho :(

on a side note, you need to patch the patched kernel with another patch before it compiles, there seems to be a white space error

http://marc.theaimsgroup.com/?l=swsusp-devel&m=108499910718237&w=2

instructions: cat patchname.diff | patch -p1 in root of kernel source..
Back to top
View user's profile Send private message
tracyde
n00b
n00b


Joined: 18 Feb 2004
Posts: 27

PostPosted: Mon May 24, 2004 6:43 pm    Post subject: MM-Sources Reply with quote

Has anybody gotten this to work with mm-sources either 2.6.5 or 2.6.6 ?
I have tried to patch both manually to no evail. I know that mm-sources has some sort of software suspend patch but not sure which one, could someone explain to me how to unpatch the software suspend so I can re-patch it.

Thanks in advance.
_________________
----------------------------------------------------
-- D --
----------------------------------------------------
Back to top
View user's profile Send private message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Mon May 24, 2004 9:52 pm    Post subject: Reply with quote

Good work :wink:

Suspend works for me now but I've some problems with my audio card, after suspend audio doesn't work (audio card is recognize by the applications but no sound at all)

The problem persists after alsasound restart too.

Any ideas?
_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Back to top
View user's profile Send private message
nx12
Apprentice
Apprentice


Joined: 14 Jan 2004
Posts: 193

PostPosted: Mon May 24, 2004 11:35 pm    Post subject: Reply with quote

You tried to play with swsusp config files? I mean to stop alsasound service before and start after suspend? What errors you get?
_________________
signature sucks
Back to top
View user's profile Send private message
zmedico
Developer
Developer


Joined: 02 Jan 2004
Posts: 352
Location: California USA

PostPosted: Tue May 25, 2004 2:09 am    Post subject: Reply with quote

It sounds like a good idea stop the service. Also, are your sound card drivers compiled as modules? Unload the modules before suspend and then reload them afterwards. That's what's recommended:

Quote:
You may have hardware that does not support power management events sufficiently well (or at all). In this case, the best option (if possible) is to compile the drivers for the hardware as modules and unload them before suspend. This works best in the case of nVidia graphics cards, sound cards, USB drivers, PCMCIA, network drivers, etc.

_________________
Zac
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 1, 2, 3 ... 12, 13, 14  Next
Page 1 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