Re: hibernate and swap partition size (newbie question)



On Fri, Feb 22, 2008 at 7:52 AM, Kamaraju S Kusumanchi
<kamaraju@xxxxxxxxxxxxxx> wrote:
Jimmy Wu wrote:

>>From what I've read online, I get the general idea that in order to be
> able to hibernate/suspend to disk properly, the swap partition has to
> be big enough to hold all of the RAM inside it, right?
>
> Is it possible to hibernate if my swap partition is smaller than my
> RAM? I have 2 GB of RAM, and when I installed Debian, I figured I
> would hardly ever need that much, so I made swap 1.4 GB.
>

Are you aware that you can resize your partitions non destructively using
something like qtparted? First backup all your data before you do anything
like this. This is what I did when I found out that my RAM size is larger
than my swap partition.

I always thought resizing or doing any partition editing carried some
risk of losing data (ie no guarantees), but perhaps ext3 is different.

Anyways, I think I have ruled out the low swap explanation:

On Fri, Feb 22, 2008 at 2:19 AM, Selim T. Erdogan <selim@xxxxxxxxxxxxx> wrote:
On Fri, Feb 22, 2008 at 12:11:54AM -0500, Jimmy Wu wrote:
>
> Not really what you were saying, but I suppose it might work. But
> first I have to figure out if it really is inadequate swap that's
> giving me grief.

I would assume that upon doing a fresh boot-up you would be using much
less memory than your available swap partition. (You can check and
confirm using, say, top.) Then if you try suspending and still have the
same problems when resuming, I think it would be a good indicator that
your problems lie elsewhere.

Right after boot, I logged in to tty1 and did a sudo pm-hibernate
While staring at the screen for messages, I noticed that the snapshot
image was less than 400 MB, and it correctly determined free swap as
just short of 1.4 GB - so swap is more than enough.

On resume, I got a lot of beeps, but after waiting for like 2-3
minutes or so, I was back at my console prompt. However, when I tried
to switch over to gdm on tty7, the screen is black, system goes
unresponsive, and I can't get back to my tty1 anymore.

Just as an experiment, I did a sudo hibernate -v3 > hibernate.out, and
it says that it was unable to unload nvidia and aborts hibernation
(see attached file). So I guess pm-hibernate kind of went ahead and
shut down without properly taking care of nvidia, so that is why I had
an unresponsive X server on resume, right? If that's what's happening,
is there any way to get nvidia properly unloaded? I am running a
stock kernel, and have nvidia installed from the Debian repositories.

Also, there's a script in this article I found:
http://www.linux.com/feature/114220. I never like running scripts
that I don't understand, and I was wondering if whatever it's doing
with the video card solve my problem?

Thanks again for everyone's help and responses
--
Jimmy Wu
Registered Linux User #454138

Attachment: hibernate.out
Description: Binary data



Relevant Pages

  • Re: Is my old RedHat computer doomed?
    ... Particularly if there are pages swapped out on the swap ... "Suspend" suspends to RAM - i.e., it leaves the contents of RAM as they ... to the swap partition and then shuts down. ...
    (uk.comp.os.linux)
  • Re: Newbie Question About Swap Partition
    ... My swap partition is set to approximately double the RAM ... Think of swap as 'emergency memory' which the system can ...
    (comp.os.linux.setup)
  • Re: Swap partition size (future proofing)
    ... > the HDD or using mkswap to create a swap file in an existing partition. ... > Suggested swap partition sizes from the archives range from the same size as ... > the RAM to twice the size of the RAM. ... you start actually using the swap space. ...
    (Fedora)
  • Re: Newbie Question About Swap Partition
    ... My swap partition is set to approximately double the RAM ... since it's faster than using the hard disk. ...
    (comp.os.linux.setup)
  • Re: [opensuse] Swap Software RAID 1 not working, SuSE 10.3
    ... I do notice I do have swap space detected when I use ... didn't have to go raid 0 in order to fix this problem and now it works ... physical drives to make up multiple raid arrays, if my swap partition ... I have 3 G of RAM and I rarely use any swap on disk, ...
    (SuSE)