0

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

1
  • Did any of these answers solve your problem? If so could you accept the answer that worked? Aug 10, 2012 at 5:41

5 Answers 5

2

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 ?

1
  • Hey this fixes both of suspend and hibernate issues on my netbook. Thanks a lot! :)
    – Flint
    Jul 17, 2012 at 12:17
1

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.

1

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

0

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...

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .