|
On Dreamlinux,
from the version 2.2 RC1 that brings a the kernel 2.6.18, was added
the Suspend2 function, a
funcionality equivalent to the Windows Hibernate that saves the memory
Ram content to the swap partition and
turn off the machine. When you turn it on, the partition swap content
is reloaded on the memory, allowing to continue
the work, withou having to reload the system. The proccess is very
fast and useful, over all in notebooks, where
energy economy is an important requirement.
A required requisite – confirm before continue this tutorial
– is that the swap partition must have at least
de double of phisical memory that is in your machine. If you have
256 MB of RAM, so your swap partition
must be equal or larger than 512 MB.
To use this recourse it’s
necessary make a little changing on system’s files. But it is
very easy.
We need to inform
the Suspend2 what partition is swap. For this, type
on a terminal:
cat /proc/swaps
You’re going to get
a result like this:
$ cat
/proc/swaps
Filename Type Size Used Priority /dev/hda2
partition 1751044 0 -1
See that in this
example, the informed swap partition is the /dev/hda2
Now find the file
(always as root) /sys/power/suspend2/resume:

The file is empty.
Write on it /dev/hda2 ( change conform your swap
partition )
Now open the file /boot/grub/menu.lst

Open it and localize the line that calls the system on the start,
add after of quiet the expression
resume2=swap:/dev/hda2 as it’s showed bellow:
title
DreamLinux
# kernel path-to-kernel root=rootdevice kernelarguments
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hda5 vga=0x317 noddc vga=791 splash=silent
nomce quiet resume2=swap:/dev/hda2
initrd = /boot/initrd
|
Ready, it’s done. Now your computer can hibernate. Restart the
machine and after restart to test the function just
use the keyboard shortcut : Control+Alt+H.
| Note
for Nvidia or ATI cards users: the resource Suspend2 doesn’t
work well if the 3D proprietary
drivers of these products are activated.
But, with the
natives drivers of Xorg, theSuspend2 works well.
|
Changing the configuration file of hibernate:
This proceeding
is not necessary, but can be used by anyone who wants to
make adjustments on hibernate process.
Find the file /etc/hibernate/common.conf. Open it
as root.
You will see various
lines commented or not. There’s a lot of available options to
change the way your machine will start the hibernate process. Go to
site http://www.suspend2.net
to know more about.

For notebook
users:
Notebook users could want
to make use of an extra funcionality that is the possibility of when
closing the case, it makes it hibernate. If you have a notebook, follow
all the steps before, test the hibernation and then open the file:
/etc/default/acpi-support
and put there
this content:
#ACPI_SLEEP=true
ACPI_HIBERNAT=true
HIBERNATE_SCRIPTS=true
HIBERNATE_SCRIPT_RAM=false
HIBERNATE_RAM_ARGS="-F /etc/hibernate/ram.conf" |
Now open the file:
/etc/acpi/events/lm_lid
And put the content:
event=button[
/]lid
action=/etc/acpi/actions/lm_lid.sh %e |
Finally open the
file: /etc/acpi/actions/lm_lid.sh
And put this content:
test -f
/usr/sbin/laptop_mode || exit 0
# lid button
pressed/released event handler
#/usr/sbin/laptop_mode
auto
/usr/sbin/hibernate
|
That’s it, if all works fine your notebook will hibernate when
you close the case.
<<
BACK to Tutorials page
|