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.

I upgraded to ubuntu 12.04 last week and although pleased with the release I'm disappointed that the suspend and hibernate features are not working. I've got an ASUS desktop with a AMD Athlon(tm) 64 X2 Dual Core Processor 5000+ × 2. The system seems to suspend and hibernate successfully but then immediately resumes. I haven't found any posts that have helped me resolve this problem.

Thanks for any help. Wayne

share|improve this question
    
Did any of these answers solve your problem? If so could you accept the answer that worked? –  John S Gruber Aug 10 '12 at 5:41

5 Answers 5

So I finally found the solution. The problem is the same, as with older releases. It's the USB ports, that were waking up system from suspend.

The solution was proposed by mcendo in ubuntuforums (post #4) http://ubuntuforums.org/showthread.php?t=1969615

share|improve this answer

I have the same problem with a desktop pc that resumes immediately after suspend. The only solution that worked for me is the one given by *M* in http://ubuntuforums.org/showthread.php?t=1969615 :

Create a script in /etc/pm/sleep.d containing :

#!/bin/bash
# Disables echi / ohci / uhci ports on suspend and reenables them on resume. 
# Place this script in /etc/pm/sleep.d


function unbind_usb {
    for driver in ehci ohci uhci; do
        cd "/sys/bus/pci/drivers/${driver}_hcd";
        ids=$(ls | grep :);
        echo $ids > /tmp/DISABLED_$driver;
        for id in $ids; do
            echo "Unbinding $id";
            echo -n "$id" > unbind;
            disabled="$disabled $id";
        done;
    done;
}

function bind_usb {
    for driver in ehci ohci uhci; do
        cd "/sys/bus/pci/drivers/${driver}_hcd";
        for id in $(cat /tmp/DISABLED_$driver); do
            echo "Binding $id";
            echo -n "$id" > bind;
        done;
        rm /tmp/DISABLED_$driver;
    done;
}

case "$1" in
    hibernate|suspend)
        unbind_usb;
    ;;
    thaw|resume)
        bind_usb;
        # Uncomment the following two lines if USB devices stutter after resume
        # unbind_usb;
        # bind_usb;
    ;;
    *)
    exit 1;
    ;;
    esac;
    exit 0;

Hope this helps.

I did not find any bug filed for that. Before filing one, can anybody tell me if there is one or not ?

share|improve this answer
    
Hey this fixes both of suspend and hibernate issues on my netbook. Thanks a lot! :) –  Flint Jul 17 '12 at 12:17

You will notice that the 'Hibernate' option is not available under the shut down icon drop down. (There is only > Shut Down + Suspend + Lock Screen + Lock Screen)

To get the 'Hibernate' option type the following command in the terminal >>

pm-hibernate

If your PC succeed in going to Hibernate mode and you have no problem waking it up, then you know your PC supports the Hibernate feature. Then again in the terminal type/copy-paste >>

sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.desktop.pkla

then add the following:

[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

Save (Ctrl + o) and exit (Ctrl + x).

Restart the PC. The Hibernate option should return now.

share|improve this answer

Mohd Arafat Hossain: Great solution, but probably to a different problem...

I have the same problem as Wayne. It's not, that I'm missing the Hibernate option (I'm aware, that Canonical dropped this option due to a bunch of reasons), but when I wish to suspend the system, it proceeds as it should with the suspend, but immediately wakes up again.

So our problem is not the missing hibernate capability, but the fact, that the system doesn't stay suspended/hibernated and immediately wakes up.

I found a bunch of solutions to this problem but on older systems (see http://ubuntuforums.org/showthread.php?t=1444822). Unfortunately it does not help with the new kernel.

This is a critical problem for me. I use suspend 3-4 times a day. The only version, where the suspend worked on my laptop was 11.04. And I really don't want to downgrade by two releases...

share|improve this answer

My BIOS has a setting that disables waking the system due to USB activity. This may be another approach for some who experience this problem.

share|improve this answer

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.