# [UNSOLVED] Suspend 2 on my laptop not working

## Nazgulled

Just installed suspend2 sources on my laptop, configured everything, emerged the hibernate scripts but can't make things work.

Here's what happens when I try to emerge with the hibernate script:

 *Quote:*   

> Freezing processes
> 
> Preparing Image.
> 
> Starting to save the image..
> ...

 

Now, here's my lilo.conf and hibernate.conf files:

lilo.conf

```
boot=/dev/hda4

#prompt

timeout=30

default=Gentoo-S2

image=/boot/kernel-2.6.15-gentoo-r1

label=Gentoo

root=/dev/hda4

append="video=vesafb:1024x768-32@60,ywrap,mtrr splash=silent,fadein,theme:livecd-2005.1 quiet CONSOLE=/dev/tty1"

image=/boot/kernel-2.6.15-suspend2-r8

label=Gentoo-S2

append="resume2=swap:/dev/hda3 video=vesafb:1024x768-32@60,ywrap,mtrr splash=silent,fadein,theme:livecd-2005.1 quiet CONSOLE=/dev/tty1"

image=/boot/kernel-2.6.15-suspend2-r8

label=Gentoo-S2-NR

append="resume2=swap:/dev/hda3 noresume2 video=vesafb:1024x768-32@60,ywrap,mtrr splash=silent,fadein,theme:livecd-2005.1 quiet CONSOLE=/dev/tty1"

read-only

other=/dev/hda1

label=WindowsXP
```

What do you guys think it's wrong? Two more things... I have mounted an ntfs partition in fstab that goes like this:

```
/dev/hda1      /media/winxp   ntfs      nls=utf8,user,ro,umask=0222      0 0
```

and I want to have it unmounted on hibernate and mounted again on resume so I don't get any problems, though, no support for writing on ntfs was compiled on kernel (should I not be worry with this then?)

Any help on making this work would be very appreciated.Last edited by Nazgulled on Wed Feb 28, 2007 9:14 pm; edited 2 times in total

----------

## Nazgulled

*bump*

----------

## beatryder

try adding this to your hibernate.conf

```

ProcSetting extra_pages_allowance 5000

```

----------

## Nazgulled

That worked, now hibernate and hibernate-ram are both working, however I'm having some other issues... I removed from the first post the hibernate.conf file cause I've made some changes and I've posted it here in the bottom, along with the ram.conf file.

The problems I'mn having with the hibernate script:

1) After resuming, my windows ntfs partition is not mounted, however, when using hibernate-ram it works just fine and the configuration files have both the same settings for the mount/umount section.

2) Another problem I'm having after resuming from hibernation is that the system becomes a bit slow, this doesn't happen with the hibernate-ram. For instance, the fade in black screen that happens when you press on logout in gnome, is terribly slow fter resuming from hibernation but not from hibernate-ram.

3) Sometimes (doesn't seem to happen everytime) when resuming from hibernation, my wireless usb mouse doesn't work, I have to unplug the usb reciever and plug it back in so it works again.

How can I fix this problems?

hibernate.conf

```
# Example hibernate.conf file. Adapt to your own tastes.

# Options are not case sensitive.

# 

# Run "hibernate -h" for help on the configuration items.

##############################################################################

### Choose your Suspend method. You currently have 3 choices:

###

###    suspend2            Software Suspend 2 (requires kernel patches from

###                        http://www.suspend2.net/)

###

###    sysfs_power_state   Uses /sys/power/state to suspend (activates pmdisk

###                        on kernels < 2.6.8, or vanilla swsusp otherwise).

###

###    acpi_sleep          Uses /proc/acpi/sleep to activate swsusp, or other

###                        ACPI sleep state supported by your machine.

###

##############################################################################

### suspend2 (for Software Suspend 2)

UseSuspend2 yes

Reboot no

EnableEscape yes

DefaultConsoleLevel 1

Compressor lzf

Encryptor none

# ImageSizeLimit 200

## useful for initrd usage:

SuspendDevice swap:/dev/hda2

## Powerdown method - 3 for suspend-to-RAM, 4 for ACPI S4 sleep, 5 for poweroff

# PowerdownMethod 5

## Any other /proc/software_suspend setting can be set like so:

# ProcSetting expected_compression 50

## Or traditionally like this:

# Suspend2AllSettings 0 0 2056 65535 5

## Or even from the results of hibernate --save-settings with this:

# Suspend2AllSettingsFile /etc/hibernate/suspend-settings.conf

## For filewriter:

# FilewriterLocation /suspend_file 1000

# VerifyFilewriterResume2 yes

# ProcSetting userui_program /sbin/suspend2ui_text

ProcSetting extra_pages_allowance 5000

### sysfs_power_state

## To use /sys/power/state to suspend your machine (which may offer

## suspend-to-RAM, suspend-to-disk, standby, etc) comment out all the options

## above for Software Suspend 2, below for acpi_sleep, and uncomment this line.

## You may replace mem with any one of the states from "cat /sys/power/state"

# UseSysfsPowerState mem

# PowerdownMethod shutdown

### acpi_sleep

## To use ACPI to suspend your machine (via /proc/acpi/sleep), comment out

## all the options above for Software Suspend 2 and sysfs, and uncomment this

## line. The number refers to the ACPI sleep state - 3 is suspend-to-RAM and

## 4 is suspend-to-disk.

# UseACPISleep 4

##############################################################################

### Some global settings

##############################################################################

Verbosity 0

LogFile /var/log/hibernate.log

LogVerbosity 1

# AlwaysForce yes

# AlwaysKill yes

# HibernateVT 15

Distribution gentoo

# XDisplay :0

##############################################################################

### Scriptlets

###   Scriptlets provide support for doing all sorts of things before and after

###   suspending. The defaults settings here should work for most people, but

###   you may wish to edit these to taste. Consult "hibernate -h" for help on

###   the configuration settings.

##############################################################################

### bootsplash

## If you use bootsplash, also enabling SwitchToTextMode is recommended if

## you use X, otherwise you may end up with a garbled X display.

# Bootsplash on

# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg

### clock

SaveClock restore-only

### devices

# IncompatibleDevices /dev/dsp /dev/video*

### diskcache

# DisableWriteCacheOn /dev/hda

### fbsplash (enable SwitchToTextMode if you use this)

# FBSplash on

# FBSplashTheme suspend2

### filesystems

# Unmount /nfsshare /windows /mnt/sambaserver

UnmountFSTypes smbfs nfs vfat ntfs

# UnmountGraceTime 1

# Mount /windows

### grub

# ChangeGrubMenu yes

# GrubMenuFile /boot/grub/menu.lst

# AlternateGrubMenuFile /boot/grub/menu-suspended.lst

# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak

### hardware_tweaks

# IbmAcpi yes

# RadeonTool yes

### lilo

# EnsureLILOResumes yes

### lock (generally you only want one of the following options)

# LockConsoleAs root

# LockXScreenSaver yes

# LockKDE yes

# LockXLock yes

# LockXAutoLock yes

### misclaunch

# OnSuspend 20 echo "Good night!"

# OnResume 20 echo "Good morning!"

### modules

# UnloadModules snd_via82cxxx usb-ohci

UnloadAllModules yes

UnloadBlacklistedModules yes

LoadModules auto

# LoadModulesFromFile /etc/modules

### modules-gentoo

GentooModulesAutoload yes

### network

# DownInterfaces eth0

# UpInterfaces auto

### pcmcia

# EjectCards yes

### programs

# IncompatiblePrograms xmms

### services

RestartServices alsasound

RestartServices net-lo

# StopServices alsasound

# StartServices aumix

### vbetool

EnableVbetool yes

# RestoreVbeStateFrom /var/lib/vbetool/vbestate

# VbetoolPost yes

# RestoreVCSAData yes

### xhacks

SwitchToTextMode yes

# UseDummyXServer yes

### xstatus

## This can be set to gnome, kde or x:

XStatus gnome

XSuspendText Preparing to suspend...

XResumeText Resuming from suspend...

## When using XStatus x, and you have xosd installed:

# XosdSettings --font -misc-fixed-medium-r-semicondensed--*-120-*-*-c-*-*-* --colour=Green --shadow 1 --pos bottom --align center --offset 50
```

hibernate.conf

```
# Example ram.conf file for suspending to RAM. Adapt to your own tastes.

# Options are not case sensitive.

# 

# Run "hibernate -h" for help on the configuration items.

### sysfs_power_state

UseSysfsPowerState mem

##############################################################################

### Some global settings

##############################################################################

Verbosity 0

LogFile /var/log/hibernate.log

LogVerbosity 1

# AlwaysForce yes

# AlwaysKill yes

# HibernateVT 15

Distribution gentoo

# XDisplay :0

##############################################################################

### Scriptlets

###   Scriptlets provide support for doing all sorts of things before and after

###   suspending. The defaults settings here should work for most people, but

###   you may wish to edit these to taste. Consult "hibernate -h" for help on

###   the configuration settings.

##############################################################################

### bootsplash

## If you use bootsplash, also enabling SwitchToTextMode is recommended if

## you use X, otherwise you may end up with a garbled X display.

# Bootsplash on

# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg

### clock

SaveClock restore-only

### devices

# IncompatibleDevices /dev/dsp /dev/video*

### diskcache

# DisableWriteCacheOn /dev/hda

### fbsplash (enable SwitchToTextMode if you use this)

# FBSplash on

# FBSplashTheme suspend2

### filesystems

# Unmount /nfsshare /windows /mnt/sambaserver

UnmountFSTypes smbfs nfs vfat ntfs

# UnmountGraceTime 1

# Mount /windows

### grub

# ChangeGrubMenu yes

# GrubMenuFile /boot/grub/menu.lst

# AlternateGrubMenuFile /boot/grub/menu-suspended.lst

# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak

### hardware_tweaks

# IbmAcpi yes

# RadeonTool yes

### lilo

# EnsureLILOResumes yes

### lock (generally you only want one of the following options)

# LockConsoleAs root

# LockXScreenSaver yes

# LockKDE yes

# LockXLock yes

# LockXAutoLock yes

### misclaunch

# OnSuspend 20 echo "Good night!"

# OnResume 20 echo "Good morning!"

### modules

# UnloadModules snd_via82cxxx usb-ohci

UnloadAllModules yes

UnloadBlacklistedModules yes

LoadModules auto

# LoadModulesFromFile /etc/modules

### modules-gentoo

GentooModulesAutoload yes

### network

# DownInterfaces eth0

# UpInterfaces auto

### pcmcia

# EjectCards yes

### programs

# IncompatiblePrograms xmms

### services

RestartServices alsasound

RestartServices net-lo

# StopServices alsasound

# StartServices aumix

### vbetool

EnableVbetool yes

# RestoreVbeStateFrom /var/lib/vbetool/vbestate

# VbetoolPost yes

# RestoreVCSAData yes

### xhacks

SwitchToTextMode yes

# UseDummyXServer yes

### xstatus

## This can be set to gnome, kde or x:

XStatus gnome

XSuspendText Preparing to suspend...

XResumeText Resuming from suspend...

## When using XStatus x, and you have xosd installed:

# XosdSettings --font -misc-fixed-medium-r-semicondensed--*-120-*-*-c-*-*-* --colour=Green --shadow 1 --pos bottom --align center --offset 50
```

----------

## Nazgulled

anyone?

----------

## electrofreak

 *beatryder wrote:*   

> try adding this to your hibernate.conf
> 
> ```
> 
> ProcSetting extra_pages_allowance 5000
> ...

 

Thank you! I was having the same problem on my desktop.

----------

## Hypnos

For the X problem, try setting the HibernateVT to a text console.  The script will switch to that console, then switch back, and this avoids a lot of video problems.

For the mouse, try setting the USB bus module (usually one of "usb-{e,u,o}hci") under "UnloadModules"

see the hibernate.conf man page for more details

----------

