WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: suspend  (Read 6158 times)

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
suspend
« on: January 12, 2009, 07:05:13 AM »
Couldn't get the suspend function working on my Dell C600 with pci-utils and suspend.tcz installed.

(fortunately it boots so fast that I can just shut it down :) )

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14832
Re: suspend
« Reply #1 on: January 12, 2009, 07:44:01 AM »
It might work natively (i.e. without any extensions loaded).

From a root window:
Code: [Select]
# echo -n "mem" > /sys/power/state
This works with/without X started on my dell d400. If it's still nogo, you could try the pci-utils/suspend/d-bus extensions together?

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: suspend
« Reply #2 on: January 12, 2009, 11:09:13 AM »
The script worked.....very interesting!   I tried combining the extensions before without any luck.
Thanks!


Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: suspend
« Reply #3 on: January 15, 2009, 04:05:35 PM »
Can you explain a little more about how this script works. Where does it put the suspend to disk file? Is there a way to specify using sda1 on a usb stick? Also, how does the restore work?
big pc man

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: suspend
« Reply #4 on: January 16, 2009, 05:05:36 AM »
This might get a bit confusing, as there are two ways to suspend. The native one, which only requires the kernel and can be triggered by echoing to /sys/power/state, and an user-space one in the suspend extension.

Both can suspend either to ram or to disk. The in-kernel one can not suspend to a file, the disk option saves ram contents to a swap partition. The extension can suspend to a file, and compress it.

I only use the kernel one, as it works for me and it is "less for something", no need for an app if the same thing can be done otherwise. Juanito can tell more about the extension, I'll describe the kernel suspend:

There are 3 states: disk, mem, standby. If you use cat to view /sys/power/state, it will show which are supported on your machine. Mem and standby are similar states that both suspend to ram; use which ever works for you. Suspend to disk turns the machine off, and can restore the full state later. To use it, you need to tell the kernel which swap partition to use, "resume=/dev/sda2" for example added to the boot arguments. It needs to be given both before suspend, to tell where to save, and after, to tell where to load from. Best to keep it there always ;)

Because there is no compression, you need to have more swap than you have RAM to be able to suspend to disk.
« Last Edit: January 16, 2009, 05:07:07 AM by curaga »
The only barriers that can stop you are the ones you create yourself.