Author Topic: [SOLVED] Suspend to Disk  (Read 2040 times)

acataldi123

  • Guest
[SOLVED] Suspend to Disk
« on: February 22, 2011, 11:22:34 AM »
I am a newbie to PCLinuxOS. I just installed KDE on my IBM T43P. I want to have my laptop suspend when I close the lid. I tried using suspend to ram, but it did not really suspend (even though logout > suspend to ram works). So I thought I would try suspend to disk, but that option is not available. Can someone direct me on how to get suspend to disk working. Thanks.
« Last Edit: March 02, 2011, 01:14:01 PM by acataldi123 »

uncleV

  • Guest
Re: Suspend to Disk
« Reply #1 on: February 22, 2011, 12:51:35 PM »
Can someone direct me on how to get suspend to disk working. Thanks.
Suspend to disk sounds to me as hibernate. You should have this option. :-\

acataldi123

  • Guest
Re: Suspend to Disk
« Reply #2 on: February 22, 2011, 02:00:28 PM »
The options under "When laptop lid is closed" are:
Do Nothing
Shutdown
Lock Screen
Turn Off Screen
Suspend to RAM
That is it..

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Suspend to Disk
« Reply #3 on: February 22, 2011, 02:14:50 PM »
Hi,

suspend to disk works by saving machine state to swap partition. Do you have configured your swap partition to be bigger then your RAM ?

AS

acataldi123

  • Guest
Re: Suspend to Disk
« Reply #4 on: February 23, 2011, 06:46:45 AM »
Not sure. I am not a real Linux pro, so I am not sure what I really have. Could you walk me through figuring out what I have and what I need?

uncleV

  • Guest
Re: Suspend to Disk
« Reply #5 on: February 23, 2011, 07:07:12 AM »
I have it in LXDE:


But couldn't find hibernate or suspend to disk in KDE :-\
« Last Edit: February 23, 2011, 07:11:13 AM by uncleV »

Offline 7272andy

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1627
  • UK MLU
Re: Suspend to Disk
« Reply #6 on: February 23, 2011, 07:09:17 AM »
Hi acataldi123

How much memory have you got fitted and what is the result of
     fdisk -l
when run in a root terminal?

N.B.
The switch after fdisk is a lower case L

EDIT
Hi uncleV,

The options are on the Leave button from the PC button

Regards
« Last Edit: February 23, 2011, 07:11:35 AM by 7272andy »


Bare Metal 1         Bare Metal 2
Intel Celeron 420M   Intel i5 540M
2GB Ram              4GB Ram
Intel 943GM          Radeon HD 5650 PCI Express
RT2573               RT2790
32bit KDE            32&64bit KDE

acataldi123

  • Guest
Re: Suspend to Disk
« Reply #7 on: February 23, 2011, 07:44:59 AM »
Here is the output from fdisk:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
240 heads, 63 sectors/track, 10337 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd31b7c87

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          64    43008063    21504000    7  HPFS/NTFS
/dev/sda2        43022070   143700479    50339205    7  HPFS/NTFS
/dev/sda3       143700480   156295439     6297480    5  Extended
/dev/sda5       143700543   150156719     3228088+  83  Linux
/dev/sda6       150156783   151003439      423328+  82  Linux swap / Solaris
/dev/sda7       151003503   156295439     2645968+  83  Linux

uncleV

  • Guest
Re: Suspend to Disk
« Reply #8 on: February 23, 2011, 07:49:06 AM »
Hi uncleV,

The options are on the Leave button from the PC button
Thanks but I didn't find them yesterday there. Have the options as acataldi123 has.  And I have swap twice as the RAM (am not so sure though and will check it tonight).

New: Checked and the result is: my swap partition is twice less than my RAM. E.g. I have 4 GB RAM and 2 GB swap space.
« Last Edit: February 23, 2011, 11:56:24 AM by uncleV »

Offline 7272andy

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1627
  • UK MLU
Re: Suspend to Disk
« Reply #9 on: February 23, 2011, 01:57:06 PM »
uncleV you would need to increase your swap disk to be greater than your RAM if you want suspend to disk to work, usually it is said that swap should be twice RAM for this though O-P has a post on the subject worth searching for.

acataldi123
your swap disk is about 400MB which is probably why suspend is not working for you what is the output of free when run from a terminal

Regards


Bare Metal 1         Bare Metal 2
Intel Celeron 420M   Intel i5 540M
2GB Ram              4GB Ram
Intel 943GM          Radeon HD 5650 PCI Express
RT2573               RT2790
32bit KDE            32&64bit KDE

acataldi123

  • Guest
Re: Suspend to Disk
« Reply #10 on: February 23, 2011, 02:45:51 PM »
Thanks for your help. here is the output from free:

             total       used       free     shared    buffers     cached
Mem:       2073096     423896    1649200          0      26364     202104
-/+ buffers/cache:     195428    1877668
Swap:       423320          0     423320

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Suspend to Disk
« Reply #11 on: February 23, 2011, 05:32:57 PM »
uncleV you would need to increase your swap disk to be greater than your RAM if you want suspend to disk to work, usually it is said that swap should be twice RAM for this though O-P has a post on the subject worth searching for.


Regards


In addition the Swap must be contiguous ......  one swap partition or file must be of sufficient size to hold the saved state. You may have multiple Swap partitions but they will not be used for S2D.

Also - do not forget - the ability must be enabled in BIOS.

It is available in KDE as said .....  provided everything else required is present.

« Last Edit: February 23, 2011, 05:39:04 PM by Just19 »

Offline johnmart

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1105
  • Make Love Not War
Re: Suspend to Disk
« Reply #12 on: February 23, 2011, 07:15:20 PM »
I get hibernate (S2D) from PowerDevil in the systray.



Lotsa settings there. I use sleep regularly with no problems, but hibernate sometimes has trouble restarting for me. YMMV
Acer Aspire, Intel core2 2.20GHz, ‎Graphics nVidia ‎G98M [GeForce G 105M], 2gb ram, Wireless Intel Link 5100

Why, any 5 year old child could understand this.
Somebody bring me a 5 year old.
Groucho

Offline 7272andy

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1627
  • UK MLU
Re: Suspend to Disk
« Reply #13 on: February 24, 2011, 02:53:52 AM »
acataldi123
Unless I'm misreading things you have 2GB of RAM fitted and 400MB of swap space.
You will not be able to use suspend to disk (aka hibernate) unless you increase the size of your swap.
As a rule of thumb you should set the swap to twice the RAM, so in your case the swap would need to be 4GB , this would then allow the computer to save the current contents of RAM to the swap and accommodate anything currently in swap before suspending.

O-Ps explanation of swap requirements according to usage is here

Regards


Bare Metal 1         Bare Metal 2
Intel Celeron 420M   Intel i5 540M
2GB Ram              4GB Ram
Intel 943GM          Radeon HD 5650 PCI Express
RT2573               RT2790
32bit KDE            32&64bit KDE

uncleV

  • Guest
Re: Suspend to Disk
« Reply #14 on: February 24, 2011, 03:03:07 AM »
uncleV you would need to increase your swap disk to be greater than your RAM if you want suspend to disk to work, usually it is said that swap should be twice RAM for this though O-P has a post on the subject worth searching for.
Thank you, I am aware of this and read O-P's thread.
I am not concerning hibernating my desktop at home but doing this at my desktop at work seems useful. :D