Fix Ubuntu (or Linux) Suspend/Hibernate Not Working Bug

I own an Asus N73JQ laptop, the spec is top notch. Since Windows has been long gone from my candidate OS, I installed Ubuntu 10.10 right away. So far the result is quite amazing. Smooth, reliable, and it feels just right. Although the OS itself is very impressive, I have 2 major issues with the hardware: (1) Function key that switches to external monitor does not work; (an update on the external monitor issue can be found here) (2) Suspend/Hibernate does not work. I have not found a solution for (1), which remains unsolved. I have, however, found a solution for (2). I am going to share this share this solution with those who having the same problem.

By googling around, I found this post. It seems that it will also work for other laptops that have similiar problem in Ubuntu 10.10. The credit belongs to the original poster and all others who contributed to that solution. Though I have thoroughly tested the script and it works for me, I do not guarantee it will work for you. So use it at your risk.

Step 1

Create a script under /etc/pm/sleep.d/. It can be any name, but to ensure the load order, use the prefix 20_.

Follow either Step 2 or Step 2 Old, but not both. The script in Step 2 appears to be more stable than the one in Step 2 Old.

Step 2

Note that if you use the code from "Step 2 Old" below, please skip this step. This script is contributed by commenter Danne.

Insert the following code into the file you have just created:

Step 2 Old

Note that if you use the code from "Step 2" above, please skip this step.

Insert the following code into the file you have just created:

Step 3

Add executable permission:

Result

Your suspend/hibernate should be now working as expected. Suggestions on improving this script are welcome.

Other Thoughts

If this script has worked for you, please post the make/model, Ubuntu distribution, related hardware information of your laptop below.

Updated 2012/03/02

Making sure you have enough space for your swap partition, otherwise hibernate will not work. I have recently upgraded my RAM. In my case, I have 12GB of RAM, but only 6GB of swap space. After the upgrade, hibernation stop working. However, after following this guide (see "Making the swap partition work for hibernate" section), hibernation becomes functional again.

I create a 30GB swap partition, and instruct Ubuntu to use this partition. Hibernation works like a charm again. To verify your system is using the swap, do

Or

Update 2011/11/10

If this has been working for you, but stop working after upgrading to Ubuntu 11.10, you may try this method:
http://turbulentsky.com/resume-from-hibernate-failed-on-ubuntu.html

Other Tips:
This might give you some clues on the suspend/hibernate issue:

Related Posts

Switch to External Monitor Connected via HDMI/VGA port in Ubuntu
Ubuntu 11.10 Look Overhaul

654 Comments Fix Ubuntu (or Linux) Suspend/Hibernate Not Working Bug

  1. Bernd Buerklin

    Lenovo Y530 Nvidia
    Ubuntu 11.10 upgrade from 9.04 per USB

    Step 2 Old works on this machine for both hibernate and suspend.

    (Step 2 does not work, messes with screen upon wake up bot hibernate and suspend.)

    Thanks a lot!

  2. MarioMaster100

    Thanks for this script, it worked on my Asus U56E laptop running the latest crunchbang version :)

  3. Serg

    Hi. Thank you very much!
    Ubuntu 11.10, Asus G74Sx. Also you method resolved the problem with keyboard backlight on my notebook.

  4. Zachary Herrington

    I would just like to report this worked on my Asus G74sx-bbk8 to fix suspend and ALSO MY LED KEYS also now work!!!

    Sweet fix imusing Ubuntu 11.10

  5. Abhishek

    Worked perfectly on Asus K52Jr with Linux Mint 12 Lisa.
    Got wireless to work with the help of Chris' script 00_wireless_sleep

  6. Ben

    Thank you!!! I am soooooo happy that this worked. I am using ubuntu 11.10 and this is the only solution I could find.

  7. Simon

    Worked for me (ASUS G73JH)! I followed the steps one after the other.

    My problem (now fixed): The screen would turn off, black led keyboard too.
    But, the fan would not and either the rest of the hardware still on.

  8. Ducato

    Works on custom built computer with Asus M5A99X evo motherboard and 64 bit ubuntu 11.10 with external usb 3.0 bus media card reader. Thanks sooooo much!

  9. Jury

    Работи с ASUS X54H-K54L и Ubuntu 11.10 Благодарности от България!

  10. k12unch

    thank you for this fix! tried resetting UUID's and other fixes from around the web, and nothing worked until this script.

    Saved me many hours of frustrated keystrokes.

  11. Jason F

    Thank you very much - this worked on my Toshiba L305D with Linux Mint 12. At first however it seemed not to work - I closed the lid and the system continued running. Once I pressed Fn+F3 however (had to train it?), the sleep works perfectly on closing the lid.

  12. JTC

    Before I tried this solution, on my AMD Phenom II X4 running Linux Mint 11 64 bit and ATI HD4800 video card, it would go to a blank screen and not wake up. After my screen went black then I had blocks of the desktop running vertically on the left side of the screen and one horizontal on the bottom half of the screen and the picture was distorted. I had to restart the system. So it didn't work. I am not running the proprietary drivers for the video card currently.

  13. Pingback: Ubuntu 11.10 (Oneiric Ocelot) 64bit na Asus N53SV | Vladislav KoreckΓ½

  14. Nitzan

    I was thinking of going back to windows, because of this bug, but this fixed it! Amazing.
    I use Ubuntu 11.10 on a Asus u13
    Thanks

  15. Clifton Wayne

    Thank You for this,
    I have the same problem and this seems to have fixed it.
    This is on a Dell 1545 running Linux Mint 12, Cinnamon DE.

    Cliff

  16. Prof Andrew A. Adams

    Thanks for this. It solved my suspend problem last year on my N53SV running Fedora Core 15. However, I have now upgraded to Fedora Core 16 and I'm getting the same lack of any suspend activity - all suspend attempts just cause the screensaver lock to activate but don't lock the screen. As well as updating Fedora, Fedora 16 also updates to the new 3.2 kernel. Maybe that's the problem. Anyone else running a 3.2 kernel and have the suspend working?
    The script is still being executed according to /var/log/pm-suspend.log. I'm looking into whether it actually does anything (I've also tried dropping the script but that didn't help).

  17. ADOLFOHERNANDEZ

    It's working on Lenovo Ideapad S10e runing ubuntu Lucid Lynx 10.04 LTS
    Thanks a lot for that code, you have earned a place in heaven! ;) lots of love.

  18. zen

    Great, fast, solution for a pain in the A$$!

    ASUS G73SW-A1, Debian/Aptosid 2012-01-20 release: Linux 3.2 for 64-bit PCs
    linux-image-3.2-5.slh.1-aptosid-amd64

    (Same issue on many Linux releases and versions. I just went with Aptosid as it seemed to work better than most and support better CPU/GPU function.)

    Another known issues for ASUS that I use scripts for is the keyboard backlight (LEDs under the keys.) See attached code...not mine...but it works and I load it by calling the script when the desktop loads.)

    .ASUS_KB_LED.sh

    echo 3 > /sys/class/leds/asus::kbd_backlight/brightness

    That's it. One simple line. The number, in this case 3, is the brightness. I've seen a few other solutions that work for older OS v2.6 kernels but I couldn't get stable results. Other than the issue of up/down button control this seems fine.

    By default on this OS and other versions it's always these keys that fail and are managed by ATK in windows.

    Regards

  19. malinka

    I can't solve my suspend-problem with this script. However, for some reason, if I use a linux-kernel 2.6.39, suspend won't work.

  20. Adrian

    Thank you very much for this. It works like a treat on my ASUS notebook. Specs below:

    ASUS U36JC-B1
    RAM 8GB
    Ubuntu 11.10 64 bit

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">