i'm having a weird, weird bug that's been haunting me since 11.10. if i listen to music or watch a video and my computer automatically goes to sleep at night, it won't properly resume in the morning. otherwise, suspend and resume works just fine.

what happens is that the wi-fi and bluetooth indicator (that turns from white to orange when suspending) stays orange, the display doesn't turn on, and the only option i have is to hard reset the machine.

here's what i've tried so far:

  • installing (and uninstalling and reinstalling) laptop-mode-tools
  • switching the proprietary wireless driver (broadcom-wl) to the open source one (brcmsmac & bcma) and back
  • unloading (and blacklisting) all bluetooth modules (rfcomm, btusb, bnep, bluetooth) and stopping the bluetooth service (# stop bluetooth) and disabling (# echo 'manual' > /etc/init/bluetooth.override) the bluetooth service
  • creating a custom pm sleep action as suggested here: http://ubuntuforums.org/showthread.php?p=11926504
  • not watching youtube / any stuff that uses flash before going to sleep (i have flashblock, and i checked $ ps aux | grep flash) because i suspected flash to be the culprit
  • trying out different versions of fglrx (the one from the repos, then installing the latest one from amd's site via generated .deb files, then back to the official ones)

  • looking at /var/log/pm-suspend.log, which reveals that networkmanager failed at putting all network interfaces to sleep, but nothing more.

none of these revealed the exact problem. i remember back in the days of 10.04, there was a gconf key called network sleep: i thought about disabling that, since re-enabling the wireless card seems to be the problem (according to the indicator led), but the option appears to be missing from gnome 3 (unity-2d, whatever).

does anyone have any ideas?

thanks, bamdad

EDIT: here's my dmesg after the hang, after suspending with # sync; echo 1 > /sys/power/pm_trace; pm-suspend (according to https://wiki.ubuntu.com/DebuggingKernelSuspend): http://pastebin.com/uxzt7XP6

EDIT 2: it seems that i'm not alone: http://ubuntuforums.org/showthread.php?t=2005943


There may be clues in /var/log/pm-suspend.log that tell you where abouts in the resume it is failing. It may be of course that the kernel is not able to resume to the point where processes are unfrozen and logging starts to occur in /var/log/pm-suspend.log on the resume. But this is a good place to see if any specific device resumes are causing the hang.

| improve this answer | |
  • sadly, that didn't help either. the only clue is this line: Having NetworkManager put all interaces to sleep...Failed.. however, it doesn't say why. the last line is: Thu Oct 11 03:33:03 CEST 2012: performing suspend. – bamdad Oct 11 '12 at 9:22
  • so it seems that you were right, no logging took place after resuming. – bamdad Oct 11 '12 at 9:26
  • The following resume debugging wiki may be the next thing to try: wiki.ubuntu.com/DebuggingKernelSuspend – Colin Ian King Oct 11 '12 at 22:46
  • thanks. next time i'll try suspending with sudo sh -c "sync; echo 1 > /sys/power/pm_trace; pm-suspend" and try to see if dmesg has something to offer. the weird thing is that the issue only comes up if the system is suspended for more than a few hours.. i can suspend and resume all i want for a few minutes.. :( – bamdad Oct 12 '12 at 11:59
  • well, this doesn't really say much. to me, at least. so i've reached a wall, sadly. there's only one 'magic number' line and that's the keyboard, and there are no 'hash matches' lines. anyway, here's the whole file, in case someone understands it better: pastebin.com/uxzt7XP6 – bamdad Oct 13 '12 at 10:27

I had the same problem: the computer would not resume from sleep, turning on but showing a black screen (not establishing a connection to the monitor). I resolved it by turning off my bluetooth keyboard (via hardware switch on the keyboard), allowing it to automatically disconnect from the computer (~10 sec.), and only then could I sleep so that my computer would resume. I would suggest doing this with any bluetooth/wireless device you have like a mouse or keyboard.

| improve this answer | |
  • i have neither of those. however, i do have a suspicion that this has something to do with my laptop's bluetooth+wireless, but after blacklisting and disabling blietooth completely, the problem is still there. – bamdad Feb 13 '13 at 0:25


It seems Ubuntu has two "flavors" of suspention: one is the normal suspend-to-ram where you do not need swap, the second is a hybrid with hibernate - the system state is written to disk before going to suspend-to-ram state.

I guess what you are experiencing is either the hybrid suspension or even the hibernation (I couldn't make Ubuntu go into either suspend modes, only hibernate). This means you need enough swap space to write the contents of your RAM into.

That would usually be at least 2 GB swap for up to 4 GB of ram or at least 4 GB of swap for up to 16 GB of RAM according to Red Hat's recommendation (two years ago you'd be told to have two times the size of your RAM. If you have less than 4 GB of ram Id say take 1.5-2 times your RAM in swap.

To re-size swap you can use GParted from the live cd, as it can shrink and move partitions.

| improve this answer | |
  • it's only suspending to ram, not hibernating (which is disabled by default anyway on 12.04). i'm using 4 gbs of swap for my 4 gbs of ram. thanks for the reply, though. :) – bamdad Oct 10 '12 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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