Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Sometimes when I suspend my laptop it wakes up instantly, but other times it takes around 5 minutes to wake up - in any case way longer than a cold boot.

While the laptop is waking up I can hear the hard drive working and when my laptop finally does wake up the system load is at 100%. Strangely my memory is half empty (even if it was 3/4 full (not counting cache) when I suspend the laptop) but my swap isn't (I have 4GBs of RAM and this is the only time I see swap not being empty).

It seems to me that while waking up my laptop sometimes starts thrashing, but I have no idea what is causing it, how to prevent it or even how to debug it.

My laptop is a hp elitebook 8730w.

EDIT:

Here is a screenshot of the System Load Indicator when I get to my desktop. There is at least 1.8GB of RAM free but there is 1.4GB in swap, why is that so?

enter image description here

share|improve this question
    
I have had the same issue using 10.10 and it is not related to hibernate. I have not seen it since upgrading to 11.04, though. –  Malachi Aug 4 '11 at 16:16

4 Answers 4

"Hibernate" is suspend to disk

"Suspend" is suspend to RAM

Power Management hibernates your laptop on low battery even when it was suspended to RAM to prevent data loss.

Unfortunately wake up from a hibernate state may take longer than a regular boot. If this is the case we may consider to shutdown rather than to hibernate to disk. However then running applications will not be restored.

uswsusp Install uswsusp may speed up wake up from hibernation.

share|improve this answer
    
My problem is with using suspend (I have changed my original post to better reflect that). And it's really weird that my disk is active when my laptop is waking up from suspend. –  Smotko Jul 17 '11 at 14:46
    
In addition to hibernate from a supended state (on low battery) there may also be problems from your system hardware that may cause a damaged suspend. Then a proper resume can not be done and the system will reboot. –  Takkat Jul 17 '11 at 15:37
    
I have the problem even when my laptop is plugged in. –  Smotko Jul 17 '11 at 17:04

When I had this problem with 10.10 I contacted support for my laptop and they said, "This is a known issue. It should be occurring about once in every three or four suspends." At the time they thought it was fixed in 11.04 and I have not had an issue since upgrading.

With a little digging I did find a confirmed bug in 11.04 that may be related.

system becomes very slow after suspend/resume My quad core i5 iMac

becomes unusably slow after resuming from suspend. One process will take 100% of a CPU (and nothing will run on the other cores).

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/748004

share|improve this answer
    
Thanks for the bug link, this seems to be the same problem that I'm having. –  Smotko Aug 5 '11 at 21:25
    
I should not have said anything about now having the issue... it just happened today. It might be a clue, however, that it only happened after I had left the machine unplugged and it had suspended automatically. However, on a subsequent suspend/resume, there was no delay. –  Malachi Aug 6 '11 at 17:11

I have got the same problem. It consistently occurs when a lot of swap is used at the time of suspend. If I do

># swapoff -a
># swapon -a

to completely empty swap space right before suspend, then the wakeup will always be immediate. Can you confirm that?

If you put these commands in a pre-suspend script it may work as a quick and dirty workaround. Swapoff will take a long time if you got a lot of things in the swap. But you probably don't mind if your machine is going to work a little longer after you close the lid if that's the price for immediate resume. You have to make sure, though, that you really have enough free RAM before calling swapoff.

The workaround is all but elegant and just fights the symptoms. I'll let you know if I find out about the true reason of the problem.

Just out of interest: I'm using encrypted partitions for both, my file system and swap. Anybody who has this problem does too? I already suspected that the problem may have to do with this.

share|improve this answer

I remember that after a specific amount of time, the computer wakes up from suspend to RAM, and then suspends to disk automatically. This has something to do with power issues and the subsequent possible data loss, but as far as I know, the time is set to a standard amount, so having the laptop plugged in should not affect this behavior.

share|improve this answer
    
The only time I have seen suspend-to-RAM convert to suspend-to-disk this way was when battery power was low. In any case, the loading delay that this bug creates is much longer than resuming from hibernate has ever been for me. Literally minutes of the HD LED blinking solid before any activity on the display. –  Malachi Aug 6 '11 at 17:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.