# howto: get swsusp2 (hibernate, suspend to disk) working

## tuxlover

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.

```
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:

```
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:

```
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:

```
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:

```
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:

```
[*]    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:

```
tar xvzf suspend-script-x.xx.tar.gz
```

and then installed:

```
# 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:

```
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:

```
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:

```
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:

```
UnloadModules sd_mod

LoadModules sd_mod
```

Since you're probably on Gentoo, you can also set

```
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:

```
emerge sudo
```

Then, use visudo to edit the /etc/sudoers file, and add an entry like this:

```
%wheel ALL=NOPASSWD: /usr/local/sbin/hibernate
```

This will allow the members of your wheel group to execute /usr/local/sbin/hibernate:

```
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:

```
%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:

```
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):

```
event=button.*

action=/etc/acpi/default.sh %e
```

which should pass all button events to /etc/acpi/default.sh, which you edit next:

```
#!/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:

```
/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

swsusp homepage

howto: swsusp with nvidia drivers

trouble patching (gentoo) kernel with swsusp2

gentoo powermanagement howto

Last edited by tuxlover on Thu Nov 11, 2004 9:22 pm; edited 17 times in total

----------

## hanzotutu

 *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.

----------

## |T5|

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?

----------

## tuxlover

 *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:

```
#!/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?

----------

## |T5|

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...

----------

## Verteron

Excellent, this works perfectly on my APM laptop.

----------

## Earthwings

Very nice   :Smile: 

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

```

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 

```
[*]    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.

----------

## tuxlover

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 
> ...

  I added both, even though I couldn't find any benchmarks on speed improvemenst from compression. Maybe I will test this myself.

----------

## pakman

Nice one tuxlover  :Smile: 

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

----------

## Earthwings

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):

```

#!/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?

----------

## altorus

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  :Neutral: 

<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

----------

## tuxlover

[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:

```
#!/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")?

----------

## Earthwings

 *tuxlover wrote:*   

> 
> 
>  *Earthwings wrote:*   
> 
> [...] password prompt during reboot, the current way is too insecure [...] 
> ...

 

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.

----------

## altorus

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  :Neutral: 

Still softsuspend2 was very nice for the 30 minutes or so before i broke my system

----------

## lorenzo saint dupois

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?

----------

## bfkeats

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

```

# /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?

----------

## bfkeats

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

Whoops.

----------

## Kesereti

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...

----------

## jewps

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  :Sad: 

----------

## zmedico

You have to do untar it and do something like this:

```
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

----------

## jewps

 *zmedico wrote:*   

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

 

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  :Sad: 

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..

----------

## tracyde

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.

----------

## mrfree

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?

----------

## nx12

You tried to play with swsusp config files? I mean to stop alsasound service before and start after suspend? What errors you get?

----------

## zmedico

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.

 

----------

## pakman

mrfree I have to unload the alsa modules to get mine to suspend cleanly. The "fuser" program is helpful for finding out which processes are using alsa as these will stop the modules unloading. If you have swsusp stopping alsa you could do launch it from a script something like:

```
#!/bin/sh

#suspend.sh

#kill all processes using alsa

fuser -k /dev/sound/dsp /dev/mixer

/usr/local/sbin/hibernate

#restore volume settings

alsactl restore
```

Last edited by pakman on Tue May 25, 2004 8:50 pm; edited 1 time in total

----------

## sveini

 *bfkeats wrote:*   

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

 

I got the same problem, I formated the swapdrive, no luck  :Sad: 

----------

## percking

My hibernation process also resumes immediatly after starting.  I do have the following in my logs though:

```
May 25 18:34:56 [kernel] Software Suspend 2.0.0.66: Software suspend is disabled.

```

I've followed the howto with the exact same kernel.  Any ideas ??

markLast edited by percking on Fri Jan 03, 2020 12:13 pm; edited 1 time in total

----------

## lefteye

Umm argh asmuch as I love configuring and whatnot I think I'll wait for a swsusp ebuild that does proper configuration. I wish I could make an ebild but I'd be clueless. I just don't feel like messing around with startup again and fubaring my system which was justreinstalled.

----------

## zmedico

 *percking wrote:*   

> Software suspend is disabled

 

I think I got that behavior when I set SWSUSP_UNLOAD_MODULES_BEFORE_SUSPEND="no" in /etc/suspend.conf.  Did you make any changes there?

 *lefteye wrote:*   

> I just don't feel like messing around with startup again and fubaring my system which was justreinstalled.

 

You could do a backup with partimage or something and then it's easier to recover.  Or if you're only messing with startup scripts then you could just keep a backup tarball of /etc.  That's just my 2 cents. Don't mess with it if you don't feel like it.   :Wink: 

----------

## jewps

 *lefteye wrote:*   

> Umm argh asmuch as I love configuring and whatnot I think I'll wait for a swsusp ebuild that does proper configuration. I wish I could make an ebild but I'd be clueless. I just don't feel like messing around with startup again and fubaring my system which was justreinstalled.

 

patching the kernel isn't the problem, it's does this patch work with this kernel? simple answer is yes, it seems to patch the vanilla sources quite nicely, but thats about it.

----------

## isospin

 *percking wrote:*   

> My hibernation process also resumes immediatly after starting.  I do have the following in my logs though:
> 
> ```
> May 25 18:34:56 [kernel] Software Suspend 2.0.0.66: Software suspend is disabled.
> 
> ...

 

I saw this behavior on 2.6.5. as a result of my having mistakenly enabled the first software suspend option in the kernel config.  Disabling the option resoved the issue.  Hope this helps.

----------

## Remenic

Does the automatic unmounting of the Windows partitions work when the partition is in use (by an open konqueror, or bash prompt sitting there)? If not, that that could be a bit dangerous.

Thing is, I am dual booting between Windows and Linux. Sometimes I might forget wether I have suspended Linux or not. If I need to be in Windows, I don't feel like booting Linux first to make sure.

Is there a way to tell grub that Linux has been suspended, so it can warn me? Or does the unmounting of windows partitions work even if the partition was in use?

----------

## zmedico

 *Remenic wrote:*   

> Does the automatic unmounting of the Windows partitions work when the partition is in use (by an open konqueror, or bash prompt sitting there)? If not, that that could be a bit dangerous.

 

A busy device can not be umounted.  All processes accessing a device could be killed with something like "fuser -k -m /dev/hda1".  Also, the hibernate script with the "--kill" parameter will do this for you (kill all processes accessing file systems specified in the SWSUSP_UMOUNTS variable of /etc/suspend.conf).  For exact details, have a look at the UmountDevices() function in the hibernate script.

----------

## ankit

Got this to work on my dell 600m. Using the DRI X11 drivers. Couple of problems so far:

- Though I seem to get 3d acceleration upon resume, it is about half the normal speed (glxgears gives 1200fps as opposed to 2000 fps)

- The dreaded ATI hangups start to occur upon resume (the laptop works perfectly before hibernate with the DRI driver).

Anyways, atleast I have something now. Cant wait for ACPI sleep modes to work...

----------

## Nuuul

Hibernating works like a charm here  :Smile: , on my good ol' Tecra 8000

I also patched my kernel yesterday manually with the source from here: http://prdownloads.sourceforge.net/swsusp/software-suspend-2.0.0.81-for-2.6.6.tar.bz2?download

Applied the bootsplash patch, looks nice.

I've also got the same problem with alsa: have to reload the modules, or else sound doesn't work well after resuming.

Now I'm looking for a way to get speechd to say that it's suspending and resuming....

[edit] Ow, don't patch the kernel (2.6.6 in my case), with the 2.6.6 acpi patch. It will give errors and stop during kernel compiling after the swsusp patch applied. 

Also got a question: Does anyone know how to configure swsusp, that it will suspend after x period of time? Not every 10 mins or so, but based on idle calls/no keyboard input?[/edit]

----------

## camillo

I have just installed swsusp 2 on a 2.6.6 kernel and all work fine except a litte problem with audio.

But i didn't have understand one thing:

 *tuxlover wrote:*   

> 
> 
> 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:
> ...

 

I have my home partition on hda6 and the root on hda5.

My question is: I MUST  unmount my home partition before suspending the system? If yes how can I do that?I think is impossible....

Tanks Camillo

----------

## zmedico

 *Quote:*   

> If you partitions that you would like to access while your linux system has been swsusp'ed (like a windows partition)

 

Your home partition and root partion should not fall into this category.  They should remain mounted in the suspended state.  While these partitions are in the suspended state, don't boot into some other OS and try to mount them because that would ruin their suspended state.

If you have a windows root partition that's mounted in linux then it's a good idea to unmount it before you suspend so that you can boot into windows while linux is suspended.

----------

## dyqik

I've got ACPI and suspend working on my Vaio V505DP.  As long as X isn't running, I can suspend and resume fine (as long as I don't try to restart either of the network interfaces for hysterical reasons).  If X is running I get a corrupted screen and the system hangs.

My Vaio is a centrino, with a Radeon Mobility 9200 using the Ati binary drivers. Kernel is 2.6.5, and I'm using Xorg.

Has anyone get any idea what to try?

----------

## frenkel

It's working great! Thanks!

To get alsa sound working:

Compile all alsa drivers (including things like sound_core) as modules and add the following to /etc/suspend.conf:

 *Quote:*   

> 
> 
> SWSUSP_RESTART_SERVICES="hotplug alsasound"
> 
> 

 

Reboot and enjoy hibernate and wake-up WITH sound  :Very Happy: 

Greets,

Frank

----------

## |T5|

 *Quote:*   

> If X is running I get a corrupted screen and the system hangs.

 

This seems to be an issue of the binary ATI drivers. As I posted to the swsusp list and did not get any answer, there doenst seem to be any solution yet

----------

## b0fh

I patched and compiled swsusp2 with 2.6.6 and it seems to be loaded fine:

```
Software Suspend 2.0.0.81: Swap space signature found.

Software Suspend 2.0.0.81: Suspending enabled.

Software Suspend 2.0.0.81: Checking for image...

Software Suspend 2.0.0.81: Detected the signature of an alternate implementation.
```

But when I call the hibernate script (stopped xdm before), it does something, but returns directly telling this in log:

```
Software Suspend 2.0.0.81: Initiating a software_suspend cycle.

CPU 0 Zone DMA PCP 0 count is now 0.

CPU 0 Zone DMA PCP 1 count is now 0.

CPU 0 Zone Normal PCP 0 count is now 0.

CPU 0 Zone Normal PCP 1 count is now 0.

CPU 0 Zone HighMem PCP 0 count is now 0.

CPU 0 Zone HighMem PCP 1 count is now 0.

You need some storage available to be able to suspend.

Please include the following information in bug reports:

- SWSUSP core    : 2.0.0.81

- Kernel Version : 2.6.6

- Version spec.  : 2.0.1

- Compiler vers. : 3.3

- Modules loaded : ipt_state ip_conntrack iptable_filter ip_tables nls_iso8859_1

- Attempt number : 1

- Parameters     : 5 0 0 32

- Limits         : 98160 pages RAM. Initial boot: 95209.

- Overall expected compression percentage: 0.

- Swapwriter active.

  Swap available for image: 0.

- LZF Compressor enabled.

pdflush: bogus wakeup!

```

What might be the reason for failing?

Ok, I've got 384MB RAM and the swap-partition has just 216MB, but I read it should work with smaller swap if memory isn't full...

----------

## Earthwings

 *Quote:*   

> 
> 
> Ok, I've got 384MB RAM and the swap-partition has just 216MB, but I read it should work with smaller swap if memory isn't full...

 

The last time I read the docs it stated it wouldn't hibernate if swap < RAM. While compression could make it fit in the swap space, the script doesn't know about the size of the compressed RAM image and therefore exits for safety. Expand your swap.

----------

## b0fh

 *Quote:*   

> The last time I read the docs it stated it wouldn't hibernate if swap < RAM

 

Ok, I'll try increasing my swap... Is there anything I can do againt trashed consoles (X looks fine) when using suspend-to-ram on my thinkpad t23? Had this with swsusp and swsusp 2...

----------

## sburnett

Hello,

I'm trying to get this to work on my desktop machine (an nforce board). It works much better than swsusp1, which didn't even attempt to hibernate the machine at all. With swsusp2, it makes it through the first few stages of saving, but freezes about 3/4 of the way through "Saving disk cache." I have about a gig of swap (vs 512 of RAM), so I don't think its a space issue. Has anyone else had this problem or a solution?

----------

## b0fh

 *Quote:*   

> The amount of memory needed depends on a lot of things. For the average user, sizeof(RAM)x2 is ample for the swap partition used by swsusp.

 

Uh, do I really need that much space to suspend?

----------

## tuxlover

Hi,

After coming back to this thread after weeks I made some (alsasound, modules, new kernel patching with 1 kernel patch) updates to the howto. This means that I still do maintain this howto, so please keep coming forward with ideas  :Smile: 

I just tried swsusp2-0.82 on vanilla 2.6.6. It works fine so far, only that the patch seemed to be broken at the end ("unexpected end of patch" or similar). But that was only bootsplash, which I don't use, so I didn't care.

 *lefteye wrote:*   

> Umm argh asmuch as I love configuring and whatnot I think I'll wait for a swsusp ebuild that does proper configuration.

 

In my opinion the only thing the ebuild could do would be to patch the kernel, which is quite easy (as of today, it's just 1 patch, not 3 anymore). I think individual confurations are too different to be taken care of by portage (modules, mounted/used partitions, etc.)

A question regarding this: Why is the swsusp2-patch not in the gentoo patchset? That would be great.

----------

## Earthwings

 *tuxlover wrote:*   

> 
> 
>  *lefteye wrote:*   Umm argh asmuch as I love configuring and whatnot I think I'll wait for a swsusp ebuild that does proper configuration. 
> 
> In my opinion the only thing the ebuild could do would be to patch the kernel, which is quite easy (as of today, it's just 1 patch, not 3 anymore).
> ...

 

It's not really that easy, see the bootsplash ebuild, but doable.

 *Quote:*   

> 
> 
> I think individual confurations are too different to be taken care of by portage (modules, mounted/used partitions, etc.)
> 
> 

 

Indeed ebuilds normally only do a basic setup, so waiting for an ebuild doesn't really solve the problem that you've got to configure your system.

 *Quote:*   

> 
> 
> A question regarding this: Why is the swsusp2-patch not in the gentoo patchset? That would be great.

 

I filed these bug reports some time ago - no progress yet   :Confused: 

https://bugs.gentoo.org/show_bug.cgi?id=51696

https://bugs.gentoo.org/show_bug.cgi?id=52019

But today is bugday, maybe someone wants to nag a dev on irc about it  :Wink: 

----------

## sburnett

Hate to reply to my own post, but I tried suspending again and it freezes when "writing caches." There is nothing about disk caches in there as I had originally said. I've tried recompiling the kernel numerous times to no avail.

Any ideas?

 *sburnett wrote:*   

> 
> 
> I'm trying to get this to work on my desktop machine (an nforce board). It works much better than swsusp1, which didn't even attempt to hibernate the machine at all. With swsusp2, it makes it through the first few stages of saving, but freezes about 3/4 of the way through "Saving disk cache." I have about a gig of swap (vs 512 of RAM), so I don't think its a space issue. Has anyone else had this problem or a solution?

 

----------

## Earthwings

There's an option to turn on debugging. Did you try it to get some more useful output?

----------

## zmedico

 *sburnett wrote:*   

> With swsusp2, it makes it through the first few stages of saving, but freezes about 3/4 of the way through "Saving disk cache."

 

My kernel with patch set from software-suspend-2.0.0.81-for-2.6.6.tar.bz2 works pretty well but I've had similar problems with other kernels/patches. Which one are you using?

 *sburnett wrote:*   

> Uh, do I really need that much space to suspend?

 

The official recommendation:  *Quote:*   

> This swap partition should be at least 30% larger than your RAM (this is a rough estimation: it depends on the number of applications you suspend and their memory consumption).

 

 *tuxlover wrote:*   

> the only thing the ebuild could do would be to patch the kernel, which is quite easy

 

I agree. After one gets in the habit it's easy to patch as long as there're not too many rejects (2.0.0.81 has no rejects against vanilla 2.6.6).

System specific configuration was also fairly easy in my case.  It was mostly a matter of forcing problematic modules to unload before suspend and reload afterward.  For this I use SWSUSP_RESTART_SERVICES="hotplug net.eth0" in /etc/suspend.conf and put ethernet and psmouse modules in /etc/modules.autoload.d/kernel-2.6.

----------

## Jerrac

When I try to:

```
bash-2.05b# /software-suspend-core-2.0.0.66-incremental.bz2 | patch -p1

bash: /software-suspend-core-2.0.0.66-incremental.bz2: cannot execute binary file

bash-2.05b#
```

I get that error. The first two patches applied just fine. Is this the one that patches the keyboard.c file mentioned in the howto? I am using gentoo-dev-sources the 2.6.5-r1 one. 

Tuxlover, you might mention which patch it that doesn't install cleanly. That would help.

 *Quote:*   

> One of the patches will 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). 

 

----------

## sburnett

 *zmedico wrote:*   

>  *sburnett wrote:*   With swsusp2, it makes it through the first few stages of saving, but freezes about 3/4 of the way through "Saving disk cache." 
> 
> My kernel with patch set from software-suspend-2.0.0.81-for-2.6.6.tar.bz2 works pretty well but I've had similar problems with other kernels/patches. Which one are you using?

 

Ok, I figured it out. I simply recomplied my kernel with nearly everything as a module, then unloaded them all before suspending. This works fine in text mode, but freezes on resume when X in open. I have an nvidia card, though (a GeForce 4) and its seems I'll just have to wait for nvidia to fix power management with their drivers.

For future reference, I'm using 2.6.5 vanilla.

 *Jerrac wrote:*   

> 
> 
> When I try to:
> 
> Code:
> ...

 

Try adding "bunzip2" to the front of the command (sans quotes of course).[/quote]

----------

## Jerrac

 *sburnett wrote:*   

> 
> 
>  *Jerrac wrote:*   
> 
> When I try to:
> ...

 [/quote]

Oh, that was really smart of me... lol. I forgot the bzcat mentioned in the howto. THanks for the tip!

----------

## Jerrac

Well... new error when I try to compile the kernel after configuring it....

 *Quote:*   

> bash-2.05b# make
> 
>   SPLIT   include/linux/autoconf.h -> include/config/*
> 
>   CC      arch/i386/kernel/asm-offsets.s
> ...

 

Help.  :Crying or Very sad: 

----------

## zmedico

 *Jerrac wrote:*   

> make[2]: *** No rule to make target `kernel/power/utility.o', needed by `kernel/power/built-in.o'.  Stop.

 

A google search shows that this seems to be a common type of error.  Someone over here started over with a fresh source tree and that apparently solved it for them.  Maybe you just need to do a "make distclean".  Where did you get the kernel config? Did you do a "make oldconfig" first?  Which kernel and patch set are you using, gentoo-dev-sources-2.6.5-r1?   Why not go for the latest and greatest?  My vanilla 2.6.6 patched with software-suspend-2.0.0.81-for-2.6.6.tar.bz2 and more seems to work pretty well.

----------

## b0fh

Okay, I'm back with bigger swap and suspending works nice when my pcmcia wlan card isn't inserted; if inserted and pcmcia-drivers are loaded suspending hangs at last third of "writing caches..."

The problem is: I can't unload yenta-socket and pcmcia-core module if the card is inserted... Any ideas?

----------

## MagnusBerg

Don't laugh now but this can be a real stupid question. I must know if I got it right.

Then I resume it begins like a normal start. First comes the hardwarecheck and then comes Grub.

I that as it should be, or is something wrong???

I have problem to get my Nvidacard up and running after resume, but that's another question that I will take care of if it's right so far.

----------

## Earthwings

Yes, that's how it works.

----------

## MagnusBerg

 *Earthwings wrote:*   

> Yes, that's how it works.

 

Wow! I have been trying to succed with acpi or/and sleepmode for over one and a half year now. Thank you very very much tuxlover for a great manual.

----------

## Jerrac

 *zmedico wrote:*   

>  *Jerrac wrote:*   make[2]: *** No rule to make target `kernel/power/utility.o', needed by `kernel/power/built-in.o'.  Stop. 
> 
> A google search shows that this seems to be a common type of error.  Someone over here started over with a fresh source tree and that apparently solved it for them.  Maybe you just need to do a "make distclean".  Where did you get the kernel config? Did you do a "make oldconfig" first?  Which kernel and patch set are you using, gentoo-dev-sources-2.6.5-r1?   Why not go for the latest and greatest?  My vanilla 2.6.6 patched with software-suspend-2.0.0.81-for-2.6.6.tar.bz2 and more seems to work pretty well.

 

Um... I just patched it, then I did make menuconfig, configured it, saved the config, and then typed make. I have made a kernel with it before though. Are you saying I should somehow clean it up? I am rather new to linux so I really don't understand what you are saying.

As for the vanilla sources, aren't there some gentoo specific patches? Or are there just certain options I need to make sure I select? I think I did that before.... THe options, no the patches. 

Thanks!

----------

## Jerrac

Heh, I can't win. I went ahead and emerged the 2.6.6 sources. When I tried to applie the patch "software-suspend-2.0.0.81-for-2.6.6.tar.bz2" it says at the end

 *Quote:*   

> patching file drivers/video/bootsplash/bootsplash.c
> 
> patch unexpectedly ends in middle of line
> 
> patch unexpectedly ends in middle of line

 

Sheesh... 

*hopes someone can help him with at least one of the kernels*

----------

## zmedico

 *b0fh wrote:*   

> The problem is: I can't unload yenta-socket and pcmcia-core module if the card is inserted... Any ideas?

 

Is rmmod giving you "device is busy" or something? Hopefully there's some way to stop the thread that's causing it.  I haven't used pcmcia yet so I can't tell you.

 *Jerrac wrote:*   

> I have made a kernel with it before though. Are you saying I should somehow clean it up?

 

Yes, if a kernel has previously been built then it is necessary to clean it up.  If you do "make distclean" it will clean everything up (even .config will be deleted).

 *Jerrac wrote:*   

> aren't there some gentoo specific patches? Or are there just certain options I need to make sure I select?

 

There are no required patches.  The standard kernel has all the features necessary for a basic gentoo system.  Maybe some config options are required but the default ones are probably fine.  The devfs pseudo file system was previously required but now we can use udev (works for me).  I started with a "genkernel --menuconfig all" and then did further customization from there.  I got that idea from the "Configuring the Kernel" section of the handbook.

Here's an example:

```
cd /usr/src

tar xfj linux-2.6.6.tar.bz2

ln -s linux-2.6.6 linux

tar xfj software-suspend-2.0.0.81-for-2.6.6.tar.bz2

cd linux-2.6.6

for NAME in ../software-suspend-2.0.0.81-for-2.6.6/*

do

   patch -p1 -b < $NAME >> ../software-suspend-2.0.0.81-for-2.6.6_patch_log.txt 2>&1

done

genkernel --menuconfig all

```

It's good practice to type in something for "EXTRAVERSION =" at the top of the kernel Makefile.  This will distinguish the current kernel build from others.  Do that before the menuconfig step.

 *Jerrac wrote:*   

> patching file drivers/video/bootsplash/bootsplash.c
> 
> patch unexpectedly ends in middle of line
> 
> patch unexpectedly ends in middle of line

 

The patches work fine for me.  Here's the md5sum:

a6e730810be8f08d73ca41516f3d410b  software-suspend-2.0.0.81-for-2.6.6.tar.bz2

----------

## noneckturtle

I have installed following the indtruction in this HOWTO and used the supplied keyboard.c file.

I compiled the kernel with the swsusp2 partition being my swap partition. (/dev/hda8)

When I run the /usr/local/sbin/hibernate script as root I get the following error:

bash# /usr/local/sbin/hibernate

/bin/echo: write error: Operation not permitted

Anyone got any ideas what's wrong?

EDIT: I was able to fix this problem, I had the acpi option set within /etc/suspend.conf. System was able to suspend but when I restarted it hang at something about ".........???? cache" on startup.

I rebooted and was prompted to rebuild the hibernate image. Kernel continued to start loading then:

RAMDISK: Couldn't find valid RAM disk image starting at 0.

Kernel panic: VFS: Unable to mount root fs on hda9

Please help!!

----------

## zmedico

 *noneckturtle wrote:*   

> I rebooted and was prompted to rebuild the hibernate image.  Kernel continued to start loading

 

This could be a problem.  The boot should look normal until after the kernel is loaded and swsusp gets a chance to resume the hibernated state.  Maybe you have 2 hibernation mechanisms going at the same time (swsusp and something else)?

----------

## tuxlover

 *noneckturtle wrote:*   

> I rebooted and was prompted to rebuild the hibernate image. Kernel continued to start loading then:
> 
> RAMDISK: Couldn't find valid RAM disk image starting at 0.
> 
> Kernel panic: VFS: Unable to mount root fs on hda9

 

To me, this sounds like you've been using an initrd (initial ramdisk), which usually contains important modules (like the filesystem module for your root filesystem; e.g. if you compile ext3 as a module and use ext3 for root, you need to have that module in your initial ramdisk).

As I don't use it, I don't know how to fix this though; there's "mkinitrd" which makes an initial ramdisk... Maybe somebody else knows more.

 *Jerrac wrote:*   

> Heh, I can't win. I went ahead and emerged the 2.6.6 sources. When I tried to applie the patch "software-suspend-2.0.0.81-for-2.6.6.tar.bz2" it says at the end

 

...something about bootsplash... I boldly ignored it since I don't use a bootsplash and it works for me.

 *Jerrac wrote:*   

> Tuxlover, you might mention which patch it that doesn't install cleanly.

 

It was the software-suspend-linux-2.6.5-test16-whole, the one containing the stuff for keyboard.c.

----------

## Jazz

umm, how do u get suspend to ram working ? it immediately resumes for me..

```
PM: Preparing system for suspend

Stopping tasks: ==============================================|

psmouse.c: bad data from KBC - timeout bad parity

PCI: Setting latency timer of device 0000:00:1d.7 to 64

psmouse.c: bad data from KBC - timeout bad parity

psmouse.c: bad data from KBC - timeout bad parity

Could not suspend device 0000:00:1d.7: error -5

ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 9 (level, low) -> IRQ 9

ACPI: PCI interrupt 0000:00:1f.5[B] -> GSI 3 (level, low) -> IRQ 3

PCI: Setting latency timer of device 0000:00:1f.5 to 64

eth0: link up, 100Mbps, full-duplex, lpa 0x41E1

psmouse.c: bad data from KBC - timeout bad parity

psmouse.c: bad data from KBC - timeout bad parity

psmouse.c: bad data from KBC - timeout bad parity

Restarting tasks... done
```

and 

```
root@Matrix{/home/jazz}> grep suspend /var/log/messages

Jun 11 01:33:41 Matrix PM: Preparing system for suspend

Jun 11 01:33:42 Matrix Could not suspend device 0000:00:1d.7: error -5

Jun 11 01:33:55 Matrix PM: Preparing system for suspend

Jun 11 01:40:12 Matrix PM: Preparing system for suspend

Jun 11 01:40:13 Matrix Could not suspend device 0000:00:1d.7: error -5

Jun 11 02:05:00 Matrix PM: Preparing system for suspend

Jun 11 02:05:26 Matrix PM: Preparing system for suspend

Jun 11 02:06:50 Matrix PM: Preparing system for suspend

Jun 11 02:06:51 Matrix Could not suspend device 0000:00:1d.7: error -5

```

bye

jazz

----------

## zmedico

 *jassi wrote:*   

> umm, how do u get suspend to ram working ?

 

I don't know, but this thread is mostly about "software suspend" which is a different suspension mechanism that "suspend to ram".  You might want to try another thread for that because software suspend is a big enough topic as it is.    :Wink: 

 *tuxlover wrote:*   

>  *noneckturtle wrote:*   I rebooted and was prompted to rebuild the hibernate image. Kernel continued to start loading then:
> 
> RAMDISK: Couldn't find valid RAM disk image starting at 0.
> 
> Kernel panic: VFS: Unable to mount root fs on hda9 
> ...

 

A resume from software suspend should not use the initrd like a normal boot would (it can use it for the bootsplash image).  After the kernel is loaded by the boot loader, software suspend needs to read the suspended state from the swap partition.  Any drivers needed for this step must be statically compiled in the kernel.  Maybe the driver for the root files ystem, if compiled as a module, can be read from the swap partition.  It should be able to assuming that it did not get unloaded somehow before the suspend.

Of course, that module would have originated from an initrd in a normal boot (not a resume boot though).  Genkernel will automatically generate an initrd to go with every kernel it builds.  It will not, however, automatically include an ext3 module since that driver is statically compiled into the kernel in practically all cases.

----------

## Jazz

Doh, ok i'll do that ! but i still dont feel 3 pages is big enough for a post in gentoo forums   :Wink: 

Bye,

jazz

----------

## zmedico

I found that the program "/sbin/pam_console_apply" is handy for reapplication of permissions to devices for the user named in /var/run/console.lock.  I run it at the end of the start() function in /etc/init.d/alsasound so that my permissions come back for /dev/snd/* (it didn't work when I put it in the SWSUSP_START_PROGS_AFTER_RESUME variable of /etc/suspend.conf).  Now I'd like to create a script to automatically respawn the sound server (artsd gets killed automatically when the alsasound service is stopped).

This is ugly though.  It would be nice if the driver could stay loaded through the suspend/resume cycle (snd_intel8x0 in my case).  Someone should start a list of hardware/driver combinations that are able to do that with swsusp.

----------

## pakman

 *zmedico wrote:*   

>  Someone should start a list of hardware/driver combinations that are able to do that with swsusp.

 

For a rough guide as to what modules should support suspend/resume, see which have resume functions (or suspend):

grep -rli resume /usr/src/linux/drivers/*

grep -rli resume /usr/src/linux/sound/*

----------

## zmedico

Thanks pakman!  :Very Happy:   It looks like my driver has some power management code.  Too bad it doesn't  seem to be working properly.

 *Linus Torvalds wrote:*   

> We're back to the times when men were men and wrote their own device drivers.

 

No sexism intended...   :Wink:   Seriously though, this device driver stuff looks like it could be fun.  I'm heading over to tldp.org and this book looks good too.  Oh, and here's some info specifically for 2.6 kernels: Porting device drivers to the 2.6 kernel.  I also found a working "Hello World" 2.6 kernel module (just type make) in the emspace package.

----------

## Jerrac

 *zmedico wrote:*   

> 
> 
> The patches work fine for me.  Here's the md5sum:
> 
> a6e730810be8f08d73ca41516f3d410b  software-suspend-2.0.0.81-for-2.6.6.tar.bz2

 

Um, how do I check md5 sums in Gentoo? I have md5summer on windows... but that doesn't help here.

Thanks!

----------

## b0fh

md5sum <filename>

----------

## Jerrac

 *b0fh wrote:*   

> md5sum <filename>

 

thanks!

Ok, when I try applying the patch on a freshly installed 2.6.6 source, I get this message:

 *Quote:*   

> Reversed (or previously applied) patch detected!  Assume -R? [n]

 

I have had that message before and just hit enter....

What does it mean? I am just leaving it until I get an answer, hopefully soon.  :Smile: 

*thinks for a sec*

*goes off to do a google search*

----------

## zmedico

 *Quote:*   

> Reversed (or previously applied) patch detected!  Assume -R? [n]

 

The patch contains changes that have already been made in the sources being patched.  For example, if you try to apply a laptop mode patch to kernel 2.6.6 (which includes laptop mode already) then you should get a message like that.  Another example would be patching gentoo-dev-souces with a bootsplash patch (bootsplash is already in gentoo-dev-sources).

The patch was not created for the sources you are patching so your results may vary!

----------

## Jerrac

Yeah, I figured that out by downloading the 2.6.6 sources from kernel.org. Now it patches fine. 

It is mostly working. It will suspend when I hit my power button. But, when I try to resume, it resumes, and the minute kde starts in suspends again. Any clues?

----------

## dan2003

I'm a tad confused.. This is different to suspend-to-disk yes? Cos i had suspend to disk working and resuming succesfully earlier with 2.6.7-ck1 but now i have managed to brake it.

With dri working it doesnt even bring X back, with Dri disabled X comes back and the clock is ticking over (i have seconds visible in kde) but the mouse and kbd dont work (interesting how the usb optical mouse does light back up now tho - it wouldnt do that without reloading ohci-hcd earlier).

Basically i have added bootsplash to ck1 but this appears not to be the cause, so i'm left thinking it must be Xorg which i upgraded too to make IGP320m Dri work which it now does.

My working config earlier was with Xfree 4.3.0. Note it was very quick and didnt have all these scripts. I could simply right click on the battery app and click hibernate. I estimate it took about 10-15 secs to hibernate and about 30 to boot back up.

I did however have to reload both usb and net modules manually after. And now i can see loads of oops type code scroll up the screen on resume says "Something bad happened" !! to do with usb.

This is with a HP Compaq NX9005 XP2000, 256Mb ram, IGP320m gpu.

Hmm.. just tried a suspend / resume cycle from a tty after stoppping X and it still comes back without keyboard working :/

[Edit]

I timed it, suspend = 12 secs

resume = 32 secs, but once its all back the mouse and keybd are dead (atm)  :Sad: 

I'm gonna try this swsusp2,

maybe not, theres not a 2.6.7 version

----------

## zmedico

 *Jerrac wrote:*   

> It will suspend when I hit my power button. But, when I try to resume, it resumes, and the minute kde starts in suspends again. Any clues?

 

I have had this problem because several (more than one) power management events were generated when I pressed the power button.  There are still some power button events left over after the resume.  You need to account for the extra events somehow.  Maybe if you put acpid (or apmd) in the SWSUSP_RESTART_SERVICES variable of /etc/suspend.conf that will flush those events before the suspend.

 *dan2003 wrote:*   

> I'm a tad confused.. This is different to suspend-to-disk yes?

 

Software suspend is all in the kernel while some other mechanisms rely on firmware.

 *Quote:*   

> Hmm.. just tried a suspend / resume cycle from a tty after stoppping X and it still comes back without keyboard working :/

 

Build those drivers as modules, unload them before suspend, and reload them after resume.

----------

## tuxlover

 *dan2003 wrote:*   

> I'm a tad confused.. This is different to suspend-to-disk yes?

 

swsusp2 is a complete rewrite of swsusp(1), the old software suspend of the linux kernel. As already mentioned, you might have a vendor-specific swsusp in your laptop already (although unlikely because uncommon today).

 *dan2003 wrote:*   

> with Dri disabled X comes back and the clock is ticking over (i have seconds visible in kde)

 

What do you mean by "ticking over"? Is it too fast, or too slow? There are some options for taking care of clock/time problems in /etc/sysconfig/suspend.conf. Take a look at them.

 *dan2003 wrote:*   

>  but the mouse and kbd dont work (interesting how the usb optical mouse does light back up now tho - it wouldnt do that without reloading ohci-hcd earlier).

 

My experience shows that simply making hotplug restart (also described in my howto) makes mouse and keyboard work.

 *dan2003 wrote:*   

> so i'm left thinking it must be Xorg

 

swsusp2 should work with Xorg (I use it, too).

----------

## noneckturtle

I got most of swsusp2 working but am worried about a couple of issues.

1.  When I restarted after using the hibernate script the root partition /dev/hda9 was mounted read-only. The boot partition /dev/hda2 was mounted read-write.

When I rebooted and tried another suspend everything worked fine.

2. When I place pcmcia in the restart_services location of the suspend.config I got:

rc-scripts: Usage: pcmcia {start|stop|restart}

                          pcmcia without arguments for help

How do I get this to work?

kernel = 2.6.5-r1 gentoo-dev-sources

e2fsprogs = version 1.34

EXT3 is compiled into the kernel

----------

## genstef

is there a similar howto for suspend-to-ram?

I think swsusp2 is much too slow for a laptop that is really in use.

I got suspend-to-ram working and it should work for radeon cards with this howto: http://www.doesi.gmxhome.de/linux/tm800s3/s3.html

But there is an issue i have that my network card stops working from time-to-time after a suspend. I dont know where to post on the issue as there is no suspend-to-ram mailing list. where should i post it?

----------

## tuxlover

 *noneckturtle wrote:*   

> 2. When I place pcmcia in the restart_services location of the suspend.config I got:
> 
> rc-scripts: Usage: pcmcia {start|stop|restart}
> 
>                           pcmcia without arguments for help
> ...

 

I don't know what the problem is really, but as a workaround you can edit /etc/suspend.conf and put a call to /etc/init.d/pcmcia stop in

```
SWSUSP_START_PROGS_BEFORE_SUSPEND=""
```

and, analogously, /etc/init.de/pcmcia start in

```
SWSUSP_START_PROGS_AFTER_RESUME=""
```

You probably need to use strange quoting, or you need to put your pcmcia start/stop calls in scripts, and put calls to these scripts in swsusp_start_progs_before/after_resume. I.e. it will *not* work if you simply spell out swsusp_start_progs_before_resume="/etc/init.d/pcmcia stop".

You can also just restart pcmcia in swsusp_start_progs_after_resume, but that will not unload any modules before suspend, which might be necessary.

 *genstefan wrote:*   

> I think swsusp2 is much too slow for a laptop that is really in use.

 

I think swsusp and suspend to ram are two different things. swsusp is more useful if you plan to leave your computer off for a longer time, because it is, as you said, quite slow (but shouldn't be much slower than windows' hibernation mode...?)

 *Quote:*   

> But there is an issue i have [...] where should i post it?

 

You could make a howto and use it to post your own problems  :Smile:  seriously.

Do you have an acer tm 80x? Then you could also try the acer tm 80x support thread (which, unfortunately, has gotten so long that nobody really pays very much attention, or your posts get "lost" quickly).

----------

## Jerrac

I have got it working pretty well now. But when I resume my keyboard and mouse/touchpad will not work at all. I have all the modules in the modprobe -l list in modules.autoload.d/kernel-2.6. So suspend auto un/loads them. Any suggestions? Thanks!

----------

## zmedico

 *noneckturtle wrote:*   

> 
> 
> 2. When I place pcmcia in the restart_services location of the suspend.config I got:
> 
> rc-scripts: Usage: pcmcia {start|stop|restart}
> ...

 

I had this same problem.  There is a bug in the hibernate script version 0.18 that causes the start|stop arguments to be uppercased.  Here is my patch:

```
--- hibernate-0.18   2004-05-08 01:04:39.000000000 -0700

+++ hibernate   2004-06-16 01:08:57.000000000 -0700

@@ -314,6 +314,13 @@

         # gentoo use this

         echo -e "\033[1;33m$services_to_execute\033[0m" | $LOGCMD > $VERBOSE

  

+   if [ "$startstop" = "START" ] ; then

+      startstop="start"

+   fi

+   if [ "$startstop" = "STOP" ] ; then

+      startstop="stop"

+   fi

+   

         if [ "$startstop" = "stop" ] ; then

             # start services - reverse the order in which the scripts are called

             for script in $services_to_execute ; do
```

 *Jerrac wrote:*   

> But when I resume my keyboard and mouse/touchpad will not work at all.

 

Did you put hotplug in the SWSUSP_RESTART_SERVICES variable of /etc/suspend.conf as suggested by tuxlover? That does "input hotplugging".

 *dan2003 wrote:*   

> theres not a 2.6.7 version

 

I'm using software-suspend-2.0.0.88-for-2.6.7 now and it seems to work well.

----------

## Jerrac

 *zmedico wrote:*   

> 
> 
>  *Jerrac wrote:*   But when I resume my keyboard and mouse/touchpad will not work at all. 
> 
> Did you put hotplug in the SWSUSP_RESTART_SERVICES variable of /etc/suspend.conf as suggested by tuxlover? That does "input hotplugging".
> ...

 

Yes, I did. I have SWSUSP_RESTART_SERVICES="alsasound hotplug"

Do you want to see my entire suspend.conf?

----------

## zmedico

 *Jerrac wrote:*   

> Do you want to see my entire suspend.conf?

 

No, not really.    :Wink: 

Information about your specific hardware and whether or not you built the drivers as modules is probably the most useful.  I had to build the psmouse driveras a module (Device Drivers->Input device support->PS/2 mouse) CONFIG_MOUSE_PS2=m and have it unloaded/reloaded. Maybe if you compile the kernel with CONFIG_SERIO=m (Device Drivers->Character Devices->Serial Devices) you can unload/reload that to get the keyboard going.  If you have to recompile it gives you an excuse to upgrade to 2.6.7!

I got that serio idea because I saw this line in dmesg: *Quote:*   

> input: AT Translated Set 2 keyboard on isa0060/serio0

 

----------

## Jerrac

Here are all the modules I get with modprobe -l.

 *Quote:*   

> /lib/modules/2.6.6/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko
> 
> /lib/modules/2.6.6/kernel/sound/core/snd.ko
> 
> /lib/modules/2.6.6/kernel/sound/core/snd-timer.ko
> ...

 

That is all the modules right?

As for my hard ware I have a viao frv37 laptop. Uses an alps pointing device.

----------

## zmedico

 *Jerrac wrote:*   

> 
> 
> That is all the modules right?
> 
> 

 

If you do CONFIG_SERIO=m they you'll have a module called "serial".  If you do CONFIG_MOUSE_PS2=m then you'll have a module called "psmouse".  You currently don't have either one.  You'll have to recompile because they are statically linked.

BTW- I'm not sure if you mouse is PS/2.  You probably know already if it works with gpm/X.

----------

## Jerrac

I have a question that I would rather search for, but I am unsure what terms to use. So I will ask it here.

If I go into my current config with menuconfig, change something to M, can I just make modules_install without haveing to recompile the kernel?

*will try the keyboard/mouse modules tomorrow*

----------

## zmedico

 *Jerrac wrote:*   

> If I go into my current config with menuconfig, change something to M, can I just make modules_install without haveing to recompile the kernel?*

 

If you go from N to M then it may be possible to do something like that (modules_install doesn't compile modules, see the modules "Hello World" above).  Going from Y to M is a different story because the statically linked driver would need to be disabled somehow (kernel parameters or system calls).

----------

## hugelmopf

On applying the patch software-suspend-2.0.0.88-for-2.6.7.tar.bz2 to my gentoo-dev-2.6.7-kernel I get different prompts saying something like:

"Reversed (or previously applied) patch detected! Assume -R? [n]" 

"File exists, overwrite...?" (These are not the exact words, forgot to copy them).

One example-file for this to happen is Kconfig.

Now I understand what that means (see earlier post), but what should I choose, if I want to keep using gentoo-dev-sources. Is that possible at all?

----------

## tuxlover

 *hugelmopf wrote:*   

> "Reversed (or previously applied) patch detected! Assume -R? [n]" 
> 
> "File exists, overwrite...?" (These are not the exact words, forgot to copy them).
> 
> One example-file for this to happen is Kconfig.
> ...

 

I'm not using gentoo-dev-sources right now, so I don't know. But concerning the "reversed" patches, you should take a look at the files that it doesn't want to patch, and compare it with the patch manually. You should definitely answer the question "Assume -R? [n]" with the default, [n]. (which will leave your kernel as it is, as far as I understand it)

You can always try to compile the kernel and see if it runs. If no filesystem stuff is involved, it should at least not damage your system. 

(Disclaimer: Any crash can damage your filesystem)

nebenbei, hugelmopf: ich bin auch aus Dresden  :Smile:  (wohne zur Zeit aber nicht da)

----------

## noneckturtle

I'm still getting the issue with the root filesystem being mounted read-only. (See previous post) This occurs about 1 in 3 times after running the hibernate script and then powering back on. If I reboot, the filesystem repairs itself (ext3) but the time lost makes swsusp2 a waste.

Anyone got any ideas?

My hdparm optimisations in /etc/conf.d/hdparm are:

disc0_args="-d1 -A1 -m16 -u1 -a64 -X udma5 -c3"

I have SWSUSP_DISABLE_HW_DISK_CACHE set to "/dev/hda"

----------

## neuron

did anyone get the 2.6.7 patch to apply?

It does not apply cleanly to 2.6.7 at all (vanilla) for me...

----------

## genstef

i got it to apply together with bootsplash and win4lin.

----------

## Jerrac

I just compiled the mouse drivers as modules. Made the kernel and modules install. Copied everything over to boot. Restarted. It gives me the little "loading linux........" thing, and then restarts my computer. 

What could cause that? I did the 2.6.6 kernel since the 2.6.7 wouldn't patch cleanly.

[edit]I just redid the kernel and modules. Now it just hangs at the loading linux......[/edit]

----------

## zmedico

 *neuron wrote:*   

> It does not apply cleanly to 2.6.7 at all (vanilla) for me...

 

It works fine for me, just like the 2.6.6 patch set did.  I'll post the md5sum again to make sure we're talking about the same thing.

b7ebb63885b98d5e7ee0deeef8537f02  software-suspend-2.0.0.88-for-2.6.7.tar.bz2

I patched in an analogous way to my previous post.

 *tuxlover wrote:*   

> But concerning the "reversed" patches, you should take a look at the files that it doesn't want to patch, and compare it with the patch manually. You should definitely answer the question "Assume -R? [n]" with the default, [n]. (which will leave your kernel as it is, as far as I understand it)

 

That's how I understand it too.  However, things get complex for example if there are two different versions of bootsplash in gentoo-dev-sources and swsusp2 patches.  Interaction between patches can also increase complexity, for example, if swsusp2 interacts with bootsplash.  In these situations it may be best to pick out the specific patches you want from gentoo-dev-sources and swsusp2 and not apply the ones that would be redundant.  You could get the gentoo-dev-sources patches from one of the genpatches-* tarballs in your distfiles directory.

 *Jerrac wrote:*   

> it just hangs at the loading linux......

 

Are you using SWSUSP_UNLOAD_MODULES_BEFORE_SUSPEND="auto" or what?  I like to use auto but if you're having problems it might be more stable if you use "yes".

If that doesn't help then you could try following the debugging instructions in Documentation/power/swsusp2.txt of the kernel source tree.  Then you may be able to see an oops and find out what's causing it.

When I used the acpi button module with acpid to trigger hibernation with my 2.6.6 kernel it caused a few oppses.  It works fine with my 2.6.7 kernel though.

 *noneckturtle wrote:*   

> root filesystem being mounted read-only

 

That's odd.  Maybe you can get a clue if you follow the debugging instructions.  I would try a new kernel of the latest version before I resort to debugging.  Don't forget to compile in swsusp2 debugging support!

----------

## tuxlover

 *zmedico wrote:*   

>  *Jerrac wrote:*   it just hangs at the loading linux...... 
> 
> Are you using SWSUSP_UNLOAD_MODULES_BEFORE_SUSPEND="auto" or what?  I like to use auto but if you're having problems it might be more stable if you use "yes".

 

I had the impression that Jerrac's problem is not related to using swsusp at all, he's just rebooting with the new kernel...?

----------

## stefanpropehan

has anybody patched the gentoo-dev-sources-2.6.7-r5  kernel?

I get the following patch result when i patch the kernel described in the post of zmedico

```

patching file Makefile

patching file init/main.c

patching file mm/memory.c

patching file mm/swapfile.c

patching file kernel/printk.c

patching file kernel/kallsyms.c

patching file kernel/exit.c

patching file kernel/sched.c

patching file kernel/module.c

patching file kernel/signal.c

patching file kernel/sysctl.c

Hunk #2 succeeded at 520 (offset 3 lines).

Hunk #3 succeeded at 2202 (offset 11 lines).

patching file scripts/Makefile

patching file fs/proc/proc_misc.c

patching file include/linux/sysctl.h

Hunk #1 FAILED at 133.

1 out of 1 hunk FAILED -- saving rejects to file include/linux/sysctl.h.rej

patching file include/linux/console.h

patching file drivers/serial/8250.c

patching file drivers/char/sn_serial.c

patching file drivers/char/keyboard.c

Hunk #1 succeeded at 40 with fuzz 2.

Hunk #2 FAILED at 1062.

1 out of 2 hunks FAILED -- saving rejects to file drivers/char/keyboard.c.rej

patching file mm/hugetlb.c

patching file kdb/modules/Makefile

patching file kdb/modules/kdbm_vm.c

patching file kdb/modules/kdbm_task.c

patching file kdb/modules/kdbm_pg.c

patching file kdb/Makefile

patching file kdb/kdbsupport.c

patching file kdb/kdbmain.c

patching file kdb/kdb_io.c

patching file kdb/kdb_id.c

patching file kdb/kdb_cmds

patching file kdb/kdb_bt.c

patching file kdb/kdb_bp.c

patching file kdb/ChangeLog

patching file include/linux/kdbprivate.h

patching file include/linux/kdb.h

patching file include/linux/dis-asm.h

patching file Documentation/kdb/slides

patching file Documentation/kdb/kdb_ss.man

patching file Documentation/kdb/kdb_sr.man

patching file Documentation/kdb/kdb_rd.man

patching file Documentation/kdb/kdb.mm

patching file Documentation/kdb/kdb_md.man

patching file Documentation/kdb/kdb_ll.man

patching file Documentation/kdb/kdb_env.man

patching file Documentation/kdb/kdb_bt.man

patching file Documentation/kdb/kdb_bp.man

patching file Documentation/kdb/dump.txt

patching file Documentation/kdb/kdb_ps.man

patching file include/asm-i386/ptrace.h

patching file include/asm-i386/mach-default/irq_vectors.h

patching file include/asm-i386/kmap_types.h

patching file arch/i386/Makefile

patching file arch/i386/kernel/vmlinux.lds.S

patching file arch/i386/kernel/traps.c

patching file arch/i386/kernel/smp.c

patching file arch/i386/kernel/smpboot.c

patching file arch/i386/kernel/reboot.c

patching file arch/i386/kernel/nmi.c

patching file arch/i386/kernel/io_apic.c

patching file arch/i386/kernel/i8259.c

patching file arch/i386/kernel/entry.S

patching file arch/i386/Kconfig

patching file kdb/modules/kdbm_x86.c

patching file include/asm-i386/kdbprivate.h

patching file include/asm-i386/kdb.h

patching file arch/i386/kdb/pc_keyb.h

patching file arch/i386/kdb/Makefile

patching file arch/i386/kdb/kdbasupport.c

patching file arch/i386/kdb/kdba_io.c

patching file arch/i386/kdb/kdba_id.c

patching file arch/i386/kdb/kdba_bt.c

patching file arch/i386/kdb/kdba_bp.c

patching file arch/i386/kdb/i386-dis.c

patching file arch/i386/kdb/ChangeLog

patching file include/asm-i386/bfd.h

patching file include/asm-i386/ansidecl.h

patching file arch/i386/kdb/kdb_cmds

patching file drivers/char/keyboard.c

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file drivers/char/keyboard.c.rej

patching file drivers/char/n_tty.c

Hunk #1 succeeded at 1004 with fuzz 2 (offset 10 lines).

Hunk #2 succeeded at 1097 (offset 10 lines).

patching file drivers/char/vt.c

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored -- saving rejects to file drivers/char/vt.c.rej

patching file drivers/video/Kconfig

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file drivers/video/Kconfig.rej

patching file drivers/video/Makefile

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file drivers/video/Makefile.rej

The next patch would create the file drivers/video/bootsplash/Kconfig,

which already exists!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file drivers/video/bootsplash/Kconfig.rej

The next patch would create the file drivers/video/bootsplash/Makefile,

which already exists!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file drivers/video/bootsplash/Makefile.rej

The next patch would create the file drivers/video/bootsplash/bootsplash.c,

which already exists!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file drivers/video/bootsplash/bootsplash.c.rej

The next patch would create the file drivers/video/bootsplash/bootsplash.h,

which already exists!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file drivers/video/bootsplash/bootsplash.h.rej

The next patch would create the file drivers/video/bootsplash/decode-jpg.c,

which already exists!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file drivers/video/bootsplash/decode-jpg.c.rej

The next patch would create the file drivers/video/bootsplash/decode-jpg.h,

which already exists!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file drivers/video/bootsplash/decode-jpg.h.rej

The next patch would create the file drivers/video/bootsplash/render.c,

which already exists!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file drivers/video/bootsplash/render.c.rej

patching file drivers/video/console/fbcon.c

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

19 out of 19 hunks ignored -- saving rejects to file drivers/video/console/fbcon.c.rej

patching file drivers/video/console/fbcon.h

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file drivers/video/console/fbcon.h.rej

patching file drivers/video/vesafb.c

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file drivers/video/vesafb.c.rej

patching file include/linux/console_struct.h

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file include/linux/console_struct.h.rej

patching file include/linux/fb.h

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file include/linux/fb.h.rej

patching file kernel/panic.c

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored -- saving rejects to file kernel/panic.c.rej

patching file drivers/video/bootsplash/bootsplash.c

Hunk #1 succeeded at 557 (offset 1 line).

Hunk #2 succeeded at 566 (offset 1 line).

Hunk #3 succeeded at 727 (offset 1 line).

Hunk #4 succeeded at 756 (offset 1 line).

Hunk #5 succeeded at 792 (offset 1 line).

Hunk #6 succeeded at 802 (offset 1 line).

Hunk #7 succeeded at 824 (offset 1 line).

Hunk #8 succeeded at 879 (offset -2 lines).

patching file arch/arm/kernel/ecard.c

patching file arch/i386/kernel/apm.c

patching file arch/i386/kernel/cpu/mcheck/non-fatal.c

patching file arch/i386/kernel/io_apic.c

Hunk #1 succeeded at 34 (offset 3 lines).

Hunk #2 succeeded at 604 (offset 3 lines).

patching file arch/i386/kernel/process.c

patching file arch/i386/kernel/signal.c

patching file arch/i386/kernel/smp.c

Hunk #1 succeeded at 476 (offset 23 lines).

patching file arch/i386/mm/init.c

patching file arch/i386/mm/pageattr.c

patching file arch/i386/power/cpu.c

patching file arch/i386/power/Makefile

patching file arch/i386/power/suspend2.c

patching file arch/ppc/Kconfig

patching file arch/ppc/kernel/signal.c

patching file arch/ppc/kernel/vmlinux.lds.S

patching file arch/ppc/Makefile

patching file arch/ppc/mm/init.c

patching file arch/ppc/platforms/pmac_feature.c

patching file arch/ppc/power/cpu.c

patching file arch/ppc/power/cpu_reg.S

patching file arch/ppc/power/Makefile

patching file arch/ppc/power/swsusp2-asm.S

patching file arch/ppc/power/swsusp2.c

patching file arch/ppc/power/swsusp2-copyback.S

patching file Documentation/kernel-parameters.txt

patching file Documentation/power/swsusp2.txt

patching file drivers/acpi/osl.c

patching file drivers/acpi/sleep/proc.c

patching file drivers/base/power/resume.c

patching file drivers/block/ll_rw_blk.c

patching file drivers/block/loop.c

patching file drivers/char/hvc_console.c

patching file drivers/char/keyboard.c

Hunk #2 FAILED at 42.

Hunk #3 succeeded at 1104 (offset 28 lines).

1 out of 3 hunks FAILED -- saving rejects to file drivers/char/keyboard.c.rej

patching file drivers/char/n_tty.c

Hunk #2 succeeded at 1212 (offset 22 lines).

Hunk #3 succeeded at 1267 (offset 22 lines).

patching file drivers/char/tty_io.c

patching file drivers/char/vt.c

Hunk #1 succeeded at 154 (offset 4 lines).

Hunk #2 succeeded at 556 (offset 4 lines).

Hunk #3 succeeded at 890 (offset 1 line).

Hunk #4 succeeded at 917 (offset 1 line).

Hunk #5 succeeded at 1434 (offset 3 lines).

Hunk #6 succeeded at 1929 (offset 4 lines).

Hunk #7 succeeded at 2071 (offset 5 lines).

patching file drivers/ide/ide.c

patching file drivers/ieee1394/nodemgr.c

patching file drivers/input/serio/serio.c

patching file drivers/macintosh/Kconfig

patching file drivers/macintosh/via-pmu.c

patching file drivers/md/dm-crypt.c

patching file drivers/md/md.c

patching file drivers/media/video/msp3400.c

patching file drivers/media/video/tvaudio.c

patching file drivers/message/i2o/i2o_block.c

patching file drivers/message/i2o/i2o_core.c

patching file drivers/mtd/mtdblock.c

patching file drivers/net/irda/sir_kthread.c

patching file drivers/net/wan/sdlamain.c

patching file drivers/parport/ieee1284.c

patching file drivers/pcmcia/cs.c

patching file drivers/pnp/pnpbios/core.c

patching file drivers/s390/cio/device.c

patching file drivers/scsi/scsi_error.c

patching file drivers/serial/8250.c

Hunk #1 succeeded at 63 (offset 13 lines).

Hunk #2 succeeded at 840 (offset 13 lines).

Hunk #3 succeeded at 1003 (offset 25 lines).

patching file drivers/usb/core/hub.c

patching file drivers/usb/storage/usb.c

patching file drivers/video/console/fbcon.c

Hunk #1 succeeded at 1270 (offset 74 lines).

patching file fs/aio.c

patching file fs/buffer.c

patching file fs/dcache.c

patching file fs/devfs/base.c

patching file fs/exec.c

patching file fs/fcntl.c

patching file fs/jbd/journal.c

patching file fs/jffs/intrep.c

patching file fs/jffs2/background.c

patching file fs/jfs/jfs_logmgr.c

patching file fs/jfs/jfs_txnmgr.c

patching file fs/lockd/clntlock.c

patching file fs/lockd/clntproc.c

patching file fs/lockd/svc.c

patching file fs/locks.c

patching file fs/namei.c

patching file fs/namespace.c

Hunk #4 succeeded at 974 (offset 9 lines).

Hunk #5 succeeded at 1009 (offset 9 lines).

Hunk #6 succeeded at 1102 (offset 9 lines).

Hunk #7 succeeded at 1184 (offset 9 lines).

patching file fs/nfsd/nfssvc.c

patching file fs/open.c

patching file fs/pipe.c

patching file fs/proc/generic.c

patching file fs/proc/kmsg.c

patching file fs/read_write.c

patching file fs/reiserfs/journal.c

patching file fs/select.c

patching file fs/stat.c

patching file fs/super.c

Hunk #2 succeeded at 453 (offset 3 lines).

Hunk #3 succeeded at 471 (offset 3 lines).

patching file fs/sysfs/file.c

patching file fs/xfs/linux-2.6/xfs_buf.c

patching file fs/xfs/linux-2.6/xfs_super.c

patching file include/asm-i386/cpufeature.h

patching file include/asm-i386/mtrr.h

patching file include/asm-i386/suspend.h

patching file include/asm-i386/tlbflush.h

patching file include/asm-ppc/suspend.h

patching file include/linux/kthread.h

patching file include/linux/sched.h

patching file include/linux/suspend1.h

patching file include/linux/suspend.h

patching file include/linux/suspend-version-specific.h

patching file include/linux/workqueue.h

patching file init/do_mounts.c

patching file kernel/exit.c

Hunk #1 succeeded at 32 (offset 3 lines).

Hunk #2 succeeded at 773 (offset 3 lines).

Hunk #3 succeeded at 783 (offset 3 lines).

Hunk #4 succeeded at 1108 (offset 10 lines).

Hunk #5 succeeded at 1177 (offset 10 lines).

patching file kernel/fork.c

patching file kernel/kmod.c

patching file kernel/kthread.c

patching file kernel/module.c

patching file kernel/panic.c

patching file kernel/power/console.c

patching file kernel/power/disk.c

patching file kernel/power/Kconfig

patching file kernel/power/main.c

patching file kernel/power/Makefile

patching file kernel/power/pmdisk.c

patching file kernel/power/process.c

patching file kernel/power/swsusp.c

patching file kernel/sched.c

patching file kernel/softirq.c

patching file kernel/stop_machine.c

patching file kernel/sys.c

patching file kernel/workqueue.c

patching file mm/bootmem.c

patching file mm/filemap.c

patching file mm/highmem.c

patching file mm/oom_kill.c

patching file mm/page_alloc.c

patching file mm/page-writeback.c

patching file mm/pdflush.c

patching file mm/swapfile.c

Hunk #1 succeeded at 33 (offset 4 lines).

Hunk #2 succeeded at 197 (offset 4 lines).

Hunk #3 succeeded at 276 (offset 4 lines).

patching file mm/vmscan.c

patching file net/bluetooth/bnep/core.c

patching file net/bluetooth/rfcomm/core.c

patching file net/socket.c

patching file net/sunrpc/sched.c

patching file net/sunrpc/svcsock.c

patching file include/linux/suspend-common.h

patching file include/linux/suspend-debug.h

patching file include/linux/suspend.h

patching file kernel/power/Changelog

patching file kernel/power/gzipcompress.c

patching file kernel/power/Internals

patching file kernel/power/io.c

patching file kernel/power/lzf/lzf_c.c

patching file kernel/power/lzf/lzf_d.c

patching file kernel/power/lzfcompress.c

patching file kernel/power/memory_pool.c

patching file kernel/power/nulltransformer.c

patching file kernel/power/nullwriter.c

patching file kernel/power/pagedir.c

patching file kernel/power/prepare_image.c

patching file kernel/power/proc.c

patching file kernel/power/process.c

patching file kernel/power/range.c

patching file kernel/power/swapwriter.c

patching file kernel/power/swsusp2.c

patching file kernel/power/Todo

patching file kernel/power/ui.c

patching file Documentation/power/internals.txt

patching file Documentation/power/todo.txt

patching file include/linux/suspend-common.h

patching file include/linux/suspend-debug.h

patching file include/linux/suspend.h

patching file include/linux/suspend-utility.h

patching file kernel/power/gzipcompress.c

patching file kernel/power/Internals

patching file kernel/power/io.c

patching file kernel/power/lzf/lzf_c.c

patching file kernel/power/lzf/lzf_d.c

patching file kernel/power/lzfcompress.c

patching file kernel/power/memory_pool.c

patching file kernel/power/nfswriter.c

patching file kernel/power/nulltransformer.c

patching file kernel/power/nullwriter.c

patching file kernel/power/pagedir.c

patching file kernel/power/prepare_image.c

patching file kernel/power/proc.c

patching file kernel/power/process.c

patching file kernel/power/range.c

patching file kernel/power/suspend2.c

patching file kernel/power/swapwriter.c

patching file kernel/power/swsusp2.c

patching file kernel/power/Todo

patching file kernel/power/ui.c

patching file kernel/power/utility.c

```

and when i try to compile the kernel whit swsusp2 support

```
  CC      arch/x86_64/kernel/suspend.o

arch/x86_64/kernel/suspend.c: In Funktion >>save_processor_state<<:

arch/x86_64/kernel/suspend.c:40: Warnung: implicit declaration of function `kernel_fpu_begin'

arch/x86_64/kernel/suspend.c:45: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:46: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:47: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:48: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:55: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:56: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:57: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:58: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:59: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:61: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:62: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:63: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:68: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:69: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:70: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:71: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c: In Funktion >>do_fpu_end<<:

arch/x86_64/kernel/suspend.c:79: Warnung: implicit declaration of function `kernel_fpu_end'

arch/x86_64/kernel/suspend.c:80: Warnung: implicit declaration of function `mxcsr_feature_mask_init'

arch/x86_64/kernel/suspend.c: In Funktion >>restore_processor_state<<:

arch/x86_64/kernel/suspend.c:88: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:89: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:90: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:91: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:96: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:97: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:98: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:99: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:100: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:102: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:102: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:103: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:103: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:104: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:104: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:110: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:111: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:112: error: invalid use of undefined type `struct saved_context'

arch/x86_64/kernel/suspend.c:114: Warnung: implicit declaration of function `fix_processor_context'

arch/x86_64/kernel/suspend.c: Auf h?chster Ebene:

arch/x86_64/kernel/suspend.c:120: Warnung: type mismatch with previous implicit declaration

arch/x86_64/kernel/suspend.c:114: Warnung: previous implicit declaration of `fix_processor_context'

arch/x86_64/kernel/suspend.c:120: Warnung: >>fix_processor_context<< wurde bereits implizit deklariert, >>int<< zur?ckzugeben

arch/x86_64/kernel/suspend.c: In Funktion >>fix_processor_context<<:

arch/x86_64/kernel/suspend.c:124: Warnung: implicit declaration of function `set_tss_desc'

arch/x86_64/kernel/suspend.c:126: error: `cpu_gdt_table' undeclared (first use in this function)

arch/x86_64/kernel/suspend.c:126: error: (Each undeclared identifier is reported only once

arch/x86_64/kernel/suspend.c:126: error: for each function it appears in.)

arch/x86_64/kernel/suspend.c:129: Warnung: implicit declaration of function `load_TR_desc'

arch/x86_64/kernel/suspend.c:130: Warnung: implicit declaration of function `load_LDT'

arch/x86_64/kernel/suspend.c:136: Warnung: implicit declaration of function `loaddebug'

arch/x86_64/kernel/suspend.c: Auf h?chster Ebene:

arch/x86_64/kernel/suspend.c:30: error: storage size of `saved_context' isn't known

make[1]: *** [arch/x86_64/kernel/suspend.o] Fehler 1

make: *** [arch/x86_64/kernel] Fehler 2
```

any suggestions about this? thanks for your help

----------

## phranzee

is it possible to store the image on other partition than swap (fat32/ext3) ?

tia  :Smile: 

----------

## zmedico

 *tuxlover wrote:*   

> I had the impression that Jerrac's problem is not related to using swsusp at all, he's just rebooting with the new kernel...?

 

If that's the case, assuming that the problem is not with the bootloader itself, then Jerrac's new kernel is off to a bad start  :Wink:    If bootsplash is enabled it can prevent the user from seeing an error message during such a boot time hang.  In that case I recommend to disable bootsplash.

 *stefanpropehan wrote:*   

> I get the following patch result when i patch the kernel described in the post of zmedico

 

In my post I used the plain sources from kernel.org rather than gentoo-dev-sources.  The patches apply cleanly to the plain kernel.org sources.  If you want some of the gentoo-dev-sources patches also then you can extract them from the genpatches-* tarballs in your distfiles directory and pick out the ones you want that are not redundant.

 *phranzee wrote:*   

> is it possible to store the image on other partition than swap (fat32/ext3) ?
> 
> tia 

 

That feature does not currently exist to my knowledge.  Swsusp currently must use a swap partition that identified using a kernel parameter from the boot loader.

----------

## Jerrac

 *zmedico wrote:*   

>  *tuxlover wrote:*   I had the impression that Jerrac's problem is not related to using swsusp at all, he's just rebooting with the new kernel...? 
> 
> If that's the case, assuming that the problem is not with the bootloader itself, then Jerrac's new kernel is off to a bad start    If bootsplash is enabled it can prevent the user from seeing an error message during such a boot time hang.  In that case I recommend to remove the initrd from the kernel parameters (if possibe, or otherwise remove the boosplash images from the initrd) and thereby disable bootsplash.
> 
> 

 

Heh, as far as I know, I do not have bootsplash enabled. It is just a plain kernel, no initrd. Configured the manual way in the manual. lol that sounded strange... Could the "resume2" line in Lilo cause problems?

my lilo.conf entry for the the problem kernel:

 *Quote:*   

> 
> 
> image=/boot/2.6.6-david2
> 
>         label=linux-2.6.6
> ...

 

----------

## zmedico

 *Jerrac wrote:*   

> Could the "resume2" line in Lilo cause problems?

 

Maybe it could, it's unlikely if your using the same parameters as before though.  I use the grub bootloader which makes it easy to edit the kernel parameters before boot, plus it doesn't have to be reinstalled in the boot sector every time something changes.  If that kernel bzImage just doesn't boot and has no error message I suppose you'll have to build another one.

----------

## phranzee

@zmedico: thanks

how big swap partition should i create for 512MB ram (LZF compression) ?

 *Quote:*   

> Newer versions of nVidia's driver, or using a 2.6 kernel causes swsusp2 to fail.

  is above statement really true ?

----------

## zmedico

I use a 1 GB swap partition with my 512 megabytes of ram and that seems sufficient.  You need more or less depending on how many programs you want to survive the suspend/resume cycle.

 *Quote:*   

>  You must have a swap partition on your disk. This swap partition should be at least 30% larger than your RAM (this is a rough estimation: it depends on the number of applications you suspend and their memory consumption).

 

I have an nvidia video card and it works fine with the gpl nv driver (I don't play 3D games much but duke3d works well).  I haven't tainted my kernel with any binary drivers so I can't comment on those but I know people have reported problems.

----------

## dan2003

 *tuxlover wrote:*   

>  *dan2003 wrote:*   I'm a tad confused.. This is different to suspend-to-disk yes? 
> 
> swsusp2 is a complete rewrite of swsusp(1), the old software suspend of the linux kernel. As already mentioned, you might have a vendor-specific swsusp in your laptop already (although unlikely because uncommon today).

 

I'm unsure what is being used, but it certainly isn't swsusp2. My laptop is an nx9005 and i do not think it has the mentioned vendor-specific hibernating functions.

 *tuxlover wrote:*   

>  *dan2003 wrote:*   with Dri disabled X comes back and the clock is ticking over (i have seconds visible in kde) 
> 
> What do you mean by "ticking over"? Is it too fast, or too slow? There are some options for taking care of clock/time problems in /etc/sysconfig/suspend.conf. Take a look at them.

 

Sorry if that was unclear. What i meant is that i could see the system had not locked up entirly cos the clock on the taskbar was still being updated.

 *tuxlover wrote:*   

>  *dan2003 wrote:*    but the mouse and kbd dont work (interesting how the usb optical mouse does light back up now tho - it wouldnt do that without reloading ohci-hcd earlier). 
> 
> My experience shows that simply making hotplug restart (also described in my howto) makes mouse and keyboard work.

 

As the system i was using to suspend ("echo 4 > /proc/acpi/sleep" or hierbante from the klaptop menu in kde) doesnt seem to run any script i am unable to do this. However it appears there is now a swsusp2 patch for 2.6.7 so i will be giving this a try.

 *tuxlover wrote:*   

>  *dan2003 wrote:*   so i'm left thinking it must be Xorg 
> 
> swsusp2 should work with Xorg (I use it, too).

 [/quote]

It will be interesting to see what happens with swsusp2.

----------

## dan2003

Wow.. It works.

A couple of things need some work,

1) ACPI or KLaptop deamon, not sure which but it comes back up thinking im runing on battery and have only 3 or 6 or so mins remaining tho it knows that battery is 100% charged.

root@TT dan # cat /proc/acpi/ac_adapter/ACAD/state

state:                   on-line

I guess its klaptop that gets confused..

2) i need to look at the sound stuff as it comes back non functional..

Apart from that bravo!!

Pressing enter to off time ~15 seconds

Enter at grub prompt to usable desktop ~ 20 secs, can't complain about that.

Also gonna have to hak klaptop so its acpi suspend features work with sysusp2 instead  :Smile: 

----------

## dan2003

Oh yeah, i forgot to mention this implementation doesn't get on with DRI enbabled either, I guess its the not quite there yet IGP320M stuff..

----------

## srejbi

hello,

first, great thanks on the howto, i've managed to set up suspend and resume following the steps on my thinkpad t40 using development-sources-2.6.7.   :Very Happy: 

everything (usb, sound, wlan, bluetooth, etc.) is working fine, except one annoying problem: KDE exits on suspend and i get an X login screen upon resume. other window managers suspend and resume fine (at least tried blackbox and gnome)...   :Confused: 

i have posted my problem with my /etc/suspend.conf at https://forums.gentoo.org/viewtopic.php?p=1282944. 

anyone has experienced similar problems (i have found no posts matching)?   :Shocked: 

i will try upgrading my KDE from 3.2.2 to 3.2.3....   :Rolling Eyes: 

----------

## RoundsToZero

When I try to suspend, it resumes right away.  The problem is that it can't remove the usbcore module.  I've tried manually unloading all the other usb stuff, but usbcore still won't unload, saying that it's in use.  What do I do?

----------

## zmedico

 *RoundsToZero wrote:*   

> remove the usbcore module

 

When I stop hotplug it removes all of my usb modules.  If you put hotplug in the SWSUSP_RESTART_SERVICES variable in /etc/suspend conf that might do the job (it works for me).   *Quote:*   

> usbcore                98080  6 uhci_hcd,ehci_hcd,usb_storage,ohci_hcd

 

I have to make sure I unmount any usb storage devices before I stop hotplug otherwise I get an oops.  Do you have any usb devices attached?

 *srejbi wrote:*   

> KDE exits on suspend and i get an X login screen upon resume.

 

KDE 3.2.3 works fine for me.  Maybe it's a memory issue.  Swsusp will kill programs if it thinks it will run out of space on the swap partition.

----------

## RoundsToZero

I don't have any usb storage devices attached, and I can unload usb-storage just fine.  I don't have hotplug installed either.  Weird...  Only thing I can think of that might be using it is the "USB File System" that Gentoo says gets mounted on normal boots.  The usbcore module will always be loaded by the time I log in for the first time, without any other usb modules loaded (b44--my NIC driver--and usbcore are the only ones) and its not in the modules.autoload.d/kernel-2.6 file either.

----------

## zmedico

Maybe this will work (it just worked on mine):

before suspend:

```
umount /proc/bus/usb

modprobe -r usb_storage uhci_hcd ehci_hcd ohci_hcd usbcore
```

after resume:

```
modprobe usbcore

mount -t usbfs usbfs /proc/bus/usb
```

I got the mount info by doing "cat /proc/mounts | grep usb".

----------

## srejbi

 *zmedico wrote:*   

> KDE 3.2.3 works fine for me. Maybe it's a memory issue. Swsusp will kill programs if it thinks it will run out of space on the swap partition.

 

thanks, i'm still emerging KDE 3.2.3 ... will post once tested.

BTW: i have 768M RAM and my swap for suspend (i use a separate swapspace for normal operation) is over 1.5 G.

----------

## srejbi

upgrading to KDE 3.2.3 solved the problem of exiting the KDE session; my system suspends/resumes perfectly...  :Very Happy:  yeeehaaa!

----------

## aloha99

 *srejbi wrote:*   

> hello,
> 
> first, great thanks on the howto, i've managed to set up suspend and resume following the steps on my thinkpad t40 using development-sources-2.6.7.  
> 
> 

 

Congrats on getting it to work.  I've been watching your progress with some interest because it relates to my problem.  I have an IBM T30, and I have the ACPI/kernel-supported suspend-to-RAM working, except the backlight stays on.  I realize it may be a separate issue, but before I invest the time to make swsusp2 work on my 2.6.7-r6 kernel, have you had this problem on your T40?  Does your backlight turn off?

Thanks!

----------

## zmedico

 *aloha99 wrote:*   

>  suspend-to-RAM working, except the backlight stays on.

 

That backlight should not be an issue if you use swsusp because swsusp uses zero power in hibernation.  It's essentially a full shutdown except that the previous state can be resumed from the disk swap partition.  The problem you're experiencing is in the acpi subsystem (and backlight driver or lack thereof) which swsusp2 does not depend on (swsusp2 does not require any firmware or hardware power management support).

----------

## aloha99

zmedico : thanks!

----------

## srejbi

 *aloha99 wrote:*   

> have you had this problem on your T40?  Does your backlight turn off?

 

no such problem, backlight goes off when swsusp2 powers off the machine. it must be a separate issue; i suppose you have been experimenting with apm suspend-to-ram?

 *aloha99 wrote:*   

> before I invest the time to make swsusp2 work on my 2.6.7-r6 kernel

 

for getting swsusp2 to work i suggest you go with development-sources-2.6.7: the gentoo-dev-sources are patched so that the swsusp patch was not able to update all neccessary files. i was lazy to dig into it myself so just went for the vanilla sources... it worked like a charm.

----------

## aloha99

 *srejbi wrote:*   

> no such problem, backlight goes off when swsusp2 powers off the machine. it must be a separate issue; i suppose you have been experimenting with apm suspend-to-ram?

 

Yes, suspend-to-RAM works perfectly well with APM, but I prefer ACPI for other reasons.

 *Quote:*   

>  for getting swsusp2 to work i suggest you go with development-sources-2.6.7: the gentoo-dev-sources are patched so that the swsusp patch was not able to update all neccessary files. i was lazy to dig into it myself so just went for the vanilla sources... it worked like a charm.

 

Thanks for the advice.  Check out this thread on using swsusp2 and 2.67, including gentoo-dev-sources:

https://forums.gentoo.org/viewtopic.php?p=1290805#1290805[/quote]

----------

## neuron

for the backlight search for scripts with "radeontool light off" or make one yourself  :Smile: 

----------

## tuxlover

Updated howto: Edited "kernel patching section" for kernels >= 2.4.26 and >=2.6.6. If you have problems patching, read this.

I finally managed to patch my vanilla-2.6.7 myself  :Smile:  thanks to the thread posted by aloha99 (thanks!).

----------

## aloha99

 *neuron wrote:*   

> for the backlight search for scripts with "radeontool light off" or make one yourself 

 

I didn't even know radeontool existed ... thanks!!!

----------

## loony

Hi!

I just patched the kernel and tried to compile it and got the following error:

  CC      kernel/power/swapwriter.o

kernel/power/swapwriter.c:14:23: linux/kdb.h: No such file or directory

make[2]: *** [kernel/power/swapwriter.o] Error 1

make[1]: *** [kernel/power] Error 2

make: *** [kernel] Error 2

Did anybody have similar problems?

loony

----------

## zmedico

The include/linux/kdb.h header file should be created by one of the swsusp2 patches.  You must have patched it wrong.  Lots of people have that problem.    There's a thread about that here:

https://forums.gentoo.org/viewtopic.php?p=1290805

----------

## RoundsToZero

For me, applying the 10 series patch as well as the 20's and 30's made it work.

----------

## dan_a

Editing swapwriter.c worked for me.

```
vi +14 kernel/power/swapwriter.c
```

and edit the line that says 

```
#include <linux/kdb.h>
```

to say

```
// #include <linux/kdb.h>
```

(I think kdb is the kernel debugger; if you're not a kernel hacker you probably won't use it anyway.)

----------

## rlz

everything seems to work fine for me and it says resuming and loads the file but once its loaded the screen just goes black.  has anyone else had these problems or know what causes it ?

----------

## pjv

Can I expect problems with ReiserFS?

Does the option GrubMenuFile know that it needs to mount my boot partition (/dev/hda6) first before it can write to /boot/grub/menu.lst?

Thx

----------

## tuxlover

No problems at all with reiserfs and swsusp2 here.

----------

## Nuuul

Tried the new patch 2.0.0.100, but it fails at resuming: hangs at cleaning up    :Shocked: 

Solved: had to unload the Prism54 module before suspending   :Rolling Eyes: 

----------

## tuxlover

Anybody tried the new suspend script? It jumped from v0.18 to 0.94   :Shocked:  Have I been living in a hole? The project also moved from sourceforge to berlios, their new url is http://softwaresuspend.berlios.de/

The configuration file is totally different now...  A question I have: (didn't find an answer on the swsusp2 webpage)

How do you do remounting? The option "Remount" doesn't work. (I solved it through "OnResume 20 mount /mnt/c")

I guess I will update the how-to for the new hibernate/suspend script and configuration soon.Last edited by tuxlover on Sun Jul 18, 2004 1:59 pm; edited 1 time in total

----------

## tomthewombat

nVidia and SWSUSP2 Howto:

http://softwaresuspend.berlios.de/wiki/Nvidia

Yes, it really works!!

----------

## tuxlover

Due to the recent changes to the config files and patch process I made some

Updates to the howto:Changed configuration section for the new configuration file format (/etc/hibernate/hibernate.conf)

Added "Links" section, with link to howto: swsusp with nvidia drivers

Changed urls to point to new swsusp homepage

----------

## Drako'99

I'm currently running with a swsusp 2.0.0.100 patched kernel and I still have little problems caused by the ATI and the fglrx module.

I wanted to know if someone managed to hibernate from a X environment ?  :Rolling Eyes: 

At this time I stop the xdm service and remove the fglrx module before hibernate and restart the service and load the module at startup.

It's great to be able to do a suspend-to-disk under Linux  :Cool: 

PS: hardware -> Dell Inspiron 8600 w/ ATI M10.

EDIT : M11 -> M10Last edited by Drako'99 on Wed Jul 21, 2004 6:39 pm; edited 1 time in total

----------

## tuxlover

 *Drako'99 wrote:*   

> I wanted to know if someone managed to hibernate from a X environment ?

 

There is no problem with X and swsusp. The problem lies in nvidia's and ati's drivers as far as I know.

I'm using the radeon m9 with 3d acceleration from DRI and swsusp is working flawlessly. I just read there that the radeon m10+'s 3d acceleration isn't yet supported, however.

----------

## Drako'99

 *tuxlover wrote:*   

> I just read there that the radeon m10+'s 3d acceleration isn't yet supported, however.

 

I knew that ATI drivers were problematic, but I wanted to be sure.

However, thank you for your answer  :Wink: 

Other thing, that's not a M11 but a M10...

----------

## Kraymer

 *tuxlover wrote:*   

> 
> 
> ```
> %wheel ALL=NOPASSWD: /usr/local/sbin/hibernate
> ```
> ...

 

Yeah, that was my intention too. Hibernation must be doable by user to make it accessable by hotkeys and such   :Cool: 

My problem is.. it doesn't really work.

It's a problem with bootsplash. Unfortunately, the Bootsplash-On-Option didn't work for me, I got text output which is really bad for me as I'm very used to my bootsplash  :Wink:  The (working) solution was taken from the swsusp2-FAQ, a manual call to /sbin/splash. The problem is that sudo doesn't transfer root-rights to OnSuspend/OnResume-calls. 

Does anyone have a solution for it except suid-root?

Sebastian

edit: moahh.. one moment of stupidity  :Embarassed:  of course, following did the trick:

```
# Hibernation without PWD :-)

%wheel ALL = NOPASSWD: /usr/local/sbin/hibernate

%wheel ALL = NOPASSWD: /sbin/splash

```

----------

## aloha99

I finally did the update, using several patches against gentoo-dev-sources 2.6.7-r11, plus the hibernate script [EDIT] ver. 2.0.0.100 [/EDIT], all works very well, plus acpi-based power button trigger.  GREAT JOB, TUXLOVER!

FWIW, on my IBM T30 with ATI Radeon 7500 Mobility (M7), so far *everything* works ... okay, haven't tested everything, but I did say "so far"  :Wink: 

Suspends in less than 15 seconds, resumes in 32 seconds from push of button.

BTW, I also referred to this thread: https://forums.gentoo.org/viewtopic.php?p=1290805 which also has helpful info on how to manually patch your kernel in case of errors.

Thanks!Last edited by aloha99 on Tue Jul 27, 2004 4:43 am; edited 1 time in total

----------

## tuxlover

Once again, another update of the howto: Added section: Tips & Tricks.

 *smash032 wrote:*   

> 
> 
> ```
> # Hibernation without PWD :-)
> 
> ...

 

Thanks! I added that. Have you tried acpid to initiate software suspend? Does your bootsplash work then? (acpid runs with root priviliges)

 *aloha99 wrote:*   

> GREAT JOB, TUXLOVER!

   :Smile:  Thanks! I added your kernel patching link as well.

 *Quote:*   

> plus the hibernate script ver. 2.0.0.200-for-2.6.7

  I guess this was supposed to read 2.0.0.100...?

By the way... What do you guys think about turning this howto into a wiki? Preferrably at http://softwaresuspend.berlios.de/wiki ?

----------

## Kraymer

 *tuxlover wrote:*   

> 
> 
>  *smash032 wrote:*   
> 
> ```
> ...

 

No, didn't that yet. I've done a keyboard-shortcut to call hibernate. My power button still triggers a regular shutdown and I think I'll leave it that way. But it doesn't matter, the sudoers-changes do work. There was an error in dmesg from hibernate-script but in fact it works  :Smile: 

 *tuxlover wrote:*   

> 
> 
> By the way... What do you guys think about turning this howto into a wiki? Preferrably at http://softwaresuspend.berlios.de/wiki ?

 

Actually, already thought about that. But I'm kinda busy and unfortunately not familiar with wiki-syntax  :Sad:    But it's a great idea. Many users (not only gentoo-ists *g) would benefit.. Maybe if time passes by and noone else does it, I could..

----------

## dimfox2

Hi, I used swsusp for about two weeks, on my newly installed gentoo. It works fine (can't resume into X though, haven't tried the new trick for nvidia). But I begin to have a problem these two days: it suspends fine, but when resumes the computer becomes very, very slow, probably take 3 seconds to see a reaction, e.g. the letter you typed displayed, or using alt+Fn to switch between consoles. And this is not under X. I don't know if this has anything to do with I close the lid before it totaly shut down when suspending.

Here's the log (sorry for the lengthy post)  :Embarassed: 

[code:1:276ea9f9a1]

Jul 25 18:59:26 dimtux Software Suspend 2.0.0.96: Initiating a software_suspend cycle.

Jul 25 18:59:53 dimtux Debug: sleeping function called from invalid context at include/asm/semaphore.h:145

Jul 25 18:59:53 dimtux in_atomic():1, irqs_disabled():1

Jul 25 18:59:53 dimtux [<c011b5e4>] __might_sleep+0xb2/0xd3

Jul 25 18:59:53 dimtux [<c0106aa0>] common_interrupt+0x18/0x20

Jul 25 18:59:53 dimtux [<c0219ee7>] tty_write+0xd7/0x300

Jul 25 18:59:53 dimtux [<c021fbc4>] write_chan+0x0/0x21a

Jul 25 18:59:53 dimtux [<c021a110>] redirected_tty_write+0x0/0xe1

Jul 25 18:59:53 dimtux [<c0164feb>] vfs_write+0xb0/0x119

Jul 25 18:59:53 dimtux [<c01650f9>] sys_write+0x42/0x63

Jul 25 18:59:53 dimtux [<c01381e5>] move_cursor_to+0x51/0x75

Jul 25 18:59:53 dimtux [<c0138e9c>] update_status+0x366/0x3fb

Jul 25 18:59:53 dimtux [<c0141771>] save_image_part1+0x26/0x1ba

Jul 25 18:59:53 dimtux [<c0141c68>] do_suspend2_suspend_2+0x8/0x34

Jul 25 18:59:53 dimtux [<c028cbc8>] do_suspend2_lowlevel+0x269/0x8a5

Jul 25 18:59:53 dimtux [<c01416fa>] save_image+0xc0/0x111

Jul 25 18:59:53 dimtux [<c01424f1>] software_suspend_pending+0x249/0x25f

Jul 25 18:59:53 dimtux [<c0196a93>] proc_file_write+0x0/0x42

Jul 25 18:59:53 dimtux [<c01405b6>] proc_software_suspend_pending+0x5/0xa

Jul 25 18:59:53 dimtux [<c0196aca>] proc_file_write+0x37/0x42

Jul 25 18:59:53 dimtux [<c0164feb>] vfs_write+0xb0/0x119

Jul 25 18:59:53 dimtux [<c016459b>] filp_close+0x59/0x86

Jul 25 18:59:53 dimtux [<c01650f9>] sys_write+0x42/0x63

Jul 25 18:59:53 dimtux [<c0106133>] syscall_call+0x7/0xb

Jul 25 18:59:53 dimtux 

Jul 25 18:59:53 dimtux PCI: Setting latency timer of device 0000:00:1d.0 to 64

Jul 25 18:59:53 dimtux PCI: Setting latency timer of device 0000:00:1d.1 to 64

Jul 25 18:59:53 dimtux PCI: Setting latency timer of device 0000:00:1d.2 to 64

Jul 25 18:59:53 dimtux PCI: Setting latency timer of device 0000:00:1d.7 to 64

Jul 25 18:59:53 dimtux PCI: Setting latency timer of device 0000:00:1f.5 to 64

Jul 25 18:59:53 dimtux PCI: Setting latency timer of device 0000:00:1f.6 to 64

Jul 25 18:59:53 dimtux Please include the following information in bug reports:

Jul 25 18:59:53 dimtux - SWSUSP core    : 2.0.0.96

Jul 25 18:59:53 dimtux - Kernel Version : 2.6.7

Jul 25 18:59:53 dimtux - Version spec.  : 2.0.1

Jul 25 18:59:53 dimtux - Compiler vers. : 3.3

Jul 25 18:59:53 dimtux - Modules loaded : 

Jul 25 18:59:53 dimtux - Attempt number : 1

Jul 25 18:59:53 dimtux - Pageset sizes  : 17624 and 71885 (71885 low).

Jul 25 18:59:53 dimtux - Parameters     : 0 0 0 32

Jul 25 18:59:53 dimtux - Calculations   : Image size: 89660. Ram to suspend: 1073.

Jul 25 18:59:53 dimtux - Limits         : 130928 pages RAM. Initial boot: 127682.

Jul 25 18:59:53 dimtux - Overall expected compression percentage: 0.

Jul 25 18:59:53 dimtux - Swapwriter active.

Jul 25 18:59:53 dimtux Swap available for image: 89509.

Jul 25 18:59:53 dimtux - LZF Compressor enabled.

Jul 25 18:59:53 dimtux Compressed 366628864 bytes into 248587610 (32 percent compression).

Jul 25 18:59:53 dimtux - Preemptive kernel.

Jul 25 18:59:53 dimtux - SMP kernel.

Jul 25 18:59:53 dimtux - Max ranges used: 50571 ranges in 149 pages.

Jul 25 18:59:53 dimtux - I/O speed: Write 22 MB/s, Read 23 MB/s.

Jul 25 20:27:28 dimtux NVRM: loading NVIDIA Linux x86 NVIDIA Kernel Module  1.0-6106  Wed Jun 23 08:14:01 PDT 2004

Jul 25 20:27:28 dimtux SCSI subsystem initialized

Jul 25 20:27:28 dimtux ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device

Jul 25 20:27:28 dimtux scsi0 : SCSI host adapter emulation for IDE ATAPI devices

Jul 25 20:27:28 dimtux Vendor: TEAC      Model: DW-224E           Rev: F.0A

Jul 25 20:27:28 dimtux Type:   CD-ROM                             ANSI SCSI revision: 02

Jul 25 20:27:28 dimtux scsi.agent[24987]: cdrom at /devices/pci0000:00/0000:00:1f.1/ide1/1.0/host0/0:0:0:0

Jul 25 20:27:29 dimtux sr0: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray

Jul 25 20:27:29 dimtux Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0

Jul 25 20:27:29 dimtux usbcore: registered new driver usbfs

Jul 25 20:27:29 dimtux usbcore: registered new driver hub

Jul 25 20:27:29 dimtux USB Universal Host Controller Interface driver v2.2

Jul 25 20:27:29 dimtux uhci_hcd 0000:00:1d.0: Intel Corp. 82801DB (ICH4) USB UHCI #1

Jul 25 20:27:29 dimtux PCI: Setting latency timer of device 0000:00:1d.0 to 64

Jul 25 20:27:29 dimtux uhci_hcd 0000:00:1d.0: irq 10, io base 00001800

Jul 25 20:27:29 dimtux uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 1

Jul 25 20:27:29 dimtux hub 1-0:1.0: USB hub found

Jul 25 20:27:29 dimtux hub 1-0:1.0: 2 ports detected

Jul 25 20:27:29 dimtux uhci_hcd 0000:00:1d.1: Intel Corp. 82801DB (ICH4) USB UHCI #2

Jul 25 20:27:29 dimtux PCI: Setting latency timer of device 0000:00:1d.1 to 64

Jul 25 20:27:29 dimtux uhci_hcd 0000:00:1d.1: irq 5, io base 00001820

Jul 25 20:27:29 dimtux uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 2

Jul 25 20:27:29 dimtux hub 2-0:1.0: USB hub found

Jul 25 20:27:29 dimtux hub 2-0:1.0: 2 ports detected

Jul 25 20:27:29 dimtux uhci_hcd 0000:00:1d.2: Intel Corp. 82801DB (ICH4) USB UHCI #3

Jul 25 20:27:30 dimtux PCI: Setting latency timer of device 0000:00:1d.2 to 64

Jul 25 20:27:30 dimtux uhci_hcd 0000:00:1d.2: irq 5, io base 00001840

Jul 25 20:27:30 dimtux uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 3

Jul 25 20:27:30 dimtux hub 3-0:1.0: USB hub found

Jul 25 20:27:30 dimtux hub 3-0:1.0: 2 ports detected

Jul 25 20:27:30 dimtux ehci_hcd 0000:00:1d.7: Intel Corp. 82801DB (ICH4) USB2 EHCI Controller

Jul 25 20:27:30 dimtux PCI: Setting latency timer of device 0000:00:1d.7 to 64

Jul 25 20:27:30 dimtux ehci_hcd 0000:00:1d.7: irq 5, pci mem e0f6e000

Jul 25 20:27:30 dimtux ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 4

Jul 25 20:27:30 dimtux PCI: cache line size of 128 is not supported by device 0000:00:1d.7

Jul 25 20:27:30 dimtux ehci_hcd 0000:00:1d.7: USB 2.0 enabled, EHCI 1.00, driver 2004-May-10

Jul 25 20:27:30 dimtux hub 4-0:1.0: USB hub found

Jul 25 20:27:30 dimtux hub 4-0:1.0: 6 ports detected

Jul 25 20:27:31 dimtux PCI: Setting latency timer of device 0000:00:1f.5 to 64

Jul 25 20:27:31 dimtux intel8x0_measure_ac97_clock: measured 49348 usecs

Jul 25 20:27:31 dimtux intel8x0: clocking to 48000

Jul 25 20:27:32 dimtux PCI: Setting latency timer of device 0000:00:1f.6 to 64

Jul 25 20:27:32 dimtux CRON[25634]: (root) CMD (rm -f /var/spool/cron/lastrun/cron.hourly)

Jul 25 20:27:32 dimtux CRON[25632]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 20:27:32 dimtux MC'97 1 converters and GPIO not ready (0xf200)

Jul 25 20:27:33 dimtux ohci1394: $Rev: 1223 $ Ben Collins <bcollins@debian.org>

Jul 25 20:27:33 dimtux ieee1394.agent[25715]: ... no drivers for IEEE1394 product 0x/0x/0x

Jul 25 20:27:33 dimtux ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[10]  MMIO=[d2004000-d20047ff]  Max Packet=[2048]

Jul 25 20:27:33 dimtux Linux Kernel Card Services

Jul 25 20:27:33 dimtux options:  [pci] [cardbus] [pm]

Jul 25 20:27:33 dimtux Yenta: CardBus bridge found at 0000:02:04.0 [1179:ff00]

Jul 25 20:27:33 dimtux Yenta: ISA IRQ mask 0x0898, PCI irq 10

Jul 25 20:27:33 dimtux Socket status: 30000006

Jul 25 20:27:33 dimtux Yenta: CardBus bridge found at 0000:02:04.1 [1179:ff00]

Jul 25 20:27:33 dimtux Yenta: ISA IRQ mask 0x0898, PCI irq 10

Jul 25 20:27:33 dimtux Socket status: 30000006

Jul 25 20:27:33 dimtux ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

Jul 25 20:27:33 dimtux ohci_hcd: block sizes: ed 64 td 64

Jul 25 20:27:34 dimtux ieee1394.agent[25842]: ... no drivers for IEEE1394 product 0x/0x/0x

Jul 25 20:27:34 dimtux ieee1394: Host added: ID:BUS[0-00:1023]  GUID[00023f332d003ec7]

Jul 25 20:27:34 dimtux rc-scripts: 'modprobe i82365' failed

Jul 25 20:27:34 dimtux rc-scripts: Trying alternative PCIC driver: yenta_socket

Jul 25 20:27:35 dimtux cardmgr[25895]: watching 2 sockets

Jul 25 20:27:35 dimtux cs: IO port probe 0x0c00-0x0cff: clean.

Jul 25 20:27:35 dimtux cs: IO port probe 0x0800-0x08ff: clean.

Jul 25 20:27:35 dimtux cs: IO port probe 0x0100-0x04ff: excluding 0x200-0x20f 0x378-0x37f 0x4d0-0x4d7

Jul 25 20:27:35 dimtux cs: IO port probe 0x0a00-0x0aff: clean.

Jul 25 20:27:35 dimtux cardmgr[25895]: starting, version is 3.2.5

Jul 25 20:27:35 dimtux eth0: link down

Jul 25 20:27:44 dimtux ifplugd[7159]: Executing '/usr/sbin/ifplugd.action eth0 down'.

Jul 25 20:27:44 dimtux dhcpcd[25910]: recvfrom: Network is down

Jul 25 20:27:44 dimtux dhcpcd[25910]: sendto: Network is down

Jul 25 20:27:44 dimtux rc-scripts: ERROR:  wrong args. (  eth0 / eth0 )

Jul 25 20:27:44 dimtux rc-scripts: Usage: net.eth0 { start|stop|restart }

Jul 25 20:27:44 dimtux rc-scripts:        net.eth0 without arguments for full help

Jul 25 20:27:44 dimtux ifplugd[7159]: Program executed successfully.

Jul 25 20:27:44 dimtux cdrom: open failed.

Jul 25 20:27:44 dimtux NTFS driver 2.1.14 [Flags: R/O MODULE].

Jul 25 20:27:44 dimtux NTFS volume version 3.1.

Jul 25 20:27:45 dimtux rc-scripts: WARNING:  "hotplug" has already been started.

Jul 25 20:27:45 dimtux rc-scripts: WARNING:  "pcmcia" has already been started.

Jul 25 20:27:51 dimtux atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

Jul 25 20:27:51 dimtux atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

Jul 25 20:27:54 dimtux (liuwei-26506): starting (version 2.6.0), pid 26506 user 'liuwei'

Jul 25 20:27:54 dimtux (liuwei-26506): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only config source at position 0

Jul 25 20:27:54 dimtux (liuwei-26506): Resolved address "xml:readwrite:/home/liuwei/.gconf" to a writable config source at position 1

Jul 25 20:27:54 dimtux (liuwei-26506): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only config source at position 2

Jul 25 20:30:00 dimtux CRON[26631]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 20:38:32 dimtux su(pam_unix)[26658]: session opened for user root by liuwei(uid=1000)

Jul 25 20:40:00 dimtux CRON[26683]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 20:40:10 dimtux sudo:   liuwei : TTY=pts/10 ; PWD=/home/liuwei ; USER=root ; COMMAND=/usr/local/sbin/dialup

Jul 25 20:40:11 dimtux codec_semaphore: semaphore is not ready [0x1][0x701300]

Jul 25 20:40:11 dimtux codec_write 1: semaphore is not ready for register 0x54

Jul 25 20:40:52 dimtux CSLIP: code copyright 1989 Regents of the University of California

Jul 25 20:40:52 dimtux PPP generic driver version 2.4.2

Jul 25 20:40:52 dimtux pppd[26736]: pppd 2.4.1 started by root, uid 0

Jul 25 20:40:52 dimtux pppd[26736]: Using interface ppp0

Jul 25 20:40:52 dimtux pppd[26736]: Connect: ppp0 <--> /dev/pts/11

Jul 25 20:40:53 dimtux PPP Deflate Compression module registered

Jul 25 20:40:53 dimtux pppd[26736]: local  IP address 128.104.54.143

Jul 25 20:40:53 dimtux pppd[26736]: remote IP address 128.104.52.2

Jul 25 20:40:53 dimtux pppd[26736]: primary   DNS address 144.92.104.20

Jul 25 20:40:53 dimtux pppd[26736]: secondary DNS address 144.92.9.22

Jul 25 20:45:35 dimtux (root-26915): starting (version 2.6.0), pid 26915 user 'root'

Jul 25 20:45:35 dimtux (root-26915): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only config source at position 0

Jul 25 20:45:35 dimtux (root-26915): Resolved address "xml:readwrite:/root/.gconf" to a writable config source at position 1

Jul 25 20:45:35 dimtux (root-26915): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only config source at position 2

Jul 25 20:48:06 dimtux su(pam_unix)[26954]: session opened for user root by liuwei(uid=1000)

Jul 25 20:49:05 dimtux (root-26915): GConf server is not in use, shutting down.

Jul 25 20:49:05 dimtux (root-26915): Exiting

Jul 25 20:50:00 dimtux CRON[27029]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 21:00:00 dimtux CRON[27081]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 21:00:00 dimtux CRON[27087]: (root) CMD (rm -f /var/spool/cron/lastrun/cron.hourly)

Jul 25 21:07:37 dimtux codec_semaphore: semaphore is not ready [0x1][0x701304]

Jul 25 21:07:37 dimtux codec_write 1: semaphore is not ready for register 0x54

Jul 25 21:07:37 dimtux pppd[26736]: Terminating on signal 15.

Jul 25 21:07:37 dimtux pppd[26736]: Hangup (SIGHUP)

Jul 25 21:07:37 dimtux pppd[26736]: ioctl(PPPIOCSASYNCMAP): Inappropriate ioctl for device(25)

Jul 25 21:07:37 dimtux pppd[26736]: tcflush failed: Input/output error

Jul 25 21:07:37 dimtux pppd[26736]: Exit.

Jul 25 21:10:00 dimtux CRON[27184]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 21:20:00 dimtux CRON[27201]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 21:30:00 dimtux CRON[27211]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 21:39:42 dimtux (liuwei-26506): Exiting

Jul 25 21:39:42 dimtux su(pam_unix)[26954]: session closed for user root

Jul 25 21:39:42 dimtux su(pam_unix)[26658]: session closed for user root

Jul 25 21:39:47 dimtux atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

Jul 25 21:39:47 dimtux atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

Jul 25 21:39:50 dimtux (liuwei-27306): starting (version 2.6.0), pid 27306 user 'liuwei'

Jul 25 21:39:50 dimtux (liuwei-27306): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only config source at position 0

Jul 25 21:39:50 dimtux (liuwei-27306): Resolved address "xml:readwrite:/home/liuwei/.gconf" to a writable config source at position 1

Jul 25 21:39:50 dimtux (liuwei-27306): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only config source at position 2

Jul 25 21:40:00 dimtux CRON[27418]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 21:43:31 dimtux su(pam_unix)[27539]: session opened for user root by liuwei(uid=1000)

Jul 25 21:50:00 dimtux CRON[27615]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 21:51:07 dimtux (root-27639): starting (version 2.6.0), pid 27639 user 'root'

Jul 25 21:51:07 dimtux (root-27639): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only config source at position 0

Jul 25 21:51:07 dimtux (root-27639): Resolved address "xml:readwrite:/root/.gconf" to a writable config source at position 1

Jul 25 21:51:07 dimtux (root-27639): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only config source at position 2

Jul 25 21:51:08 dimtux (root-27641): iid OAFIID:BrokenNoType:20000808 has a NULL type

Jul 25 21:51:08 dimtux (root-27641): invalid character '#' in iid 'OAFIID:This#!!%$iid%^$%_|~!OAFIID_ContainsBadChars'

Jul 25 21:53:32 dimtux su(pam_unix)[27648]: session opened for user root by liuwei(uid=1000)

Jul 25 22:00:00 dimtux CRON[27709]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 22:00:00 dimtux CRON[27712]: (root) CMD (rm -f /var/spool/cron/lastrun/cron.hourly)

Jul 25 22:03:28 dimtux (liuwei-27306): Exiting

Jul 25 22:03:28 dimtux su(pam_unix)[27648]: session closed for user root

Jul 25 22:03:28 dimtux su(pam_unix)[27539]: session closed for user root

Jul 25 22:03:33 dimtux atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

Jul 25 22:03:33 dimtux atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

Jul 25 22:03:36 dimtux (liuwei-27800): starting (version 2.6.0), pid 27800 user 'liuwei'

Jul 25 22:03:36 dimtux (liuwei-27800): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only config source at position 0

Jul 25 22:03:36 dimtux (liuwei-27800): Resolved address "xml:readwrite:/home/liuwei/.gconf" to a writable config source at position 1

Jul 25 22:03:36 dimtux (liuwei-27800): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only config source at position 2

Jul 25 22:03:37 dimtux (root-27639): GConf server is not in use, shutting down.

Jul 25 22:03:37 dimtux (root-27639): Exiting

Jul 25 22:05:39 dimtux su(pam_unix)[27926]: session opened for user root by liuwei(uid=1000)

Jul 25 22:06:03 dimtux (root-27933): starting (version 2.6.0), pid 27933 user 'root'

Jul 25 22:06:03 dimtux (root-27933): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only config source at position 0

Jul 25 22:06:03 dimtux (root-27933): Resolved address "xml:readwrite:/root/.gconf" to a writable config source at position 1

Jul 25 22:06:03 dimtux (root-27933): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only config source at position 2

Jul 25 22:06:53 dimtux (root-27641): iid OAFIID:BrokenNoType:20000808 has a NULL type

Jul 25 22:06:53 dimtux (root-27641): invalid character '#' in iid 'OAFIID:This#!!%$iid%^$%_|~!OAFIID_ContainsBadChars'

Jul 25 22:08:25 dimtux su(pam_unix)[27926]: session closed for user root

Jul 25 22:10:00 dimtux CRON[28006]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 22:14:08 dimtux su(pam_unix)[28023]: session opened for user root by liuwei(uid=1000)

Jul 25 22:14:56 dimtux sudo:   liuwei : TTY=pts/20 ; PWD=/home/liuwei ; USER=root ; COMMAND=/usr/local/sbin/dialup

Jul 25 22:14:56 dimtux codec_semaphore: semaphore is not ready [0x1][0x701300]

Jul 25 22:14:56 dimtux codec_write 1: semaphore is not ready for register 0x54

Jul 25 22:15:38 dimtux pppd[28076]: pppd 2.4.1 started by root, uid 0

Jul 25 22:15:38 dimtux pppd[28076]: Using interface ppp0

Jul 25 22:15:38 dimtux pppd[28076]: Connect: ppp0 <--> /dev/pts/21

Jul 25 22:15:38 dimtux pppd[28076]: local  IP address 128.104.50.168

Jul 25 22:15:38 dimtux pppd[28076]: remote IP address 128.104.48.2

Jul 25 22:15:38 dimtux pppd[28076]: primary   DNS address 144.92.104.20

Jul 25 22:15:38 dimtux pppd[28076]: secondary DNS address 144.92.9.22

Jul 25 22:16:45 dimtux codec_semaphore: semaphore is not ready [0x1][0x701300]

Jul 25 22:16:45 dimtux codec_write 1: semaphore is not ready for register 0x54

Jul 25 22:18:03 dimtux pppd[28076]: Terminating on signal 15.

Jul 25 22:18:03 dimtux pppd[28076]: Hangup (SIGHUP)

Jul 25 22:18:03 dimtux pppd[28076]: Modem hangup

Jul 25 22:18:03 dimtux pppd[28076]: Connection terminated.

Jul 25 22:18:03 dimtux pppd[28076]: Connect time 2.5 minutes.

Jul 25 22:18:03 dimtux pppd[28076]: Sent 10283 bytes, received 38166 bytes.

Jul 25 22:18:03 dimtux pppd[28076]: Exit.

Jul 25 22:18:52 dimtux sudo:   liuwei : TTY=pts/22 ; PWD=/home/liuwei ; USER=root ; COMMAND=/usr/local/sbin/dialup

Jul 25 22:18:53 dimtux codec_semaphore: semaphore is not ready [0x1][0x701300]

Jul 25 22:18:53 dimtux codec_write 1: semaphore is not ready for register 0x54

Jul 25 22:19:33 dimtux pppd[28246]: pppd 2.4.1 started by root, uid 0

Jul 25 22:19:33 dimtux pppd[28246]: Using interface ppp0

Jul 25 22:19:33 dimtux pppd[28246]: Connect: ppp0 <--> /dev/pts/23

Jul 25 22:19:34 dimtux pppd[28246]: local  IP address 128.104.50.172

Jul 25 22:19:34 dimtux pppd[28246]: remote IP address 128.104.48.2

Jul 25 22:19:34 dimtux pppd[28246]: primary   DNS address 144.92.104.20

Jul 25 22:19:34 dimtux pppd[28246]: secondary DNS address 144.92.9.22

Jul 25 22:20:00 dimtux CRON[28268]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 22:30:00 dimtux CRON[28318]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 22:40:00 dimtux CRON[28377]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 25 22:42:33 dimtux (root-27933): GConf server is not in use, shutting down.

Jul 25 22:42:33 dimtux (root-27933): Exiting

Jul 25 22:43:29 dimtux pppd[28246]: Hangup (SIGHUP)

Jul 25 22:43:29 dimtux codec_semaphore: semaphore is not ready [0x1][0x701300]

Jul 25 22:43:29 dimtux codec_write 1: semaphore is not ready for register 0x54

Jul 25 22:43:29 dimtux pppd[28246]: Modem hangup

Jul 25 22:43:29 dimtux pppd[28246]: Connection terminated.

Jul 25 22:43:29 dimtux pppd[28246]: Connect time 24.0 minutes.

Jul 25 22:43:29 dimtux pppd[28246]: Sent 391507 bytes, received 1312705 bytes.

Jul 25 22:43:29 dimtux pppd[28246]: Exit.

Jul 25 22:43:29 dimtux su(pam_unix)[28023]: session closed for user root

Jul 25 22:43:35 dimtux (liuwei-27800): Exiting

Jul 25 22:43:45 dimtux su(pam_unix)[28413]: session opened for user root by liuwei(uid=1000)

Jul 25 22:43:49 dimtux su(pam_unix)[28413]: session closed for user root

Jul 25 22:43:56 dimtux rc-scripts: WARNING:  you are stopping a boot service.

Jul 25 22:43:57 dimtux ehci_hcd 0000:00:1d.7: remove, state 1

Jul 25 22:43:57 dimtux usb usb4: USB disconnect, address 1

Jul 25 22:43:57 dimtux ehci_hcd 0000:00:1d.7: USB bus 4 deregistered

Jul 25 22:43:57 dimtux uhci_hcd 0000:00:1d.0: remove, state 1

Jul 25 22:43:57 dimtux usb usb1: USB disconnect, address 1

Jul 25 22:43:57 dimtux uhci_hcd 0000:00:1d.0: USB bus 1 deregistered

Jul 25 22:43:57 dimtux uhci_hcd 0000:00:1d.1: remove, state 1

Jul 25 22:43:57 dimtux usb usb2: USB disconnect, address 1

Jul 25 22:43:58 dimtux uhci_hcd 0000:00:1d.1: USB bus 2 deregistered

Jul 25 22:43:58 dimtux uhci_hcd 0000:00:1d.2: remove, state 1

Jul 25 22:43:58 dimtux usb usb3: USB disconnect, address 1

Jul 25 22:43:58 dimtux uhci_hcd 0000:00:1d.2: USB bus 3 deregistered

Jul 25 22:43:58 dimtux usbcore: deregistering driver usbfs

Jul 25 22:43:58 dimtux usbcore: deregistering driver hub

Jul 25 22:43:59 dimtux unloading Kernel Card Services

Jul 25 22:43:59 dimtux ieee1394: Node removed: ID:BUS[0-00:1023]  GUID[00023f332d003ec7]

Jul 25 22:44:00 dimtux Software Suspend 2.0.0.96: Initiating a software_suspend cycle.

Jul 25 22:44:32 dimtux Debug: sleeping function called from invalid context at include/asm/semaphore.h:145

Jul 25 22:44:32 dimtux in_atomic():1, irqs_disabled():1

Jul 25 22:44:32 dimtux [<c011b5e4>] __might_sleep+0xb2/0xd3

Jul 25 22:44:32 dimtux [<c0106aa0>] common_interrupt+0x18/0x20

Jul 25 22:44:32 dimtux [<c0219ee7>] tty_write+0xd7/0x300

Jul 25 22:44:32 dimtux [<c021fbc4>] write_chan+0x0/0x21a

Jul 25 22:44:32 dimtux [<c021a110>] redirected_tty_write+0x0/0xe1

Jul 25 22:44:32 dimtux [<c0164feb>] vfs_write+0xb0/0x119

Jul 25 22:44:32 dimtux [<c01650f9>] sys_write+0x42/0x63

Jul 25 22:44:32 dimtux [<c01381e5>] move_cursor_to+0x51/0x75

Jul 25 22:44:32 dimtux [<c0138e9c>] update_status+0x366/0x3fb

Jul 25 22:44:32 dimtux [<c0141771>] save_image_part1+0x26/0x1ba

Jul 25 22:44:32 dimtux [<c0141c68>] do_suspend2_suspend_2+0x8/0x34

Jul 25 22:44:32 dimtux [<c028cbc8>] do_suspend2_lowlevel+0x269/0x8a5

Jul 25 22:44:32 dimtux [<c01416fa>] save_image+0xc0/0x111

Jul 25 22:44:32 dimtux [<c01424f1>] software_suspend_pending+0x249/0x25f

Jul 25 22:44:32 dimtux [<c0196a93>] proc_file_write+0x0/0x42

Jul 25 22:44:32 dimtux [<c01405b6>] proc_software_suspend_pending+0x5/0xa

Jul 25 22:44:32 dimtux [<c0196aca>] proc_file_write+0x37/0x42

Jul 25 22:44:32 dimtux [<c0164feb>] vfs_write+0xb0/0x119

Jul 25 22:44:32 dimtux [<c016459b>] filp_close+0x59/0x86

Jul 25 22:44:32 dimtux [<c01650f9>] sys_write+0x42/0x63

Jul 25 22:44:32 dimtux [<c0106133>] syscall_call+0x7/0xb

Jul 25 22:44:32 dimtux 

Jul 25 22:44:32 dimtux PCI: Setting latency timer of device 0000:00:1d.0 to 64

Jul 25 22:44:32 dimtux PCI: Setting latency timer of device 0000:00:1d.1 to 64

Jul 25 22:44:32 dimtux PCI: Setting latency timer of device 0000:00:1d.2 to 64

Jul 25 22:44:32 dimtux PCI: Setting latency timer of device 0000:00:1d.7 to 64

Jul 25 22:44:32 dimtux PCI: Setting latency timer of device 0000:00:1f.5 to 64

Jul 25 22:44:32 dimtux PCI: Setting latency timer of device 0000:00:1f.6 to 64

Jul 25 22:44:32 dimtux Please include the following information in bug reports:

Jul 25 22:44:32 dimtux - SWSUSP core    : 2.0.0.96

Jul 25 22:44:32 dimtux - Kernel Version : 2.6.7

Jul 25 22:44:32 dimtux - Version spec.  : 2.0.1

Jul 25 22:44:32 dimtux - Compiler vers. : 3.3

Jul 25 22:44:32 dimtux - Modules loaded : 

Jul 25 22:44:32 dimtux - Attempt number : 2

Jul 25 22:44:32 dimtux - Pageset sizes  : 12195 and 86973 (86973 low).

Jul 25 22:44:32 dimtux - Parameters     : 0 0 0 32

Jul 25 22:44:32 dimtux - Calculations   : Image size: 99307. Ram to suspend: 1073.

Jul 25 22:44:32 dimtux - Limits         : 130928 pages RAM. Initial boot: 127682.

Jul 25 22:44:32 dimtux - Overall expected compression percentage: 0.

Jul 25 22:44:32 dimtux - Swapwriter active.

Jul 25 22:44:32 dimtux Swap available for image: 99172.

Jul 25 22:44:32 dimtux - LZF Compressor enabled.

Jul 25 22:44:32 dimtux Compressed 406192128 bytes into 266053123 (34 percent compression).

Jul 25 22:44:32 dimtux - Preemptive kernel.

Jul 25 22:44:32 dimtux - SMP kernel.

Jul 25 22:44:32 dimtux - Max ranges used: 46522 ranges in 137 pages.

Jul 25 22:44:32 dimtux - I/O speed: Write 24 MB/s, Read 24 MB/s.

Jul 26 19:49:28 dimtux NVRM: loading NVIDIA Linux x86 NVIDIA Kernel Module  1.0-6106  Wed Jun 23 08:14:01 PDT 2004

Jul 26 19:49:28 dimtux syslog-ng[5993]: STATS: dropped 0

Jul 26 19:49:30 dimtux SCSI subsystem initialized

Jul 26 19:49:31 dimtux ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device

Jul 26 19:49:31 dimtux scsi0 : SCSI host adapter emulation for IDE ATAPI devices

Jul 26 19:49:33 dimtux Vendor: TEAC      Model: DW-224E           Rev: F.0A

Jul 26 19:49:33 dimtux Type:   CD-ROM                             ANSI SCSI revision: 02

Jul 26 19:49:34 dimtux scsi.agent[30148]: cdrom at /devices/pci0000:00/0000:00:1f.1/ide1/1.0/host0/0:0:0:0

Jul 26 19:49:35 dimtux sr0: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray

Jul 26 19:49:35 dimtux Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0

Jul 26 19:49:38 dimtux cdrom: open failed.

Jul 26 19:49:42 dimtux NTFS driver 2.1.14 [Flags: R/O MODULE].

Jul 26 19:50:02 dimtux CRON[30266]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

Jul 26 19:50:06 dimtux NTFS volume version 3.1.

Jul 26 19:50:14 dimtux init: Switching to runlevel: 6

Jul 26 19:50:28 dimtux usbcore: registered new driver usbfs

Jul 26 19:50:28 dimtux usbcore: registered new driver hub

Jul 26 19:50:28 dimtux USB Universal Host Controller Interface driver v2.2

Jul 26 19:50:28 dimtux uhci_hcd 0000:00:1d.0: Intel Corp. 82801DB (ICH4) USB UHCI #1

Jul 26 19:50:30 dimtux PCI: Setting latency timer of device 0000:00:1d.0 to 64

Jul 26 19:50:30 dimtux uhci_hcd 0000:00:1d.0: irq 10, io base 00001800

Jul 26 19:50:31 dimtux uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 1

Jul 26 19:50:31 dimtux hub 1-0:1.0: USB hub found

Jul 26 19:50:31 dimtux hub 1-0:1.0: 2 ports detected

Jul 26 19:50:32 dimtux uhci_hcd 0000:00:1d.1: Intel Corp. 82801DB (ICH4) USB UHCI #2

Jul 26 19:50:33 dimtux PCI: Setting latency timer of device 0000:00:1d.1 to 64

Jul 26 19:50:33 dimtux uhci_hcd 0000:00:1d.1: irq 5, io base 00001820

Jul 26 19:50:33 dimtux uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 2

Jul 26 19:50:33 dimtux hub 2-0:1.0: USB hub found

Jul 26 19:50:33 dimtux hub 2-0:1.0: 2 ports detected

Jul 26 19:50:34 dimtux uhci_hcd 0000:00:1d.2: Intel Corp. 82801DB (ICH4) USB UHCI #3

Jul 26 19:50:36 dimtux PCI: Setting latency timer of device 0000:00:1d.2 to 64

Jul 26 19:50:36 dimtux uhci_hcd 0000:00:1d.2: irq 5, io base 00001840

Jul 26 19:50:36 dimtux uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 3

Jul 26 19:50:36 dimtux hub 3-0:1.0: USB hub found

Jul 26 19:50:36 dimtux hub 3-0:1.0: 2 ports detected

Jul 26 19:50:47 dimtux ehci_hcd 0000:00:1d.7: Intel Corp. 82801DB (ICH4) USB2 EHCI Controller

Jul 26 19:50:47 dimtux PCI: Setting latency timer of device 0000:00:1d.7 to 64

Jul 26 19:50:47 dimtux ehci_hcd 0000:00:1d.7: irq 5, pci mem e0f74000

Jul 26 19:50:47 dimtux ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 4

Jul 26 19:50:47 dimtux PCI: cache line size of 128 is not supported by device 0000:00:1d.7

Jul 26 19:50:47 dimtux ehci_hcd 0000:00:1d.7: USB 2.0 enabled, EHCI 1.00, driver 2004-May-10

Jul 26 19:50:47 dimtux hub 4-0:1.0: USB hub found

Jul 26 19:50:47 dimtux hub 4-0:1.0: 6 ports detected

Jul 26 19:51:05 dimtux PCI: Setting latency timer of device 0000:00:1f.5 to 64

Jul 26 19:51:08 dimtux intel8x0_measure_ac97_clock: measured 968970 usecs

Jul 26 19:51:08 dimtux intel8x0: measured clock 5638 rejected

Jul 26 19:51:08 dimtux intel8x0: clocking to 48000

Jul 26 19:51:11 dimtux PCI: Setting latency timer of device 0000:00:1f.6 to 64

Jul 26 19:51:13 dimtux MC'97 1 converters and GPIO not ready (0xf200)

Jul 26 19:51:23 dimtux ohci1394: $Rev: 1223 $ Ben Collins <bcollins@debian.org>

Jul 26 19:51:23 dimtux ieee1394.agent[31640]: ... no drivers for IEEE1394 product 0x/0x/0x

Jul 26 19:51:24 dimtux ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[10]  MMIO=[d2004000-d20047ff]  Max Packet=[2048]

Jul 26 19:51:28 dimtux Linux Kernel Card Services

Jul 26 19:51:28 dimtux options:  [pci] [cardbus] [pm]

Jul 26 19:51:28 dimtux Yenta: CardBus bridge found at 0000:02:04.0 [1179:ff00]

Jul 26 19:51:29 dimtux ieee1394: Host added: ID:BUS[0-00:1023]  GUID[00023f332d003ec7]

Jul 26 19:51:29 dimtux Yenta: ISA IRQ mask 0x0898, PCI irq 10

Jul 26 19:51:29 dimtux Socket status: 30000006

Jul 26 19:51:29 dimtux Yenta: CardBus bridge found at 0000:02:04.1 [1179:ff00]

Jul 26 19:51:29 dimtux ieee1394.agent[31716]: ... no drivers for IEEE1394 product 0x/0x/0x

Jul 26 19:51:30 dimtux Yenta: ISA IRQ mask 0x0898, PCI irq 10

Jul 26 19:51:30 dimtux Socket status: 30000006

Jul 26 19:51:37 dimtux ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

Jul 26 19:51:37 dimtux ohci_hcd: block sizes: ed 64 td 64

Jul 26 19:51:41 dimtux rc-scripts: 'modprobe i82365' failed

Jul 26 19:51:41 dimtux rc-scripts: Trying alternative PCIC driver: yenta_socket

Jul 26 19:51:47 dimtux cardmgr[32140]: watching 2 sockets

Jul 26 19:51:47 dimtux cs: IO port probe 0x0c00-0x0cff: clean.

Jul 26 19:51:47 dimtux cs: IO port probe 0x0800-0x08ff: clean.

Jul 26 19:51:48 dimtux cs: IO port probe 0x0100-0x04ff: excluding 0x200-0x20f 0x378-0x37f 0x4d0-0x4d7

Jul 26 19:51:48 dimtux cs: IO port probe 0x0a00-0x0aff: clean.

Jul 26 19:51:48 dimtux cardmgr[32140]: starting, version is 3.2.5

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:56 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:58 dimtux logger: ACPI action lid is not defined

Jul 26 19:51:59 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:00 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:00 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:00 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:00 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:03 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:04 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:09 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:10 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:11 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:11 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:11 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:11 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:11 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:11 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:11 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:11 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:11 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:11 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:11 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:11 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:11 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:13 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:18 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:19 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:21 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:21 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:21 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:21 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:21 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:21 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:21 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:21 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:21 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:21 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:21 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:21 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:22 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:22 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:23 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:26 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:28 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:29 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:31 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:33 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:34 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:35 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:36 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:38 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:39 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:40 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:41 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:41 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:41 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:41 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:41 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:41 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:41 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:41 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:42 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:42 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:42 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:42 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:42 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:42 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:42 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:42 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:43 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:45 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:46 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:48 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:49 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:51 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:52 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:54 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:55 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:57 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:58 dimtux logger: ACPI action lid is not defined

Jul 26 19:52:59 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:00 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:01 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:03 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:04 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:06 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:07 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:08 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:09 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:10 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:12 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:14 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:15 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:16 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:17 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:19 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:19 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:20 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:21 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:22 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:24 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:25 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:27 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:28 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:30 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:33 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:34 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:35 dimtux logger: ACPI action lid is not defined

Jul 26 19:53:35 dimtu

----------

## zmedico

 *dimfox2 wrote:*   

> when resumes the computer becomes very, very slow, probably take 3 seconds to see a reaction, e.g. the letter you typed displayed, or using alt+Fn to switch between consoles.

 

Maybe some process is out of control?  You can use "top" in the console to check your cpu usage and "free" to check your memory usage.  From the log it looks like maybe acpid is caught in an endless loop.

----------

## aloha99

 *tuxlover wrote:*   

> I guess this was supposed to read 2.0.0.100...?
> 
> 

   Exactly ... updated my post, thanks.

----------

## dimfox2

 *zmedico wrote:*   

> 
> 
> Maybe some process is out of control?  You can use "top" in the console to check your cpu usage and "free" to check your memory usage.  From the log it looks like maybe acpid is caught in an endless loop.

 

If the acpid is the problem, I can just stop the acpid when hibernate. I remeber there's a post in this thread that closing and reopening the lid when hibernate will generate tons of acpi events, I don't know if he has the same slowing down problem.

I hate to deal with this kind of things, because you have to reboot again and again.

Thanks for the advice, I will try to look at the cpu and memory useage next time this happens.

----------

## zmedico

 *dimfox2 wrote:*   

> [tons of acpi events

 

Maybe if you put a call to "sleep" in the acpid script (sleep for 1 second or so) then it won't consume the whole cpu when there are tons of events.

 *dimfox2 wrote:*   

>  you have to reboot again and again.

 

It shouldn't take long to reboot if software suspend is working.  I use it on my desktop computer for fast boot/shutdown times and it works great.

----------

## mlybarger

i'm having a few minor inconveniences with suspending on my laptop that hopefully i could get resolved.  i am using a stock gentoo-dev-sources for my kernel. in there under the acpi/apm secion there's two items for suspend to ram and suspend to disk i think. i have those enabled and my grub.conf looks for resume on my swap space.  i have acpid installed, and when i close my lid, it suspends to disk. i turn it back on and boot to linux and i'm back where i was.  good.  the problem is that i have to manually bring networking down and back up again when i restart it.  it thinks it's up but it shouldn't be up at all.  i might be on a different network, or no network at all when i resume (wifi)

so, am i shooting myself in the foot by using what ever suspend is in the gentoo-dev-sources default?

the with the swsup2 patches, does networking work like i'd expect it to?

also, is there a "soft" suspend where things go into a low power state and can wake up w/ having to go through boot sequence (grub and all).?

thanks.

----------

## bfkeats

Take a look in either /etc/suspend.conf or /etc/hibernate/hibernate.conf (I can't rember which). You can configure the script to bring down eth0 and not bring it up again. I don't know of a 'low power' type suspend.

Brian

----------

## tuxlover

 *mark_lybarger wrote:*   

> so, am i shooting myself in the foot by using what ever suspend is in the gentoo-dev-sources default?

 

This howto-thread is about swsusp2. What you're using is swsusp1. I'm not sure about the configuration of swsusp1, but swsusp2 just works much better definitely.

 *Quote:*   

> the with the swsup2 patches, does networking work like i'd expect it to?

 

It's easy to configure. Just install it and take a look at the config file.

 *Quote:*   

> also, is there a "soft" suspend where things go into a low power state and can wake up w/ having to go through boot sequence (grub and all).?

 

What you want is called suspend to RAM. The kernel supports it (if you have the acpi patch installed which is in the gentoo-(dev-)sources. Read about how to activate it at http://acpi.sf.net/

 *dimfox wrote:*   

> Here's the log (sorry for the lengthy post)  
> 
> Jul 25 18:59:26 dimtux Software Suspend 2.0.0.96: Initiating a software_suspend cycle.
> 
> .... a lot of stuff...
> ...

 

Well, that really was lengthy  :Smile:  Maybe you could edit your post and make it a little bit shorter... The gentoo forum search / database will thank you for it  :Wink:  Please post such lengthy logs like this: "...and then every second about 5 lines like this: ..."

----------

## xmit

 *tuxlover wrote:*   

> 
> 
> This howto-thread is about swsusp2. What you're using is swsusp1. I'm not sure about the configuration of swsusp1, but swsusp2 just works much better definitely.

 

I put 

```

CONFIG_PM=y

CONFIG_SOFTWARE_SUSPEND=y

CONFIG_PM_DISK=y

CONFIG_PM_DISK_PARTITION="/dev/hda3"

CONFIG_ACPI=y

CONFIG_ACPI_BOOT=y

CONFIG_ACPI_INTERPRETER=y

CONFIG_ACPI_SLEEP=y

CONFIG_ACPI_SLEEP_PROC_FS=y

CONFIG_ACPI_AC=y

CONFIG_ACPI_BATTERY=y

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_FAN=y

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_ASUS is not set

# CONFIG_ACPI_TOSHIBA is not set

# CONFIG_ACPI_DEBUG is not set

CONFIG_ACPI_BUS=y

CONFIG_ACPI_EC=y

CONFIG_ACPI_POWER=y

CONFIG_ACPI_PCI=y

CONFIG_ACPI_SYSTEM=y

# CONFIG_X86_PM_TIMER is not set

```

into my kernel and configured KLaptop to hibernate when the lid closes and it this works perfectly on a IBM Thinkpad X24 with WLAN (using kernel orinocco drivers) and Xorg instead of Xfree86. Ok, you should be a KDE user then but that's no problem for me, I like KDE.

How can swsusp2 be better as long as you have to path the kernel? Ok, swsusp does no compression, but does  this really matter?! I would prefer the buildin kernel capabilites before patching it.

Anyway, this is a great how-to.

mg

----------

## tuxlover

 *xmit wrote:*   

> How can swsusp2 be better as long as you have to path the kernel? Ok, swsusp does no compression, but does  this really matter?

 

Besides the joy of patching your kernel  :Smile:  it also works better IMHO. As far as I remember I had a bunch of problems when playing around with swsusp1 (crashing while suspending/resuming, resume failures), and haven't seen many with swsusp2.

I personally like the fact that it's under active (heavy?) development. It seems like it's moving forward. Take a look at the kernel changelog with respect to swsusp1 as a comparison, there's not that much happening there...

----------

## daff

First: thanks for this howto and all the effort! Unfortunately it I ran into problems and just wanted to note that with gentoo-dev-sources-2.6.7-r11, software-suspend-2.0.0.102-for-linux-2.6.7.tar.bz2, manually patched keyboard.c (thanks to djong here) and all other patches applying flawlessly the kernel won't compile, stopping here:

```

[...]

  CC      kernel/uid16.o

  CC      kernel/module.o

  CC      kernel/power/process.o

kernel/power/process.c:515: error: `smp_pause' undeclared here (not in a function)

kernel/power/process.c:515: error: initializer element is not constant

kernel/power/process.c:515: error: (near initialization for `__ksymtab_smp_pause.value')

kernel/power/process.c:516: error: `smp_lowlevel_suspend' undeclared here (not in a function)

kernel/power/process.c:516: error: initializer element is not constant

kernel/power/process.c:516: error: (near initialization for `__ksymtab_smp_lowlevel_suspend.value')

kernel/power/process.c:517: error: `smp_continue' undeclared here (not in a function)

kernel/power/process.c:517: error: initializer element is not constant

kernel/power/process.c:517: error: (near initialization for `__ksymtab_smp_continue.value')

kernel/power/process.c:515: error: __ksymtab_smp_pause causes a section type conflict

kernel/power/process.c:516: error: __ksymtab_smp_lowlevel_suspend causes a section type conflict

kernel/power/process.c:517: error: __ksymtab_smp_continue causes a section type conflict

make[2]: *** [kernel/power/process.o] Error 1

make[1]: *** [kernel/power] Error 2

make: *** [kernel] Error 2

```

Ideas? Should I try 100 or 99 instead of 102?

----------

## tuxlover

 *daff wrote:*   

> 
> 
> ```
> [...]kernel/power/process.c:515: error: `smp_pause' undeclared here (not in a function)
> ```
> ...

 

Do you have smp (symmetric multi processing) enabled? Do you have an smp machine? According to http://softwaresuspend.berlios.de/features.html smp is only supported in 2.4.

 *xmit wrote:*   

> How can swsusp2 be better (ed: as swusps1) as long as you have to path the kernel?

 

That feature page also lists some differences between the 3 different suspend-to-disk systems, or should I call it enhancements. Most of us probably don't need many of the features in swsusp2, but this page just shows that it has a lot more functionality.

----------

## zmedico

 *daff wrote:*   

> Ideas? Should I try 100 or 99 instead of 102?

 

From my experience version 2.0.0.100 seems to be relatively stable.  I got the same compilation error with 102 and with 103 mine hangs sometimes during resume (I haven't tried debugging to find out why).  I'm sticking with 100 for now.

----------

## Jerrac

Well, it had been a while since I played with Gentoo, so I went and tried hibernating again. Took about 60 seconds to shut down, and 2 minutes to resume. WinXP does it 30 to shut down and 20 to resume. Heh. My usb mouse also didn't work once I resumed. I assume I just need to get that module reloading... Haven't tried that though.

So, those of you who have it working perfectly, how long does it take to hibernate and resume? I want to know if it is just me.

Oh, and when it was hibernating it said it had 300mb to save to the swap... I have the latest version of swsup2, at least the latest as of a month ago.

----------

## dimfox2

My XP takes both less than 10 seconds to hibernate and resume. (I don't have much software installed on it though, only some media players and a MS Office)

Gentoo, it depends, but should take less than 20 seconds to hibernate or resume. I guess how many MBs to save to disk is depends how many softwares have you started (even if you have closed it ) before hibernate.

----------

## dimfox2

I have a problem with the sound card though. 

I restarted the alsasound service in the hibernate script. After resume, the root user can play sound with no problem, but other user will have this info:

aplay: main:507: audio open error: Permission denied

Restarting alsasound or reloading sound modules won't solve the problem.

Any one?

----------

## zmedico

 *dimfox2 wrote:*   

> After resume, the root user can play sound with no problem, but other user will have this info:
> 
> aplay: main:507: audio open error: Permission denied
> 
> 

 

That's because the device permissions are lost when the module gets unloaded and the devices go away.  My solution is to put a call to "/sbin/pam_console_apply" (sys-libs/pam) in the start() function of /etc/init.d/alsasound.  This program gives permission to the user named in /var/run/console.lock.

 *Jerrac wrote:*   

> Took about 60 seconds to shut down, and 2 minutes to resume.

 

That sounds longer than average.  Are you using compression?  Here's what I use:

```
#

# Page Transformers

#

CONFIG_SOFTWARE_SUSPEND_LZF_COMPRESSION=y

# CONFIG_SOFTWARE_SUSPEND_GZIP_COMPRESSION is not set

# CONFIG_SOFTWARE_SUSPEND_NULLTRANSFORMER is not set
```

Also, avoid restarting as many services as possible since that is what usually consumes the most time.

----------

## Jerrac

Yes, I am using LZIF.

I'll check my services...

----------

## dimfox2

 *zmedico wrote:*   

> 
> 
> That's because the device permissions are lost when the module gets unloaded and the devices go away.  My solution is to put a call to "/sbin/pam_console_apply" (sys-libs/pam) in the start() function of /etc/init.d/alsasound.  This program gives permission to the user named in /var/run/console.lock.
> 
> 

 

Yeah, that solve the problem. This is the second time I install Gentoo and Swsusp, I don't know why I didn't have this problem last time.

----------

## dimfox2

 *zmedico wrote:*   

> 
> 
> That's because the device permissions are lost when the module gets unloaded and the devices go away.  My solution is to put a call to "/sbin/pam_console_apply" (sys-libs/pam) in the start() function of /etc/init.d/alsasound.  This program gives permission to the user named in /var/run/console.lock.
> 
> 

 

Yeah, that solve the problem, thanks. 

 :Very Happy:   :Very Happy: 

This is the second time I install Gentoo and Swsusp, I don't know why I didn't have this problem last time.

----------

## bosje

Hi,

After patching the kernel, I get the following error while compiling:

```

  CC      drivers/char/selection.o

  CC      drivers/char/keyboard.o

drivers/char/keyboard.c:279: error: redefinition of `__kstrtab_kd_mksound'

drivers/char/keyboard.c:277: error: `__kstrtab_kd_mksound' previously defined here

drivers/char/keyboard.c:279: error: redefinition of `__ksymtab_kd_mksound'

drivers/char/keyboard.c:277: error: `__ksymtab_kd_mksound' previously defined here

drivers/char/keyboard.c: In function `kbd_keycode':

drivers/char/keyboard.c:1100: error: `software_suspend_state' undeclared (first use in this function)

drivers/char/keyboard.c:1100: error: (Each undeclared identifier is reported only once

drivers/char/keyboard.c:1100: error: for each function it appears in.)

drivers/char/keyboard.c:1100: error: `SOFTWARE_SUSPEND_RUNNING' undeclared (first use in this function)

drivers/char/keyboard.c:1105: error: `SOFTWARE_SUSPEND_SANITY_CHECK_PROMPT' undeclared (first use in this function)

drivers/char/keyboard.c:1107: error: dereferencing pointer to incomplete type

drivers/char/keyboard.c:1109: error: `SOFTWARE_SUSPEND_CONTINUE_REQ' undeclared (first use in this function)

drivers/char/keyboard.c:1110: error: dereferencing pointer to incomplete type

drivers/char/keyboard.c:1117: error: dereferencing pointer to incomplete type

drivers/char/keyboard.c:1118: error: dereferencing pointer to incomplete type

drivers/char/keyboard.c:1122: error: dereferencing pointer to incomplete type

drivers/char/keyboard.c:1126: error: dereferencing pointer to incomplete type

drivers/char/keyboard.c:1130: error: `SUSPEND_REBOOT' undeclared (first use in this function)

drivers/char/keyboard.c:1131: error: dereferencing pointer to incomplete type

drivers/char/keyboard.c:1132: error: dereferencing pointer to incomplete type

drivers/char/keyboard.c:1246: error: dereferencing pointer to incomplete type

{standard input}: Assembler messages:

{standard input}:597: Error: symbol `__kstrtab_kd_mksound' is already defined

{standard input}:603: Error: symbol `__ksymtab_kd_mksound' is already defined

make[2]: *** [drivers/char/keyboard.o] Error 1

make[1]: *** [drivers/char] Error 2

make: *** [drivers] Error 2

```

I'm running gentoo-dev-sources 2.6.7-r11 and patch version software-suspend-2.0.0.103-for-2.6.7.

Is this a known problem? Can anyone help me solve this problem?

----------

## dyqik

Is anyone close to getting the suspend2 patches to apply to the gentoo-dev-sources-2.6.8_rc1 sources yet?  The 104 series of patches kind of work, but there's no bootsplash patches yet in that download.

I've manually applied the 100 series 2.6.7 bootsplash patches to gentoo-dev-sources-2.6.8_rc1, but unfortunately they don't compile (there are only a few errors though).

I might be forced to use the 2.6.7 rc11 sources again, or forget about suspend (as I haven't ever got it working properly yet).

----------

## insomniac

ok, I'm a little confused here. Can anybody tell me what the difference between the 2 kernel options for software suspend (save to disk) and swsusp2 is?

----------

## zmedico

 *bosje wrote:*   

> I'm running gentoo-dev-sources 2.6.7-r11 and patch version software-suspend-2.0.0.103-for-2.6.7.
> 
> Is this a known problem? Can anyone help me solve this problem?

 

When you patched it did you get any rejects and did you merge them in by hand? Version 2.0.0.100 seems relatively stable.  I would give that a try.

 *dyqik wrote:*   

> Is anyone close to getting the suspend2 patches to apply to the gentoo-dev-sources-2.6.8_rc1 sources yet?

 

You mean gentoo-dev-sources-2.6.8-r1 right?  I'm merging those now so maybe I'll try that soon.

 *insomniac wrote:*   

> ok, I'm a little confused here. Can anybody tell me what the difference between the 2 kernel options for software suspend (save to disk) and swsusp2 is?

 

They are branches that began with the same roots.  See here:  Three Suspend-to-disk implementations explained

----------

## bosje

 *zmedico wrote:*   

>  *bosje wrote:*   I'm running gentoo-dev-sources 2.6.7-r11 and patch version software-suspend-2.0.0.103-for-2.6.7.
> 
> Is this a known problem? Can anyone help me solve this problem? 
> 
> When you patched it did you get any rejects and did you merge them in by hand? Version 2.0.0.100 seems relatively stable.  I would give that a try.
> ...

 

I 've tried version 99, 102 and 103. Patched them manually, but without a working kernel.  I just tried release 100. I get these errors:

```
patching file drivers/block/ll_rw_blk.c

patching file drivers/block/loop.c

patching file drivers/char/hvc_console.c

patching file drivers/char/keyboard.c

Hunk #2 FAILED at 42.

Hunk #3 succeeded at 1101 (offset 25 lines).

1 out of 3 hunks FAILED -- saving rejects to file drivers/char/keyboard.c.rej

patching file drivers/char/vt.c

Hunk #1 succeeded at 154 (offset 4 lines).

Hunk #2 succeeded at 556 (offset 4 lines).

Hunk #3 succeeded at 890 (offset 1 line).

Hunk #4 succeeded at 917 (offset 1 line).

Hunk #5 succeeded at 1434 (offset 3 lines).

patching file drivers/ieee1394/nodemgr.c

patching file drivers/input/serio/serio.c

```

Is this the cause? Could you help solve this problem?

----------

## Kraymer

Hey folks!

I had that problem yesterday, with a vanilla kernel (so it should be appliable to development-sources as well).

It's known that the new swsusp2 (104) and the bootsplash_patch don't work together. A new bootsplsh-ebuild was released yesterday to fix that. (0.6.1-r6).

Try a fresh source with that boot-splash-patch and 104-swsusp2. It is said to work.

Sebastian

----------

## bosje

 *bosje wrote:*   

>  *zmedico wrote:*    *bosje wrote:*   I'm running gentoo-dev-sources 2.6.7-r11 and patch version software-suspend-2.0.0.103-for-2.6.7.
> 
> Is this a known problem? Can anyone help me solve this problem? 
> 
> When you patched it did you get any rejects and did you merge them in by hand? Version 2.0.0.100 seems relatively stable.  I would give that a try.
> ...

 

Just gave up on kernel 2.6.7. Installed 2.6.8 from kernel.org and applied swsusp2 2.0.0.104 for 2.6.8.1. This worked direktly! 

The gentoo-dev-sources keyboard.c file contained unexpected code around line 48. 

Thanks for you help.

----------

## tuxlover

 *dyqik wrote:*   

> [...] The 104 series of patches kind of work, but there's no bootsplash patches yet in that download. [...]
> 
> I might be forced to use the 2.6.7 rc11 sources again, or forget about suspend.

 

... or forget about bootsplash. Come on people, what's more important: A good, recent kernel and the wonderful swsusp or bootsplash (which simply shows colorful images while booting)?

If it's bootsplash, then I don't get it  :Smile: 

----------

## dyqik

 *Quote:*   

> ... or forget about bootsplash. Come on people, what's more important: A good, recent kernel and the wonderful swsusp or bootsplash (which simply shows colorful images while booting)? 

 

I have a 12" 1024x768 TFT screen.  The standard linux console is really, really ugly in 640x480 full screen.  I've never got swsusp2 working yet anyway, so I'd rather have working bootsplash than a non-working swsusp2.  Actually, my biggest problem with my 2.6.8 setup is that I can't get ndiswrapper 0.9 to work with my IPW2200b/g card (it won't set the essid).

----------

## tuxlover

I timed my suspend process:

On my machine (512mb, 1.3ghz centrino), with lzif compression enabled, and the following values:

```
$ top

Mem:    515332k total,   494904k used,    20428k free,    31044k buffers

Swap:   787144k total,        0k used,   787144k free,    95468k cached

```

it takes 28s to suspend (pressing from power-off button until machine turns off) and 33s to resume (from after grub has finished until machine is usable). I have a lot of software running, among it kde, several web browsers, ps/pdf viewers, kmail, etc.

----------

## tuxlover

 *dyqik wrote:*   

> I have a 12" 1024x768 TFT screen.  The standard linux console is really, really ugly in 640x480 full screen.

 

Maybe you should try console framebuffer. You can choose the resolution and color depth via kernel boot parameters, and get a wonderfully looking console even on a TFT (I'm on one myself). Plus you get all the geeky information that you miss out on when using bootsplash  :Smile: 

----------

## mlybarger

i have swsusp2 patched into the kernel and working pretty much.  much nicer than the swsusp that's in the default gentoo-dev-sources.  

my problem is that my wlan interface needs to be restarted when resuming to see if there's a signal (possibly get a different ip than before).  in my hibernate.conf, i have:

```

### network

DownInterfaces wlan0 eth0

UpInterfaces wlan0 eth0

### programs

# IncompatiblePrograms xmms

### services

RestartServices net.wlan0

# StopServices alsasound

# StartServices aumix

```

this should take down the wlan0 interface and bring it back up when resuming.  it should also force a restart of /etc/init.d/net.wlan0.  today, i took my laptop from home to another location (panera bread gives free wifi).  when resuming i noticed i have the same ip as home. but panera is on a different subnet completely (192. .vs. 10.)  so it doesn't seem to be working.  are there any log messages i can check about what happens when resuming?  any trouble shooting messages i can look at? btw, i'm using the wireless-config ebuild that i found somewhere in these here forums to control my wifi card. i'm also using ndiswrapper and a windows driver. i notice i have ndiswrapper misspelled in my UnloadModules section of the hibernate.conf, but that s/b ok.   the driver is still up and i can restart manually /etc/init.d/net.wlan0 and all goes ok.  suggestions?

before with the swsusp, after a resume, my usb mouse wouldn't work at all unless i remove/insert the usb modules.  i never tired other usb devices, but i assume they'd be the same. now, my usb stuff works nicely after resume.

----------

## zmedico

 *mark_lybarger wrote:*   

> are there any log messages i can check about what happens when resuming?

 

The log file is specified in /etc/hibernate/hibernate.conf

```
cat /etc/hibernate/hibernate.conf | grep -i log

LogFile /var/log/hibernate.log

LogVerbosity 1
```

 *tuxlover wrote:*   

> Maybe you should try console framebuffer.

 

Yes, actually, bootsplash uses the framebuffer so dyqik has already tried it.    :Wink:   Framebuffer works without bootsplash too!

----------

## mlybarger

thanks for help finding the log file. it helps to look there. i didn't wait long enough for the device to be brought up when i booted my machine... alll is well.

----------

## kip

I made an ebuild for the nvidia driver that will apply the necessary patch ...

you can get it here: http://linux.kips-world.de/nvidia

you need both files, the ebuild and the patch. For those who don't know how to use these files click here

----------

## theboywho

After patching a gentoo-dev-sources-2.6.8-r3 kernel with the 1.0.5 swsusp kernel compile fails with:

drivers/char/keyboard.c:285: error: redefinition of `__kcrctab_kd_mksound'

drivers/char/keyboard.c:254: error: `__kcrctab_kd_mksound' previously defined here

drivers/char/keyboard.c:285: error: redefinition of `__kstrtab_kd_mksound'

drivers/char/keyboard.c:254: error: `__kstrtab_kd_mksound' previously defined here

drivers/char/keyboard.c:285: error: redefinition of `__ksymtab_kd_mksound'

drivers/char/keyboard.c:254: error: `__ksymtab_kd_mksound' previously defined here

{standard input}: Assembler messages:

{standard input}:628: Error: symbol `__kcrctab_kd_mksound' is already defined

{standard input}:633: Error: symbol `__kstrtab_kd_mksound' is already defined

{standard input}:639: Error: symbol `__ksymtab_kd_mksound' is already defined

make[2]: *** [drivers/char/keyboard.o] Error 1

make[1]: *** [drivers/char] Error 2

make: *** [drivers] Error 2

I also have the supermount (from bug 60462) and latest (mh1) bluez patch applied - the kernel compiles and runs fine with just these two patches

----------

## phranzee

hi.

my config:

```

CONFIG_SOFTWARE_SUSPEND2_CORE=y

CONFIG_SOFTWARE_SUSPEND2=y

CONFIG_SOFTWARE_SUSPEND2_WRITER=y

CONFIG_SOFTWARE_SUSPEND_SWAPWRITER=y

# CONFIG_SOFTWARE_SUSPEND_NULLWRITER is not set

CONFIG_SOFTWARE_SUSPEND_LZF_COMPRESSION=y

# CONFIG_SOFTWARE_SUSPEND_GZIP_COMPRESSION is not set

# CONFIG_SOFTWARE_SUSPEND_NULLTRANSFORMER is not set

# CONFIG_SOFTWARE_SUSPEND_TEXT_MODE is not set

# CONFIG_SOFTWARE_SUSPEND_ACPI is not set

# CONFIG_SOFTWARE_SUSPEND_RELAXED_PROC is not set

CONFIG_SOFTWARE_SUSPEND_DEFAULT_RESUME2=""

# CONFIG_SOFTWARE_SUSPEND_KEEP_IMAGE is not set

# CONFIG_SOFTWARE_SUSPEND_DEBUG is not set

# CONFIG_SOFTWARE_SUSPEND_VARIATION_ANALYSIS is not set

# CONFIG_SOFTWARE_SUSPEND2_DUMP is not set
```

and the result of /usr/local/sbin/hibernate:

```

Your kernel does not have any recent Software Suspend 2 support compiled in.

Please follow the HOWTO linked from http://swsusp.sourceforge.net/ for

instructions on how compile Software Suspend into your kernel.

hibernate: Aborting.
```

```
uname -r

2.6.8.1-nitro2
```

need help  :Razz: 

----------

## Jefklak

Could someone give some hints how to "patch" the latest nvidia drivers? 

kip, I mean nvidia 106110, there's a newer version and I can't find the exact location of the switch(state) line anymore, the code has changed a bit... When I try some stuff and hibernate in X, I can't seem to resume (black screen)...

----------

## Jefklak

I tried with serveral patched older nvidia drivers but no go... System "hangs" in black screen when trying to unsuspend from SWAP disk... That really sucks! Anyone with similar problems in X? Without nvidia loaded it works fine...

----------

## Vishnu

 *theboywho wrote:*   

> After patching a gentoo-dev-sources-2.6.8-r3 kernel with the 1.0.5 swsusp kernel compile fails with:
> 
> drivers/char/keyboard.c:285: error: redefinition of `__kcrctab_kd_mksound'
> 
> drivers/char/keyboard.c:254: error: `__kcrctab_kd_mksound' previously defined here
> ...

 

Remove one of the lines EXPORT_SYMBOL(kd_mksound) from this file, either the one on line 285 or the one on line 254, then it should compile.

----------

## theboywho

Did that, but swsusp doesnt work properly on my Vaio TR5, It will hibernate, but wont come back out of hibernation. I even tested with ALL other drivers removed, but still the same problem.

----------

## DerMojo

Hi!

Does anyone know how to get swsusp2 to work with the vesa-tng framebuffer?

If I turn it on, I can't resume and the laptop freezes. But no other framebuffer works for me ... (Intel Corp. 82852/855GM Integrated Graphics Device)  :Sad: 

thx

Daniel

----------

## Root Moose

I just read this whole thread(s) and maybe I missed this point along the way - my eyes are starting to glaze over...

 :Question:  Which swap partition does swsusp2 need? 

The one you have configured for your running OS 

OR 

a completely different one separate from that OS swap partition?

 :Question:  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?

 :Question:  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?

TIA

r@m

 :Exclamation:  p.s. Great How-to btw.

----------

## theboywho

 *DerMojo wrote:*   

> Hi!
> 
> Does anyone know how to get swsusp2 to work with the vesa-tng framebuffer?
> 
> If I turn it on, I can't resume and the laptop freezes. But no other framebuffer works for me ... (Intel Corp. 82852/855GM Integrated Graphics Device) 
> ...

 

Hey ive got the same graphics device in my Vaio TR5 - i couldnt get swsusp working with the vesa-tng framebuffer - but now i have turned off all the frame buffer support and its works fine. Have you tested it with out framebuffer support?

----------

## DerMojo

 *theboywho wrote:*   

> Have you tested it with out framebuffer support?

 

Yes, I'm currently running without framebuffer so I can suspend, works fine. But I'd like to have both  :Wink: 

 *Root Moose wrote:*   

> Which swap partition does swsusp2 need?

 

It's using your "normal" swap partition, but you can configure it to use another one. (at least there are options for that..) This should work even if /dev/SWAP is not in your /etc/fstab (see /etc/hibernate/hibernate.conf).

 *Root Moose wrote:*   

> I'm kinda tight for space [...]

 

Your swap partition should be larger that your mem, yes. If it's enough, well, I think you just have to test it. It's recommended to have +30% more space, but it can fit in less than that.

----------

## theboywho

Im gonna test it with the 'normal' framebuffer. The only reason i dont care much for FB is because i cant get it into the 1280x960 mode that my laptop screen does. Ive got X windows to do it, tho.

But WidescreenFB + Bootsplash + SwSusp would be great!

----------

## wudmx

hi,

i've tried it with gentoo-dev-sources 2.6.8.1-rc4.... had some kernel problems while compiling, but i fixed them! installed also the hibernate-script from berlios... 

if i execute the hibernate script, i get a strange output ... call trace... and them something  like do_timer+0xdf/0xe4 etc... finally there is a "code"... and then nothing happens!

i read everything in this thread, but no one said something about this!

my question:

which kernel are you using with which files from berlios?

would be really nice... 

wudmx

----------

## yamakawa

I am using 2.0.0.105 for 2.6.9-rc1 (of development-sources)!

It is working very well.   :Very Happy: 

----------

## X-Drum

 *yamakawa wrote:*   

> I am using 2.0.0.105 for 2.6.9-rc1 (of development-sources)!
> 
> It is working very well.  

 

uh! that's sounds good

what kind of hardware are u running?

You have SMP support enabled in your kernel?

----------

## Jefklak

Did anyone succeed on hibernating in X mode (nvidia)?

----------

## Cheesepie

Just want to report that Ive got swusp2 running flawlessly on an IBM thinkpad T41 (1.7ghz/2048 ram) using LZF compression and 2.6.7-gentoo-dev-sources-r14

Hibernates from X and everything, even with the fglrx ati drivers in use! hurah!

 :Smile: 

----------

## Cheesepie

Something weird:

I swear that suspend to disk and suspend to ram were working with fglrx. 

But all of a sudden, when I try to resume after suspending with the fglrx drivers in use, I get the same crash/error that everyone gets. Very weird, especially considering nothing changed.

----------

## cwng

 *theboywho wrote:*   

> Im gonna test it with the 'normal' framebuffer. The only reason i dont care much for FB is because i cant get it into the 1280x960 mode that my laptop screen does. Ive got X windows to do it, tho.
> 
> But WidescreenFB + Bootsplash + SwSusp would be great!

 

I have not tried, but my experence with a stupid mistake of mine may be of some use:  When I first upgraded to 2.6.8 (and therefore fbsplash), I found that I can't use silent mode.  The laptop freeze.  In, verbose mode, I have a then-puzzling phenonmemon of the splash working only for a while during boot up, and then it defaults to a black screem until the userspace splash services set in.  I lived with it for a while until one fine day I was determined to find the cause.  Upon close inspection of the dmesg, I realized my mistake: I had always have the "resume=/hda7" kernel option in every grub entry, even though I wasn't using swsusp.   It doesn't matter in bootsplash, but apparently it matters with fbsplash.   After I created extra enties without the resume kernel option, my silent fbsplash works perfect, and the verbose mode anomaly disappears.

Moral of story: Have you tried not using silent mode fbsplash with resume? It may work.

----------

## hyp0r

Seems like swsusp works fine for most of you. Can it be considered as "quite" stable (therefore I quoted the "quite"  :Smile:  )?.

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?

----------

## Cheesepie

 *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?
> ...

 

fglrx will definately freeze it. Kill X before suspending, or use the (sucky) radeon drivers.

On another note, whenever I suspend to disk with swusp2, it messes with pcmcia hotplugging, and I have to reboot my laptop to get my wifi card (orinoco) working. Even if I pull all pcmcia cards (wifi card included) before suspending, upon resuiming pcmcia fails to work, even after I restart it.

Anyone have any ideas about that?

----------

## hyp0r

Yeah, killing X before suspending works. This might be solution as you can kill X automatically when hibernating, but this is far from being optimal.

Time for a new at-driver, as it doesn't even work with Xorg 6.8.

----------

## Cheesepie

Ive got my x server setup to use the radeon drivers  by default. 

Ive also got a different serverlayout configured to use the fglrx drivers, so I can still play Q3 and UT. You can start a non-default serverlayout with:

startx -- -layout fglrxLast edited by Cheesepie on Wed Sep 29, 2004 8:10 pm; edited 1 time in total

----------

## SeeksTheMoon

I tried to patch the latest (2.6.9-rc2) kernel with the software-suspend-2.0.0.109-for-2.6.9-rc2.tar.bz2 patch

applying the patches worked fine (no errors), but I cannot compile my kernel:

```

  CC      kernel/power/range.o

  CC      kernel/power/suspend.o

kernel/power/suspend.c: In function `attempt_to_parse_resume_device':

kernel/power/suspend.c:1148: warning: implicit declaration of function `get_fs'

kernel/power/suspend.c:1148: error: incompatible types in assignment

kernel/power/suspend.c:1148: warning: implicit declaration of function `set_fs'

kernel/power/suspend.c:1148: error: `KERNEL_DS' undeclared (first use in this function)

kernel/power/suspend.c:1148: error: (Each undeclared identifier is reported only once

kernel/power/suspend.c:1148: error: for each function it appears in.)

kernel/power/suspend.c: In function `suspend_write_compat_proc':

kernel/power/suspend.c:1250: warning: implicit declaration of function `copy_from_user'

kernel/power/suspend.c: In function `resume2_write_proc':

kernel/power/suspend.c:1455: error: incompatible types in assignment

kernel/power/suspend.c:1455: error: `KERNEL_DS' undeclared (first use in this function)

make[2]: *** [kernel/power/suspend.o] Error 1

make[1]: *** [kernel/power] Error 2

make: *** [kernel] Error 2

```

so what can I do to get this thing compiled?

I applied all patches from the package, because only 20* 21* 30* 31* isn't enough, e.g. 811-Kconfig-and-Makefile-for-suspend2 has to be applied too to be able to select swsup2 in menuconfig.

----------

## hyp0r

@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.

----------

## Cheesepie

 *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.

----------

## hyp0r

 *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.  :Smile: 

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?

----------

## rodericj

Not doing so good.

The original tutorial states:

```

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)

----------

## desertstalker

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?

----------

## yamakawa

Me!  :Very Happy: 

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...

----------

## desertstalker

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.

----------

## yamakawa

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

----------

## tuxlover

 *rodericj wrote:*   

> Not doing so good.
> 
> The original tutorial states:
> 
> ```
> ...

 

You need to install the kernel sources you want to patch, first.

```
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  :Smile: 

----------

## tuxlover

 *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.

----------

## mrv

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-

----------

## Bepcyc

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?

----------

## snappy173

 *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 ...

----------

## berarul

 *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
> ...

 

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.

----------

## berarul

 *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?

----------

## rodericj

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

```

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.

```

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!!!

----------

## berarul

 *rodericj wrote:*   

> 
> 
> ```
> 
> make && make modules_install
> ...

 

most likely you need to add

```

#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

```

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

----------

## rodericj

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?

----------

## berarul

try to apply all patches

----------

## afftas

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  :Wink: Last edited by afftas on Wed Oct 20, 2004 12:34 pm; edited 1 time in total

----------

## Halanegri

 *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?
> ...

 

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.

----------

## PranksterO

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:

```
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?

----------

## tobimat80

Well ist works (untill now without X). But my laptop doesn't power down. It just reboots. ? Why?

----------

## DarwinianCoeus

where should i start looking if i lockup during 'starting to save suspend image' or close to that effect

----------

## 3nd3r

perhaps this patch should be put in the kernel by default  :Razz: 

----------

## loudawg

I just tried swsusp2.1 with kernel 2.6.9-gentoo-r1, and I was excited when it worked perfectly on my first test.  However, it only worked because this was my first boot with the new kernel, and since I hadn't re-emerged the nvidia drivers for it, X didn't load.  So, without X, it works great.  However, when hibernating within X (or even from a console, with X loaded), upon resuming it freezes at seemingly random points while restoring the image.  For reference, I'm running a Toshiba 5105-S701 laptop.  Also, in case this makes a difference, I compiled in the LZF compression option.  I'll look more into this problem later.  If any of you have any ideas, I've love to hear from you, though.

~Lou

----------

## aliensex

 *tobimat80 wrote:*   

> Well ist works (untill now without X). But my laptop doesn't power down. It just reboots. ? Why?

 

I have the same problem.

UPDATE:  Never mind. I hadn't set CONFIG_SOFTWARE_SUSPEND_ACPI in the kernel config. It works like a charm now!  :Very Happy: 

----------

## hyp0r

What a damn thing. Sometimes after resuming my Mousepointer (touchpad of my notebook) is b0rked, which means, it doesn't work at all or has no acceleration, which means it is painful slow.

My Touchpad is originally a glidepoint alps and I patched the kernel to have synaptic-functions. Has anyone noticed this yet?

----------

## Pengwin

Hi gang. I'm pretty newbie-like and a bit confused about this. So, simple question....do I need it?

I've got an IBM t30 laptop running a 2.6.9-gentoo-r1 kernel. I've configured ACPI to be on and I've emerged ibm-acpi. 

Battery stuff appears fine with ACPI but suspend/standby via klaptop doesn't work. 

I thought enabling ACPI in the kernel was enough to do this but now I find this patch/software. What's the difference? Do I need it to be able to suspend/hibernate?

This newb is in dire need of explanation. 

Thanks for the help.

----------

## synthmeme

The kernel configuration for 2.6.9-r1 contains two options for software suspend: CONFIG_SOFTWARE_SUSPEND and CONFIG_PM_STD_PARTITION. Can anyone clarify the level of integration of swsusp this indicates?

If I want to use suspend/hibarnate functions on my ThinkPad A22P, do I still need to install the separate swsusp2 package? If so, is it still necessary to patch the kernel from that package? How much of the HOWTO that began this thread is still valid for 2.6.9?

Thanks for the clarification.

----------

## baeksu

I've gotten suspend to work with Nvidia drivers (I have a GeForce 4 on my box, which usually just gives a black screen on resume) while running X, thanks to a patch I found from the nvnews forums.

 Basically the patch just changes the expected behaviour of the nvidia module after resuming from a suspended mode. I posted my instructions in another thread. Please check it out and tell if it worked for you too.

https://forums.gentoo.org/viewtopic.php?p=1728324#1728324

----------

## devsk

some more ideas and settings (for the latest and fastest nvidia drivers ever) that you should know of  for suspend to work in this thread:

https://forums.gentoo.org/viewtopic.php?t=247704&postdays=0&postorder=asc&start=0

----------

## tobimat80

I've trouble patching my kernel (gentoo-dev-sources-2.6.8-r10) with the patches (software-suspend-2.1.3-for-2.6.9):

 *Quote:*   

> Applying 201-ati-agp ...
> 
> Applying 202-ne2k ...
> 
> Applying 204-frame-buffer-class-support ...
> ...

 

Help! What am I doing wrong?

Tobias

----------

## leha

 *Quote:*   

> I've trouble patching my kernel (gentoo-dev-sources-2.6.8-r10) with the patches (software-suspend-2.1.3-for-2.6.9): 

 

It is probably because you are using patch for a different version of kernel.

----------

## tobimat80

 *leha wrote:*   

>  *Quote:*   I've trouble patching my kernel (gentoo-dev-sources-2.6.8-r10) with the patches (software-suspend-2.1.3-for-2.6.9):  
> 
> It is probably because you are using patch for a different version of kernel.

 

Yes. But where do I find patches for my 2.6.8 kernel. I can only download patches for 2.6.9 kernels.

THX!

----------

## michael3

you can use the nitro Patch. They have integradet the software suspend patch and a lot of other patches.

Yes, you must upgrade to kernel 2.6.9

----------

## tuxlover

 *Pengwin wrote:*   

> I've configured ACPI to be on and I've emerged ibm-acpi. 
> 
> Battery stuff appears fine with ACPI but suspend/standby via klaptop doesn't work. 
> 
> I thought enabling ACPI in the kernel was enough to do this but now I find this patch/software. What's the difference? Do I need it to be able to suspend/hibernate?

 

 *synthmeme wrote:*   

> The kernel configuration for 2.6.9-r1 contains two options for software suspend: CONFIG_SOFTWARE_SUSPEND and CONFIG_PM_STD_PARTITION. Can anyone clarify the level of integration of swsusp this indicates?
> 
> If I want to use suspend/hibarnate functions on my ThinkPad A22P, do I still need to install the separate swsusp2 package? If so, is it still necessary to patch the kernel from that package? How much of the HOWTO that began this thread is still valid for 2.6.9?

 

Sorry about being unclear about this.

There are different swsusp-systems:

1) The one that is built into the kernel (swsusp*1*)

2) The one you get with patching the kernel (swsusp*2*)

After patching the kernel as decribed in this howto (a tiny bit outdated), you get 2 entries for swsusp:

```
Power management options (ACPI, APM)  --->

  [ ] Software Suspend (EXPERIMENTAL)

      Software Suspend 2  --->
```

"Software Suspend" is the the older implementation (swsusp*1*) whereas "Software Suspend 2" offers many more options (two image compression algorithms, etc.) Also, it will most likely work much better (it has been *extremely* stable for me for many months now).

So, do you need swsusp*2*? It depends... if the basic features of the swsusp in the current kernel are sufficient and if it works for your machine, I guess swsusp1 should be ok for you.

swsusp2 will be included in the kernel one day, I hope. I read that the kernel maintainers think it's too big a patchset to include at once, they would rather like to have small patches coming in from time to time, as they're much easier to review.

I hope this made things clearer.

----------

## tuxlover

Ok, people, really some news:

As I've not been able to keep up with changes of how swsusp2 is installed, I put this howto up at the gentoo wiki. 

Find it here:

HOWTO Software Suspend v2 at the gentoo wiki

Please go on discussing and asking questions here, the gentoo wiki discussion board is not too comfortable. I also changed a lot of stuff, the version at the wiki may be called up to date right now.

Looking forward to seeing you contribute to the howto at the wiki  :Smile: 

I would like to erase the howto in first post in this thread as I think it could confuse users - it's just too old. What do you all think about that?

----------

## michael3

 *tuxlover wrote:*   

> Ok, people, really some news:
> 
> Looking forward to seeing you contribute to the howto at the wiki 
> 
> I would like to erase the howto in first post in this thread as I think it could confuse users - it's just too old. What do you all think about that?

 

Hello

the hibernate Script is in the portage.

emerge sys-apps/hibernate-script

But it`s mask.

----------

## tuxlover

 *michael3 wrote:*   

> the hibernate Script is in the portage.
> 
> emerge sys-apps/hibernate-script

 

Thanks. Has anybody tried this? This is different than the original hibernation script from the swsusp2 homepage. Supposedly this also does suspend-to-ram...

----------

## asyr

 *yamakawa wrote:*   

> Me! 
> 
> 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...

 

I'm using 2.6.9 with swsusp2 2.1.3 and fbsplash. splash is working fine, swsusp2 is working fine, but there is no co-operation of them!

I had no success to get swsusp2 to co-operate with fbsplash. The 'bootsplash' scriptlet it's not compatible with fbslash. If you get them work together, just share your experience with us...

----------

## afftas

Hi

The hibernation script from portage works very well. Although, the configuration file must be edited in order to suspend to disk.

I tried to suspend to mem, but my laptop freeses after waking up. It keeps the blank screen, and the cooling fan starts to work very noisly.

I also tried standby, but, instead of continuing what I was doing, my laptop reboots after waking up (entering runlevel 0...)

I did these 2 test echoing to /sys/power/state

Is there anything I can do to change this behavior?

----------

## tuxlover

 *afftas wrote:*   

> Is there anything I can do to change this behavior?

 

My machine (acer tm 800) does exactly the same thing as yours.

I think the results of trying suspend-to-ram (and/or standby) are very machine dependent. I.e. you should try to find someone with the same machine that you have it who succeeded.

Sometimes it supposedly helps to fix a broken acpi dsdt. If you're lucky, someone has already done it for your machine, and you can find a fixed dsdt at http://acpi.sourceforge.net/dsdt/index.php . You can load it whenever you recompile your kernel; it's easy.

See also: HOWTO: Fix Common ACPI Problems (DSDT, ECDT, etc.)

----------

## taskara

thanks for this howto  :Smile: 

I have a Dell 700M, and suspend is now working well, however a have a little problem (not a major one, but thought I'd ask!)

When I resume from a suspended state back to X, the screen is there, but blank.

I have to go to another terminal (ie ctrl + alt + f1) and back to X and then it draws everything on my screen.

anyone else with the same issue?

cheers and thanks again!

edit: also, perhaps you can add to the wiki the way to use multiple grub config files?

It's really easy and saves you having to choose to resume a suspended state when you boot up. (I used to have two grub entries, one for normal boot and one for resuming a suspend).

Just mount /boot and make a copy of your grub.conf and call it grub.conf.resume

make sure it has the resume information on the kernel line ie

```
resume2=swap:/dev/YOURSWAP
```

now in your regular grub file you don't need any suspending information, but I suggest that on your kernel line you have 

```
"resume2=swap:/dev/YOURSWAP noresume2"
```

Now save those files under /boot/grub/ and edit your /etc/hibernate/hibernate.conf:

```
### grub

ChangeGrubMenu yes

GrubMenuFile /boot/grub/grub.conf

AlternateGrubMenuFile /boot/grub/grub.conf.resume

```

Last but not least, to use this, /boot needs to be mounted on bootup (which is not the gentoo default). So edit your /etc/fstab file to

```
/dev/hdX               /boot           ext3            noatime         0 0
```

 replacing of course your /boot device and filesystem.

Now boot will be loaded automatically at startup, and unmounted at shutdown.

When you suspend your machine, hibernate will automatically swap the grub configs for you, and when you reboot you will only have the option to resume!

This is very handy so you don't have to choose to resume, and you won't forget to. Just turn your laptop on and walk away, and it will resume if you had suspended, or boot normally if you hadn't.

If someone has already doco'd this somewhere I apologise.

Cheers!

----------

## olgaAr

I just got 2.6.9-gentoo-r9 working with swsusp2. It's working pretty good, I am only experiencing one issue: my X-Server doesn't recognize my keyboard any more after a resume. As it is a laptop I am having trouble with, I suspect it is a PS/2-related issue. Strangely, my synaptics touchpad works flawlessly... Having said that, a USB keyboard works as well...

UPDATE: Having switched from xfree to xorg, it now works like a champ without any changes!   :Razz: 

----------

## Hauser

 *taskara wrote:*   

> I have a Dell 700M, and suspend is now working well, however a have a little problem (not a major one, but thought I'd ask!)
> 
> When I resume from a suspended state back to X, the screen is there, but blank.
> 
> I have to go to another terminal (ie ctrl + alt + f1) and back to X and then it draws everything on my screen.
> ...

 

What resolution do you use?  If I use 1024x768, hibernate+resume works without the problem you mentioned, but if I use 1280x800 (with the 855 resolution patch), X will crash when resuming.  :Sad: 

----------

## tuxlover

 *taskara wrote:*   

> thanks for this howto 

  You're welcome  :Very Happy: 

 *taskara wrote:*   

> also, perhaps you can add to the wiki the way to use multiple grub config files?
> 
> It's really easy and saves you having to choose to resume a suspended state when you boot up. (I used to have two grub entries, one for normal boot and one for resuming a suspend).

 

I hadn't heard of this before, interesting. Although I don't quite understand the way you use it: If you boot normally (without resuming) you can still give the "resume2=swap:/dev/swap" option to your kernel. swsusp2 will detect if there is an image in swap, if there isn't, it will boot normally.

But what several grub configs could make sense for is when you have entries in your grub that would mount the root partition used by your suspended system and therefore could destroy data... So when resuming, grub should not offer these (possibly harmful) options.

E.g. I have gentoo and debian on my machine, both auto-mounting the other's root fs, as /mnt/gentoo_root or /mnt/debian_root, respectively. If I suspend my gentoo, I need to make sure I don't boot up debian, because it will try to mount gentoo's suspended root filesystem, which could damage it. So in this case, swapping grub configs could make sense in order to remove my debian entry. My windows entry should stay though.

Or what do you all think?

I will play with this  :Smile: 

 *taskara wrote:*   

> also, perhaps you can add to the wiki

  Hey, you can do it, too  :Cool: 

----------

## X-Drum

 *aliensex wrote:*   

>  *tobimat80 wrote:*   Well ist works (untill now without X). But my laptop doesn't power down. It just reboots. ? Why? 
> 
> I have the same problem.
> 
> UPDATE:  Never mind. I hadn't set CONFIG_SOFTWARE_SUSPEND_ACPI in the kernel config. It works like a charm now! 

 

i have the same problem but i can't see CONFIG_SOFTWARE_SUSPEND_ACPI

in my kernel config! O_o

why?

----------

## lefou

Has anyone successfully patched gentoo-dev-sources-2.6.10-r4 with Software Suspend 2? I got some error with the first patch, because some other gentoo patches had modified the sources, too.

----------

## asyr

Same here for both software-suspend-2.1.5.11-for-2.6.10 and software-suspend-2.1.5.12-for-2.6.10.

----------

## drakos7

Trying to patch gentoo-dev-sources-2.6.10-r4 and no luck. Tried:

. software-suspend-2.1.5-for-2.6.9  (gets a little farther than...)

. software-suspend-2.1.5.10-for-2.6.10

. software-suspend-2.1.5.11-for-2.6.10

. software-suspend-2.1.5.12-for-2.6.10

----------

## jphelps

On my system this appears to be to the presence of the bootspash/splash-util stuff in the kernel sources for gentoo-2.6.10-r4.  It's impacting the following patches in the software-suspend-2.1.5.14-for-2.6.10 tarball.

100-kdb-v4.4-2.6.10-common-1 will not apply cleanly

130-bootsplash-3.1.4-2.6.10.diff will not apply cleanly

911-single-get_cmos_time-call will not apply cleanly

913-add-__get_cmos_time-quick-call will not apply cleanly

950-check-mounts will not apply cleanly

951-proc-changes-and-try-XX-renames will not apply cleanly

953-page-to-pfn will not apply cleanly

955-readahead will not apply cleanly

957-move-plugin-init-call will not apply cleanly

961-optional-check-mounts will not apply cleanly

993-Checksumming-warning will not apply cleanly

----------

## taskara

I couldn't even get 2.1.5.14 to patch against vanilla 2.6.10..!  :Confused: 

----------

## tuxlover

 *taskara wrote:*   

> I couldn't even get 2.1.5.14 to patch against vanilla 2.6.10..! 

 

2.1.5.12 patched flawlessly against vanilla and is working good here so far.

----------

## taskara

ok I'll give r12 a go..

also anyone have an issue whereby when they resume a suspend, X is not displayed properly, so you have to switch to another terminal and back to get it to work?

this is on a centrino laptop i810 Xorg driver

----------

## blueSceaDa

Hi I hope it's ok if i ask here..

i followed all the instructions at http://gentoo-wiki.com/HOWTO_Software_Suspend_v2 but "hibernate" always tells me there is an error which i can find in dmesg, in dmesg there is:

```
Software Suspend 2.1.5.14: Software suspend is disabled.

This may be because you haven't put something along the lines of

resume2=swap:/dev/hda1

in lilo.conf or equivalent. (Where /dev/hda1 is your swap partition
```

Where else do I need to put it, than in lilo's append line for my kernel and in the hibernate.conf ?

Thanks for any help !

----------

## tuxlover

 *blueSceaDa wrote:*   

> Hi I hope it's ok if i ask here..

 It's absolutely ok, that's what this thread is for.

 *Quote:*   

> "hibernate" always tells me there is an error which i can find in dmesg, in dmesg there is:
> 
> ```
> Software Suspend 2.1.5.14: Software suspend is disabled.
> 
> ...

 Did you run lilo after making the change? Could you post your /etc/lilo.conf? Are you sure what you defined there actually is your swap partition (maybe take a look at /etc/fstab and the output of cfdisk and look for your swap partition)?

----------

## blueSceaDa

Yes I reran lilo, i'm also 100% sure it is my swap partition ...

```
lba32

boot = /dev/hda

map = /boot/current.map

#    boot-text.b

#    boot-menu.b

#    boot-bmp.b

install = /boot/boot-menu.b

menu-scheme=Wb

prompt

timeout=100

delay = 50

vga = normal

#vga = 791

default = Gentoo-SWS

image = /boot/k2610sws

   vga=791

   root = /dev/hda4

   #root = /devices/discs/disc0/part3

   label = Gentoo-SWS

   read-only # read-only for checking

   append = "resume2=swap:/dev/hda3 video=vesafb:ywrap,mtrr devfs=nomount gentoo=nodevfs"

[...]
```

----------

## taskara

it says it "MAY BE because you forgot that line" the problem's not neccessary there  :Wink: 

what options did you select in your kernel? could you post your .config? (just the power management section)

----------

## blueSceaDa

i have these (left out the unset stuff)

```

CONFIG_PM=y

CONFIG_SOFTWARE_SUSPEND2=y

CONFIG_SOFTWARE_SUSPEND2_BUILTIN=y

CONFIG_SOFTWARE_SUSPEND_SWAPWRITER=y

CONFIG_SOFTWARE_SUSPEND_LZF_COMPRESSION=y

CONFIG_SOFTWARE_SUSPEND_TEXT_MODE=y

CONFIG_SOFTWARE_SUSPEND_DEFAULT_RESUME2="/dev/hda3"

CONFIG_SOFTWARE_SUSPEND_CHECK_RESUME_SAFE=y

```

//edit: sry forgot acpi stuff:

```

CONFIG_ACPI=y

CONFIG_ACPI_BOOT=y

CONFIG_ACPI_INTERPRETER=y

CONFIG_ACPI_AC=y

CONFIG_ACPI_BATTERY=y

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_FAN=m

CONFIG_ACPI_PROCESSOR=m

CONFIG_ACPI_THERMAL=m

CONFIG_ACPI_BLACKLIST_YEAR=0

CONFIG_ACPI_BUS=y

CONFIG_ACPI_EC=y

CONFIG_ACPI_POWER=y

CONFIG_ACPI_PCI=y

CONFIG_ACPI_SYSTEM=y

```

----------

## the_g_cat

Hiho,

I would have 2 questions myself, concerning the nvidia driver and S3 suspend (aka suspend-to-ram), cause I can't get any of them to work correctly. My actual working hibernate.conf looks like this:

```
UseSwsusp2 yes

Reboot no

EnableEscape yes

DefaultConsoleLevel 1

PowerdownMethod 4

Verbosity 0

LogFile /var/log/hibernate.log

LogVerbosity 1

Distribution gentoo

SaveClock yes

UnmountFSTypes nfs

OnSuspend 20 echo "Good night!"

OnResume 20 echo "Good morning!"

UnloadModules snd_intel8x0

UnloadBlacklistedModules yes

LoadModules auto

GentooModulesAutoload yes

DownInterfaces eth0

UpInterfaces auto

RestartServices xdm

OnResume 21 /etc/init.d/alsasound restart

OnResume 21 /mynfsmounts/tobe/remounted
```

Yes, I realize restarting alsasound on resume isn't nearly as neat as it would be putting it in RestartServices, but if I do, alsasound won't load correctly on resume. 

Concerning the nvidia driver: as you can see, I had to put xdm in the RestartServices, because my screen goes to stand-by after resuming with nvidia still enabled, even though I now use nvagp. Would anyone have a good tip for that ?

Second problem: I have an NF7-S Rev.2.0 (nf2 400), but it won't suspend to ram. If I set PowerdownMethod to 3, it just powers down, and boots up again right from the beginning, and eventually reloads the kernel, and seems to be stuck there. I once caught a glimpse at what I thought was some error just before powering down, but I can't find an sign of it in the log. Would be very nice to get that to work too  :Very Happy: 

EDIT: well, the pc gets resumed normally after a 'faulty' S3, but that doesn't make the S3 very useful...

EDIT²: there it gets complicated. I have an option called "Suspend type" (or something alike) in the BIOS, which I can put tu S1 or S3. When it is on S1, going to S3 with hibernate behaves like going to S4, whereas if this option is on S3, the computer will turn on without any sign of a BIOS or something alike (that's what it should be), but the screen remains on standbye and the computer shuts down quiet rapidly after that (that's not what we want). Gonna try it without acpid (which I don't use anyway  :Very Happy:  )

EDIT^3: So now with this BIOS option on S3 and hibernate being configured for S3 and with acpid disabled, I can wake from an S3, but the screen won't work, at least the computer stays on (*shrugs* should have tried to ssh on that box at this time)Last edited by the_g_cat on Mon Jan 24, 2005 11:15 pm; edited 2 times in total

----------

## taskara

blueSceaDa

your kernel config looks good - however reading the swsp howto it tells me that the command should go on the KERNEL line under lilo (I haven't used lilo for years):

 *Quote:*   

> You must set the resume kernel option to the swap partition you want to use for suspension. If your partition is, for instance, the third primary one on first ide disk (/dev/hda3) you have to append "resume2=swap:/dev/hda3" as a kernel parameter in your lilo.conf file.

 

so I think you should try something like this:

```
image = /boot/k2610sws resume2=swap:/dev/hda3

   vga=791

   root = /dev/hda4

   #root = /devices/discs/disc0/part3

   label = Gentoo-SWS

   read-only # read-only for checking

   append = "video=vesafb:ywrap,mtrr devfs=nomount gentoo=nodevfs"

[...]
```

----------

## tuxlover

 *taskara wrote:*   

>  *Quote:*   append "resume2=swap:/dev/hda3" as a kernel parameter in your lilo.conf file. 
> 
> 

 Isn't this just what the lilo 'append="..."' thingy should do?

But I don't know either, I've been using grub forever...

----------

## taskara

 *tuxlover wrote:*   

>  *taskara wrote:*    *Quote:*   append "resume2=swap:/dev/hda3" as a kernel parameter in your lilo.conf file. 
> 
>  Isn't this just what the lilo 'append="..."' thingy should do?
> 
> But I don't know either, I've been using grub forever...

 

*should*  :Wink:  but all I know is that it's not working, it's complaining that the line does not exist, and the howto says to add it to the kernel line.. so I could be wrong, but it's prob worth a shot  :Wink: 

----------

## blueSceaDa

@the_g_cat

thanks to you ! the config you posted made clear to me that i have to comment out some stuff i did not ... "EnableEscape yes" and "DefaultConsoleLevel 1" ... it now works with console, but didnt try with X

----------

## the_g_cat

 *blueSceaDa wrote:*   

> @the_g_cat
> 
> thanks to you ! the config you posted made clear to me that i have to comment out some stuff i did not ... "EnableEscape yes" and "DefaultConsoleLevel 1" ... it now works with console, but didnt try with X

 

You're wellcome, but I only took the default hibernate.conf, read some how-to's and the comments, and it works (for console at least)  :Laughing: 

----------

## blueSceaDa

i just read the howto at the gentoo-wiki and used hibernate from portage   :Confused: 

anyway it works now   :Very Happy: 

and i used the append="resume2=swap:/dev/hda3" from lilo ... not:

"image = /boot/k2610sws resume2=swap:/dev/hda3" ... lilo reports a error then !

----------

## taskara

cool  :Smile: 

----------

## falconn

Hi all, 

I've a problem with Software suspend with my 2.6.9 kernel from kernel.org. I've no error message when I applied the patches but at boot time all modules can't be loaded (Invalid module format...). 

Do you know what is wrong?

----------

## tuxlover

Sounds like a kernel compilation/installation issue. Make sure  /usr/src/linux is a softlink pointing to the right kernel source directory before building the kernel.

Maybe also post the outputs of

ls -l /usr/src/

ls -l /lib/modules

uname -a

here.

----------

## taskara

and or build them directly into the kernel, rather than modules, but I agree with tuxlover - you should fix the problem anyway

----------

## UnknownOrigin

Where can I find a kernel patch for 2.6.10-r6? The ones at http://developer.berlios.de/project/showfiles.php?group_id=1412 do not work.

----------

## tuxlover

You have a gentoo specific kernel source tree (gentoo-dev-sources) installed. The swsusp people will not release a patch for it. Either

a) change the official swsusp patch to match your kernel source (often pretty easy) or

b) install a different (official, i.e. vanilla) kernel version, like development-sources-2.6.10.

The gentoo-dev-sources contain additional patches to vanilla, many of which you really don't need (e.g. ones not applying to your platform). You can also choose which patches (out of those) to apply, easily. Just ask.

----------

## jakob42

 *tuxlover wrote:*   

> You have a gentoo specific kernel source tree (gentoo-dev-sources) installed. The swsusp people will not release a patch for it. Either
> 
> a) change the official swsusp patch to match your kernel source (often pretty easy) or
> 
> 

 

Hm, im familiar with building kernels and applying patches, but I never altered a patch...

 *tuxlover wrote:*   

> 
> 
> b) install a different (official, i.e. vanilla) kernel version, like development-sources-2.6.10.
> 
> The gentoo-dev-sources contain additional patches to vanilla, many of which you really don't need (e.g. ones not applying to your platform). You can also choose which patches (out of those) to apply, easily. Just ask.

 

Yeah, I would do that. How do I select the patches I want in gentoo-dev-sources?

TIA

----------

## tuxlover

 *jakob42 wrote:*   

> Hm, im familiar with building kernels and applying patches, but I never altered a patch...
> 
> 

 It's often only a couple of lines that got shuffled around in the source, or some spaces that got introduced... sometimes it's also easy to manually apply the changes the patch would apply.

 *Quote:*   

> Yeah, I would do that. How do I select the patches I want in gentoo-dev-sources?

 

gentoo-dev-sources is really just 3 packages (downloaded to /usr/portage/distfiles):

the actual kernel (vanilla), like linux-2.6.10.tar.bz2

the gentoo patchset (base package), like genpatches-base-2.6-10.07.tar.bz2

the gentoo patchset (extras. package), like genpatches-extras-2.6-10.07.tar.bz2

Basically you can install the official vanilla source tree with emerge development-sources. After that, emerge but "download only" the gentoo-dev-sources, which gives you the genpatches described above:

```
emerge --fetchonly gentoo-dev-sources
```

Then you can unpack the genpatches to say /usr/src/:

```
cd /usr/src/

tar xjf /usr/portage/distfiles/genpatches-2.6-10.07-base.tar.bz2

tar xjf /usr/portage/distfiles/genpatches-2.6-10.07-extras.tar.bz2
```

As they're only simple patchsets, you can manually apply (or unapply) patches out of those, leaving out the ones you're sure you don't need, just take a look:

```
ls genpatches-2.6-10.07

0000_README

1100_drm-dos-fix.patch

1105_capabilities-module-fix.patch

1106_capabilities-module-fix-2.patch

1110_smbfs-dos-fix.patch

1115_sys-uselib-fix-1.patch

1116_sys-uselib-fix-2.patch

1120_moxa-overflow.patch

[...]

```

You can probably delete the ones you don't want, and then simply apply them from your kernel source tree:

```
cd /usr/src/linux

cat /usr/src/genpatches-2.6-10.07/* | patch -p1
```

(I know you're familiar with doing this but maybe someone else wants to know  :Smile:  )

----------

## jakob42

Thanks, I never thought of this possibility. I thought there is a conf-file where to put all the patches you dont want. Would be a good thing actually...

I give it a try, I'm sure I'll be able to apply the swsusp-patch then.

----------

## mOjO_420

ok.. hibernate works beautifully (thank you kindly)

but suspend does not...

any attempt to go into S3 state (whether via swsusp2 or sysfs or acpi) goes into that state fine.  the machine powers down and the fans stop and the suspend light blinks.  however, when i hit the power button or open the lid to return it from this state the fans kick on and everything seems ok but the screen never comes back and the machine is in some kind of limbo.  its completely locked up and does not respond to pings or the three finger salute or anything.  so i have to hold down the power button for 5 secs and hard reset it.  now when it boots back up it restores the suspend data (quicker than a full hibernate even) and i'm back to my desktop without issue.  but of course if that were what i wanted i would just have sent it into full hibernate.  I want it to pop in and out of standby just like when i close/open the lid in windows.   

its an HP Pavilion ze5270 and /sys/power/state shows: standby, mem,  shutdown  and i'm sure it supports S3 S4 and S5 states.... but since i cant see the dmesg logs because it crashes i'm not sure whats wrong... hibernate logs just show it going right into S3 like everythings fine... just never returns (until i hard reset it back up)

what should i be looking at?

----------

## tuxlover

 *mOjO_420 wrote:*   

> but suspend does not...

 

Honestly, I've no idea about how to fix suspend-to-RAM. I've the exact same problem as you (machine goes into s3 but when waking up only the cpu fan seems to wake up  :Smile:  )

 *Quote:*   

> now when it boots back up it restores the suspend data (quicker than a full hibernate even) and i'm back to my desktop without issue.  

 

That's not really possible... does it really take you back to your desktop as you left it when you were last using it? With all the programms running and so? Because s3 only suspends to RAM and when you reset, RAM is erased...

Anyway sorry I don't have better ideas. I haven't heard of a lot of laptop where suspend-to-RAM works under linux. I'm still hoping for the kernel gurus to iron out all the acpi flaws in today's bioses.

----------

## mOjO_420

 *tuxlover wrote:*   

> 
> 
>  *mOjO wrote:*   now when it boots back up it restores the suspend data (quicker than a full hibernate even) and i'm back to my desktop without issue.   
> 
> That's not really possible... does it really take you back to your desktop as you left it when you were last using it? With all the programms running and so? Because s3 only suspends to RAM and when you reset, RAM is erased...
> ...

 

yeah... i was equally confused.  maybe my configs are goofy... i'll have to post my config when i get home tonight.  it appears to be storing it to disk despite my settings.   even though i specified 'nocache' and really tried most every option.   i read somewhere (i think it was in output from "hibernate -h") that you can recover from a power failure during standby... that also confuses me.

 *tuxlover wrote:*   

> Anyway sorry I don't have better ideas. I haven't heard of a lot of laptops where suspend-to-RAM works under linux. I'm still hoping for the kernel gurus to iron out all the acpi flaws in today's bioses.

 

yeah... i wouldnt expect much if this was one of those laptops with buggy standby issues but it works beautifully in WinXP (very quick even).  I have a friend with a Thinkpad who uses APM and he setup standby with no issue but cant do hibernate (i dont think he's tried swsuspv2 or comiled in acpi).  But I wonder if I could use APM for standby and ACPI for everything else...?  anyone know if thats a good/bad idea?  (i havent even verified that standby works with APM yet.)

----------

## Stefun

It drives me crazy...I can´t make it to work....

Sometimes it suspends correctly but when i want to boot it ... it boots the regular way.

When i do a dmesg this is what I get : 

Software Suspend 2.1.5.15: Missing or invalid storage location (resume2= parameter). Please correct and rerun lilo (or equivalent) before suspending.

Sometimes it won´t even suspend...It will only restart kde and get me back to kdm and that´s it...

Sometimes it gives me a kind of error...Oops : 0000 ... the modules are listed and some addresse likde 00x00 ...

It sux...

If anyone has any ideeas please say something.

P.S. After suspend complets successfully and it boots normally i see smth like swapon invalid argument...

----------

## mOjO_420

i think it sounds like you need to fix your kernel settings... 

set a default resume partition... 

set it to your swap partition should prolly work.

----------

## mjans

I've got suspend-to-RAM working. It's on a Dell Inpiron 510m, which does have an Intel Extreme Graphics 2 graphics card. It cannot suspend-to-RAM on the normal way, only when using the vesa driver of X.org, but then my highest resolution is 1024x768 with 8 bit colors. My trick is to start a second X server (this time with vesa driver) and then go to suspend. After resume the second X server will terminate and you can go further with your work in the first X server. It works very great for me!

I've explained how to do this at https://forums.gentoo.org/viewtopic.php?p=2077314. Maybe it'll work for you too.

----------

## mOjO_420

hmmm... well i do use vesa-tng and xorg's default ATI drivers (1024x768@60hz) for my Radeon 345M Mobile chip.  After much messing around with radeon drivers that don't support my chip I settled on this and I actually have DRI working so i'm not inclined to change my video settings.  Next time I do that, it will be to tinker with the TV out or a secondary monitor.

uhh.. yeah, i digressed.. i did see some interesting things you were doing.  echoing "mem" to /sys/power/state for one is not something i knew about.

i'll take a good long look at it later tonight and maybe tinker a bit.  it's something i'm reluctant to screw with too much because it locks the whole system and i have to hard reset the power everytime.

----------

## osbourd2

I'm kinda struggling to get my head around this at the moment.

I build a development 2.6.10-r1 kernel as per the Wiki.  When I run hibernate I get the following:

```

dangermouse root # hibernate -v3        

hibernate: [01] Executing LockFileGet ...

hibernate: [10] Executing EnsureSysfsPowerStateCapable ...

hibernate: [70] Executing ClockSave ...

hibernate: [89] Executing SaveKernelModprobe ...

Saved /proc/sys/kernel/modprobe is /sbin/modprobe

Saved /proc/sys/kernel/hotplug is /sbin/hotplug

hibernate: [91] Executing ModulesUnloadBlacklist ...

Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules

Module version for ipw2100 is

Module version for ipw2200 is

Module version for ndiswrapper is

hibernate: [99] Executing DoSysfsPowerStateSuspend ...

hibernate: Activating sysfs power state disk ...

hibernate: [90] Executing ModulesLoad ...

hibernate: [89] Executing RestoreKernelModprobe ...

hibernate: [70] Executing ClockRestore ...

hibernate: [01] Executing LockFilePut ...

```

And at that point is exits and does nothing else.  

Incidentally hibernate closes down the system from my gentoo-dev-sources 2.6.10-r6 kernel but then the development 2.6.10-r1 kernel fails to pick up the image in swap - becuase it is a different kernel signature.

The hibernate config files are all standard as per the emerge.

I'm all out of ideas  :Confused: 

----------

## Jas-Nix

I am getting the same problem.  I am using the 2.6.10-morph22 sources, it already had support for suspend built into the kernel,  I followed the wiki to build everything and I emerged hibernate-script.

Any Ideas?

 *osbourd2 wrote:*   

> I'm kinda struggling to get my head around this at the moment.
> 
> I build a development 2.6.10-r1 kernel as per the Wiki.  When I run hibernate I get the following:
> 
> ```
> ...

 

----------

## mOjO_420

 *osbourd2 wrote:*   

> I'm kinda struggling to get my head around this at the moment.
> 
> I build a development 2.6.10-r1 kernel as per the Wiki.  When I run hibernate I get the following:
> 
> Incidentally hibernate closes down the system from my gentoo-dev-sources 2.6.10-r6 kernel but then the development 2.6.10-r1 kernel fails to pick up the image in swap - becuase it is a different kernel signature.
> ...

 

No need to run vanilla 2.6.10-r1, thats just what the author of the wiki was using when he wrote it..  I use gento-dev-sources 2.6.10-r5 andit works fine, and if r6 properly hibernates your system then i'm not seeing the issue.

----------

## osbourd2

 *mOjO_420 wrote:*   

>  *osbourd2 wrote:*   I'm kinda struggling to get my head around this at the moment.
> 
> I build a development 2.6.10-r1 kernel as per the Wiki.  When I run hibernate I get the following:
> 
> Incidentally hibernate closes down the system from my gentoo-dev-sources 2.6.10-r6 kernel but then the development 2.6.10-r1 kernel fails to pick up the image in swap - becuase it is a different kernel signature.
> ...

 

There is no Suspend2 option in the kernel menu though and patching patching the gentoo-dev-sources kernel fails.

I did try passing the resume2=swap:/dev/hda2 switch to the gentoo-dev kernel from grub but it took no notice of it.

So the issue with using the gentoo-dev kernel is not hibernating, more resuming the system afterwards!  :Smile: 

----------

## mOjO_420

 *osbourd2 wrote:*   

> 
> 
> There is no Suspend2 option in the kernel menu though and patching patching the gentoo-dev-sources kernel fails.
> 
> I did try passing the resume2=swap:/dev/hda2 switch to the gentoo-dev kernel from grub but it took no notice of it.
> ...

 

that means that the suspend options you are seeing are for the original swsusp and not swsusp2 (which is what this thread is dealing with)

you'll have to figure out how to get your sources patched... you'll know once they are, the menuconfig on the kernel is noticably different (has some Win4Lin crap in there too after patching) i think i remember i got some errors too originally but got around them somehow... sorry my memory is shot.  although you are using r6 and i'm using r5. so maybe i'd get the same errors.  I havent read the release notes for r6 so i dunno if its worth me upgrading.

I had the original working myself at one point and then I think i messed around with video drivers or something else (it does not like ATI drivers) and the long short of it was at some point through kernel changes or video card driver changes the original swsusp support stopped working mysteriously and i started looking on the forums and found this thread and got my kernel patched for swsusp2 and the hibernate feature has been working great... now i really want to get standby (Suspend to ram) working... and i'd like to tweak swsusp2 to go a little faster, but alas time is at a premium these days for me...  :Wink: 

i really wish there was USE flag for swsusp2 that would let us choose to apply the patch when emerging the kernel.

----------

## Bluesman

If anyone got suspend working with nvidia's drivers while in X, please could you post your setup? (nvidia-kernel/glx version, which card, kernel, acpi version, swsup2 version, anything special). I'm trying to figure out why the on earth cant i make it get resume, I get to the part where it's supposed to show X, but the monitor stays black and the net is down, no kernel panic... This is all on dell inspiron 8000 with gforce 2 go.

Thanks.

----------

## sarah_t_s

Hmm....

This could be because I'm an amd64 user... but, it doesn't compile... am I doing something wrong or is this kind of expected?

emerge'd a copy of 2.6.10-r1 which seems to be the kernel of choice in the HOWTO on the Wiki. 

From the swsusp2 page I down load a copy of the patch, unpack it and apply to the kernel. 

It doesn't moan or whinge about anything so I'm assuming it all works fine. 

now, I, being a n00b then went it, jiggled with kernel config and rammed it back in to genkernel's default settings's file. This didn't work out too well. But I through trying make bzImage might prove more useful output. 

```
bash-2.05b# make bzImage

  CHK     include/linux/version.h

make[1]: `arch/x86_64/kernel/asm-offsets.s' is up to date.

  CHK     include/linux/compile.h

  CHK     usr/initramfs_list

  CC      kernel/power/suspend_builtin.o

kernel/power/suspend_builtin.c:15:25: asm/highmem.h: No such file or directory

In file included from kernel/power/suspend_builtin.c:20:

kernel/power/suspend2_core/pageflags.h: In function `__get_next_bit_on':

kernel/power/suspend2_core/pageflags.h:114: error: `max_mapnr' undeclared (first use in this function)

kernel/power/suspend2_core/pageflags.h:114: error: (Each undeclared identifier is reported only once

kernel/power/suspend2_core/pageflags.h:114: error: for each function it appears in.)

kernel/power/suspend2_core/pageflags.h:115: error: `mem_map' undeclared (first use in this function)

kernel/power/suspend_builtin.c: In function `suspend_check_mounts':

kernel/power/suspend_builtin.c:402: warning: implicit declaration of function `mounts_are_S4_resume_safe'

kernel/power/suspend_builtin.c:404: warning: implicit declaration of function `get_S4_resume_unsafe_mounts'

kernel/power/suspend_builtin.c: In function `mark_task_as_pageset1':

kernel/power/suspend_builtin.c:454: error: dereferencing pointer to incomplete type

kernel/power/suspend_builtin.c:457: error: dereferencing pointer to incomplete type

kernel/power/suspend_builtin.c:460: error: dereferencing pointer to incomplete type

kernel/power/suspend_builtin.c:460: error: dereferencing pointer to incomplete type

kernel/power/suspend_builtin.c:461: warning: implicit declaration of function `follow_page'

kernel/power/suspend_builtin.c:461: warning: initialization makes pointer from integer without a cast

kernel/power/suspend_builtin.c:463: error: `mem_map' undeclared (first use in this function)

make[2]: *** [kernel/power/suspend_builtin.o] Error 1

make[1]: *** [kernel/power] Error 2

make: *** [kernel] Error 2

```

Anyone got any ideas?

----------

## Bluesman

 *sarah_t_s wrote:*   

> Hmm....
> 
> This could be because I'm an amd64 user... but, it doesn't compile... am I doing something wrong or is this kind of expected?
> 
> ....
> ...

 

From what I've heard, the amd64 isn't really supported and friend had major issues even compiling it, after using I think either 2.6.11-rc4 or -rc5 kernel with apropriate patch, it compiled, getting suspend to work was another thing though. As far as he got was constant reboots after trying to load the image. I suggest you subscribe to the swsup2 mailing list and keep your eye on it since the developer got an amd64 laptop and is trying to get the thing working.

----------

## sarah_t_s

 *Bluesman wrote:*   

>  *sarah_t_s wrote:*   Hmm....
> 
> This could be because I'm an amd64 user... but, it doesn't compile... am I doing something wrong or is this kind of expected?
> 
> ....
> ...

 

Hmm. Thanks for the advice, I think I'll plug-in to it in the morning. 

I'd suspected it was an amd64 thing :-/ 

Not too sure why your friend had major problems with the build phase of things though, I just whacked in the x86_64 2004.3 livecd and plodded through the handbook. It works swimingly other than a few bits of hardware (ENE card reader and a winmodem)... still we each encounter our problems  :Smile: 

----------

## paulie

 *osbourd2 wrote:*   

> I'm kinda struggling to get my head around this at the moment.
> 
> I build a development 2.6.10-r1 kernel as per the Wiki.  When I run hibernate I get the following:
> 
> And at that point is exits and does nothing else.  
> ...

 

I'm having the same problem here with a 2.6.11 kernel.  I've patched and recompiled the kernel, and Software Suspend 2 seems to be starting...

```

root ~ $ dmesg |grep Suspend

Software Suspend Core.

Software Suspend LZF Compression Driver registered.

Software Suspend Swap Writer registered.

Software Suspend 2.1.8: Swap space signature found.

Software Suspend 2.1.8: Suspending enabled.

Software Suspend 2.1.8: This is normal swap space.

```

But when executing the hibernate script, it seems to hibernate and then immediatly come back!  The output of 'hibernate -v3' is IDENTICAL to osbourd2's

The only thing I did differently than the howto, was adding a default swap drive into the kernel config:

```

--- General Options

       (swap:/dev/hda3)    Default resume device name  

```

I know its a long shot, but its the only thing I can think of.  Maybe it should read '/dev/hda3' or maybe it's simply broken.  I'll try removing this from the kernel tomorrow and report back

Out of curiosity to those with the same problem:  What's your hardware?  Im running a Dell Latitude C400

I could post the output of hibernate -v4 if anyone thinks that will be useful....

Any Ideas?

-Paulie

----------

## paulie

 *paulie wrote:*   

>  *osbourd2 wrote:*   I'm kinda struggling to get my head around this at the moment.
> 
> I build a development 2.6.10-r1 kernel as per the Wiki.  When I run hibernate I get the following:
> 
> And at that point is exits and does nothing else.  
> ...

 

Okay, I've figured it out.  If your having this problem, you'll need to edit /etc/hibernate/hibernate.conf, and ensure that you are using Software Suspend 2 (UseSwsusp2 yes)

-Paulie

----------

## iandow

I'm running kernel 2.6.11-mm with the stock Software Suspend implementation enabled.  My machine is a Dell X300.  When I run hibernate, it crashes with the following errors:

Stopping tasks: ==========================|

Freeing memory... done  (10574 pages freed)

swsusp: Need to copy 6699 pages

swsusp: critical section\: done (6731 pages copied)

PCI: 000:00:02.0 has unsupported PM cap regs version (1)

ACPI: PCI interrupt 0000:00:02.0[A] -> GSI 10 (level, low) -> IRQ 10

PCI: 000:00:02.0 has unsupported PM cap regs version (1)

PCI: Setting latency timer of device 0000:00:1d.0 to 64

PCI: Setting latency timer of device 0000:00:1d.1 to 64

PCI: Setting latency timer of device 0000:00:1d.2 to 64

PCI: cache line size of 32 is not supported by device 0000:00:1d.7

Then it just hangs, and I have to hard reboot.

My options to my kernel boot line in grub are:

resume=/dev/hda5 pmdisk=/dev/hda5

Can anyone tell me how to fix this?  Thanks.

-en

----------

## EASYdoor

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,...

----------

## tuxlover

 *iandow wrote:*   

> I'm running kernel 2.6.11-mm with the stock Software Suspend implementation enabled.  My machine is a Dell X300.  When I run hibernate, it crashes with the following errors: [...]

 Try the swsusp2 patch that is discussed here. It works a lot better than the implementation included in the vanilla kernel.

----------

## EASYdoor

well,...i don't get it,...why should i manually patch my kernel, if it's already patched to the last version?

morph sources:

 *Quote:*   

> updated softwaresuspend2 to 2.1.8.2

 [/quote][/code]

----------

## tuxlover

 *EASYdoor wrote:*   

> well,...i don't get it,...why should i manually patch my kernel, if it's already patched to the last version?
> 
> morph sources:
> 
>  *Quote:*   updated softwaresuspend2 to 2.1.8.2 

 I was replying to iandow who's using mm-sources. They don't seem to contain the suspend2 patch.

Edit: Also, there is simply much confusion about the (stock) implementation swsusp1 in vanilla and the suspend2-patch that is the core of this howto. Sometimes people use obscure kernel patch sets and don't tell us if suspend2 is really included. They just say something like "it doesn't work".

----------

## iandow

 *tuxlover wrote:*   

>  *iandow wrote:*   I'm running kernel 2.6.11-mm with the stock Software Suspend implementation enabled.  My machine is a Dell X300.  When I run hibernate, it crashes with the following errors: [...] Try the swsusp2 patch that is discussed here. It works a lot better than the implementation included in the vanilla kernel.

 

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?

-ian

----------

## tuxlover

 *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.

----------

## BeaTtheMeaT666

 *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

----------

## btlee

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.

----------

## bzagh

@btlee

how do I apply your ebuild patch?

----------

## btlee

 *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.

----------

## jphelps

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.

----------

## mlybarger

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.

----------

## tuxlover

 *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.

----------

## btlee

 *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
> ...

 

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.  :Smile: 

Cheers

----------

## mlybarger

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

----------

## tuxlover

 *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.

----------

## tuxlover

 *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
> 
> ```
> /usr/src/linux # /tmp/software-suspend-2.1.8-for-2.6.11/apply /tmp/software-suspend-2.1.8-for-2.6.11/
> 
> ...

 

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.

----------

## Tsuna

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?

----------

## tuxlover

 *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  :Smile: 

Maybe someone else here could enlighten us regarding this compatibility quostion (splashutils + suspend2)...?

----------

## Tsuna

It's annoying when you have to choose between design and functionnality...

----------

## Tsuna

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?

----------

## Tsuna

actually i dont find any documentation about suspend how to suspend to file instead of swap  :Shocked: 

----------

## Tsuna

any help please about how to suspend to file?

----------

## tuxlover

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

```
## 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.

----------

## Tsuna

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?

----------

## tuxlover

 *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

----------

## Tsuna

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 !

----------

## strerror

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

----------

## sludink

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.

----------

## anz

 *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
> ...

 

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!

----------

## David_Escott

I'm having the following problem on an Averatec 3150:

```
hibernate -v2

....

Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules

hibernate: [95] Executing XHacksSuspendHook2 ...

/bin/echo: write error: Operation not permitted

hibernate: [99] Executing DoSysfsPowerStateSuspend ...

hibernate: Activating sysfs power state disk ...

....
```

and it refuses to hibernate. Where is this write error coming from (the suspend2 hook I  presume). Anyone else seen this?

----------

## tuxlover

"Operation not permitted" sounds like a permission problem. (to ask the obvious: Are you running this as root?)

Otherwise, take a look at the suspend script that you're using, and search for the string it prints (XHacksSuspendHook2) and then take a look at the next lines.

----------

## David_Escott

Yes I am doing this as root. After syncing the stdout and stderr and running at -v5 it seems the error is thrown after it echoes "disk" to something (I can't figure out what).

```
+ echo hibernate: Activating sysfs power state disk ...

+ '[' -n shutdown ']'

+ '[' -f /sys/power/disk ']'

+ /bin/echo -n disk

/bin/echo: write error: Operation not permitted

+ return 0

```

This is made all the more confusing by the fact that the string "disk" isn't even found in /usr/sbin/hibernate.

----------

## tuxlover

 *David_Escott wrote:*   

> it echoes "disk" to something (I can't figure out what).

 

Probably /sys/power/state

```
$ cat /sys/power/state

standby mem disk 
```

I'm not sure what could be the problem though... Can you manually run the echo command? AFTER umounting all unnecessary partitions...

----------

## costa1977

I had the same problem yesterday, after I recompile the kernel 2.6.12.2 with 

```
CONFIG_ACPI_SLEEP=y, CONFIG_ACPI_SLEEP_PROC_FS=y
```

, and uncommented 

```
UseSuspend2 yes 
```

in hibernate.conf, it was fine.

 *David_Escott wrote:*   

> Yes I am doing this as root. After syncing the stdout and stderr and running at -v5 it seems the error is thrown after it echoes "disk" to something (I can't figure out what).
> 
> ```
> + echo hibernate: Activating sysfs power state disk ...
> 
> ...

 

----------

## David_Escott

Yeah I missed that line in the HowTo, so it wasn't using Suspend2. Is there any description of what the options in hibernate.conf do?

----------

## tuxlover

I think you can find a lot of information in the wiki, the suspend2.net wiki, and man hibernate.conf.

----------

## pem

Did someone succeed to make SwSuspend2 working with the ndiswrapper?

POST EDIT 

OK got it working by using net-wireless/ndiswrapper-1.2 with sys-kernel/gentoo-sources-2.6.12-r4, sys-kernel/suspend2-sources-2.6.12-r2 and sys-apps/suspend2-userui-0.5.1.

Now it's time to check few thing on the nvidia driver (seems to be the most difficult thing, though  :Confused:  )

----------

## smg

i dont get fkking lzf compression! :<

cheers.

----------

## livebrain

i'm using fglrx 

i have pbetool and enable "EnableVbetool yes"  in the hibernate.conf

but still freezes when restoring X 

what else do i need to do ?

i instaled pbetool through portage.

----------

## Phlogiston

 *livebrain wrote:*   

> i'm using fglrx 
> 
> i have pbetool and enable "EnableVbetool yes"  in the hibernate.conf
> 
> but still freezes when restoring X 
> ...

 

same here!

probably we can concentrate on that in this thread

I hope some gurus from here can have a look at it   :Cool: 

Thanks for your help!

----------

## Entropysth

Help!

```

ip_tables: (C) 2000-2002 Netfilter core team

ipt_recent v0.3.1: Stephen Frost <sfrost@snowman.net>.  http://snowman.net/projects/ipt_recent/

arp_tables: (C) 2002 David S. Miller

TCP bic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

Using IPI No-Shortcut mode

Suspend2 Core.

Suspend2 FileWriter loading.

ACPI wakeup devices:

PWRB LANC  CDB OHCI MODM

ACPI: (supports S0 S3 S4 S5)

Set bdev in get target info.

Bmap shift set to 2. Blocks per page is 2.

Suspend2 2.2-rc14: Filewriter: File signature found.

Setting dev info to c0511388.

Suspend2 2.2-rc14: Suspending enabled.

swapper(1): READ block 132040 size 4096 on hda3

swapper(1): READ block 132040 size 4096 on hda3

swapper(1): READ block 66028 size 4096 on hda3

=== Suspend2 ===

BIG FAT WARNING!! Incorrect kernel version 57076.205.166 vs 2.6.14.

If you want to use the current suspend 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 or C to continue booting with this kernel

Default action if you don't select one in 25 seconds is: continue booting.

ieee1394: Host added: ID:BUS[0-00:1023]  GUID[00065b80010f738e]

swapper(1): READ block 132040 size 4096 on hda3

swapper(1): WRITE block 132040 size 4096 on hda3

Suspend2 2.2-rc14: Image invalidated.

Cleared bdev in filewriter cleanup.

EXT3-fs: hda3: orphan cleanup on readonly fs

kjournald starting.  Commit interval 5 seconds

ext3_orphan_cleanup: deleting unreferenced inode 3106909

EXT3-fs: hda3: 1 orphan inode deleted

EXT3-fs: recovery complete.

EXT3-fs: mounted filesystem with ordered data mode.

VFS: Mounted root (ext3 filesystem) readonly.

Freeing unused kernel memory: 228k freed

Adding 506036k swap on /dev/hda2.  Priority:-1 extents:1 across:506036k

EXT3 FS on hda3, internal journal

ACPI: PCI Interrupt 0000:02:05.0[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

3c59x: Donald Becker and others. www.scyld.com/network/vortex.html

0000:02:05.0: 3Com PCI 3c905C Tornado at 0xa000. Vers LK1.1.19

ACPI: PCI Interrupt 0000:00:1f.5[B] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10

PCI: Setting latency timer of device 0000:00:1f.5 to 64

intel8x0_measure_ac97_clock: measured 55198 usecs

intel8x0: clocking to 48000

pcmcia: Detected deprecated PCMCIA ioctl usage.

pcmcia: This interface will soon be removed from the kernel; please expect breakage unless you upgrade to new tools.

pcmcia: see http://www.kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html for details.

```

Grub

```

default 0

timeout 1

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo Linux 2.6.14-r4

root (hd0,0)

kernel /boot/Entropysth root=/dev/hda3 quiet vga=0x318 splash=silent,theme:livecd-2005.1 CONSOLE=/dev/tty1 resume2=file:/dev/hda3:0x203c8

```

i use a filewriter, to /suspend, 800mb, machine is a Dell Laditude X200, 20 gb, 700 mb 

Am I leaving anything out ?

Thanks

Ent.

----------

## mirek

I have tried to get swsusp2 working on my Dell Inspiron 5100.

I have set following options for my kernel – 2.6.14-suspend2-r8:

```
# Power management options (ACPI, APM)

#

CONFIG_PM=y

CONFIG_PM_DEBUG=y

# CONFIG_SOFTWARE_SUSPEND is not set

CONFIG_SUSPEND2=y

#

# Image Storage (you need at least one writer)

#

CONFIG_SUSPEND2_FILEWRITER=y

CONFIG_SUSPEND2_SWAPWRITER=y

#

# General Options

#

CONFIG_SUSPEND2_DEFAULT_RESUME2=""

# CONFIG_SUSPEND2_CHECKSUMMING is not set

# CONFIG_SUSPEND2_KEEP_IMAGE is not set
```

After rebooting my dmseg:

```
Suspend2 Core.

Suspend2 Swap Writer loading.

Suspend2 FileWriter loading.

ACPI wakeup devices:

 LID PBTN PCI0 USB0 USB1 USB2 USB3 MODM PCIE

ACPI: (supports S0 S1 S3 S4 S5)

Suspend2 2.2-rc15: Swapwriter: Signature found.

Suspend2 2.2-rc15: Suspending enabled.

swapper(1): READ block 0 size 4096 on hdc6

Suspend2 2.2-rc15: Resuming disabled as requested.
```

When I try to hibernate my laptop I get the error begin like:

```
SOFTWARE SUSPEND

Starting to save the image..

Kernel BUG at kernel/power/suspend_block_io.c:942

invalid operand: 0000 [#1]

...
```

and it freezes when starting to save the image. My swap partition is:

```
# fdisk -l /dev/hdc

Device Boot      Start         End      Blocks   Id  System

/dev/hdc6              16         138      987966   82  Linux swap / Solaris
```

Here is the entry from my /boot/grub/menu.lst:

```
title=Gentoo Linux 2.6.14-suspend2-r8

root (hd0,4)

kernel /boot/vmlinuz-2.6.14-suspend2-r8 root=/dev/hdc7 resume2=swap:/dev/hdc6 noresume2 ro pci=noacpi video=vesafb-tng:ywrap,mtrr,1280x1024-16@60 splash=silent,theme:Emergance CONSOLE=/dev/tty1 quiet

initrd /boot/fbsplash-Emergance-1280x1024
```

Anyone else got this problem, or know how to fix it?

----------

## mirek

I have put in my kernel:

```
Cryptographic options  --->

<*>   LZF compression algorithm 
```

and now all is working  perfectly

----------

## gotaserena

I had troubles with X intermittently freezing on resume. After a few tries I found out that xcreensaver was locking up. I re-emerge the older version of it and so far so good.

----------

## asiobob

Welcome to the world of bring a post from the dead

I'm using the hibernate script to hibernate.

In /etc/hibernate/hibernate.conf there is a Verbose option. Regardless of what I set it do it prints out the steps to stdout. I was lead to believe setting the value to zero makes it silent except for errors. Any ideas? It's not a major problem however

----------

## Phlogiston

Not an answer to your question but I solved my hibernate problem by using agpgart as a module (intel here). System is my T43 Laptop with an ATI X300. (using binary drivers with direct rendering)

----------

## carpman

Hello, have followed the guide on wiki but get the following error trying to hibernate

```

Your kernel does not appear to have Software Suspend 2 support compiled in.

Please follow the HOWTO linked from http://www.suspend2.net/ for instructions

on how to compile Software Suspend into your kernel.

hibernate: Aborting.

```

Dmsg reports it is in kernel:

```

Using IPI Shortcut mode

Suspend2 Core.

Suspend2 Compression Driver loading.

Suspend2 Encryption Driver loading.

Suspend2 Swap Writer loading.

ACPI wakeup devices:

 LID PCI0

ACPI: (supports S0 S3 S4 S5)

Suspend2 2.2.7.4: Swapwriter: Signature found.

Suspend2 2.2.7.4: Resuming enabled.

```

any ideas?

----------

## Phlogiston

Yes upgrade your hibernate-script to latest version.   :Wink: 

----------

## carpman

you mean ~x86 version?

hibernate-ram seem to work but have yet to leave it for long period.

----------

## Phlogiston

 *carpman wrote:*   

> you mean ~x86 version?
> 
> hibernate-ram seem to work but have yet to leave it for long period.

 

Yes! It looks like you updated your kernel, because you are running latest suspend patch, so you have to use latest script too. Otherwise post all the related versions....

----------

## carpman

That works  :Smile: 

Have it set to my power button, will have to do bit more testing to make sure all works ok.

Next is to get hibernate-ram to activate when i close lid !

cheers

----------

## Noven

Can  anyone confirm if they've got sus2 working with an intel 945GM integrated graphics controller? I believe the modules related to X are my problem. The relevant modules are:

agpgart

intel_agp

drm

i915

Without X running suspend works fine, with it running I get the message:

"Unable to prepare image". The terminal tells me "Save video state failed". 

I have tried playing around with vberestore and other X options to know avail. I tried compiling statically, also to no avail. If someone can confirm they have suspend working with this graphics chip maybe they have some tips, and if not at least I know it's possible and will keep trying.

----------

## Watchwolf

hello

I have a strange problem when I hibernate. My computer hibernate correctly, reboot correctly but some commands (as emerge) stunt in a new session (terminal).

- If I run "emerge --search test" on a terminal open before I hibernate, emerge is launch correctly.

- If I open a terminal after I hibernate, emerge stunt. CTRL+C doesn't stop the command, If I close the terminal, the command is stopped.

```
watchwolf@Watchwolf >>> emerge

(blank line ...)

watchwolf@Watchwolf >>> strace emerge (I can use CTRL+C with strace)

(.....)

fstat64(6, {st_mode=S_IFREG|0755, st_size=18968, ...}) = 0

open("/usr/lib/python2.4/site-packages/Crypto/Hash/RIPEMD.so", O_RDONLY) = 7

read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\10"..., 512) = 512

fstat64(7, {st_mode=S_IFREG|0755, st_size=18968, ...}) = 0

mmap2(NULL, 21748, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 0xb76d1000

mmap2(0xb76d6000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0x4) = 0xb76d6000

close(7)                                = 0

close(6)                                = 0

stat64("/usr/sbin/prelink", {st_mode=S_IFREG|0755, st_size=936388, ...}) = 0

pipe([6, 7])                            = 0

clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7def6f8) = 10223

close(7)                                = 0

fstat64(6, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0

fstat64(6, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0

_llseek(6, 0, 0xbfca9980, SEEK_CUR)     = -1 ESPIPE (Illegal seek)

fstat64(6, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f5d000

read(6, 0xb7f5d000, 1024)               = ? ERESTARTSYS (To be restarted)

--- SIGWINCH (Window changed) @ 0 (0) ---

(.....)

read(6, 0xb7f5d000, 1024)               = ? ERESTARTSYS (To be restarted)

--- SIGWINCH (Window changed) @ 0 (0) ---

read(6, 0xb7f5d000, 1024)               = ? ERESTARTSYS (To be restarted)

--- SIGWINCH (Window changed) @ 0 (0) ---

read(6, 

```

I use hibernate.conf of the wiki[1] except I  removed lines with "eth0" (because my interface are eth2 and eth3) and I edited

```
ProcSetting extra_pages_allowance 500

by

ProcSetting extra_pages_allowance 20000
```

because I use fglrx drivers [2]

edit --------

Pidgin have the same problem !

xchat, mplayer work ...

[1] http://gentoo-wiki.com/HOWTO_Software_Suspend_v2

[2] http://www.thinkwiki.org/wiki/Fglrx#Suspending_with_fglrx

----------

