0

Recently (that is a week after installing Ubuntu), my laptop does not suspend anymore. Every time I try to suspend, it flashes a few times, locks my screen and then instantly resumes. The same happen when running pm-suspend.

I'm running Ubuntu 12.10 64-bit with Jupiter installed for managing the performance, if that's of any help.

3 Answers 3

0

The problem seems to be to do with the usb host controllers regarding suspending and resuming as temporarily editing /proc/acpi/wakeup, as noted on Ubuntuforums, might sometimes enable successful suspending of the ASUS 1201N.

However, to implement a permanent solution you would probably need to create a custom suspend script or try the script from here. It has been said to work with the 1201N on that site and on this forum, but you just need to change DRIVERS="ehci xhci" to DRIVERS="ehci ohci" in the body of the first script on the site. I've also posted the edited script from the site in a pastebin slot in case the original site becomes unavailable.

So, create a file such as this one (the title doesn't matter, but must be prefixed with at least 20 to override any other files):

sudo touch /etc/pm/sleep.d/20_custom_usb 

and refer to the the pastebin copy of the script, which has the changed DRIVERS section. Now open your new file and copy the contents of the script into it with:

sudo nano /etc/pm/sleep.d/20_custom_usb

Then make it executable with

sudo chmod 755 /etc/pm/sleep.d/20_custom_usb

You can then restart your machine and then test to see if it suspends correctly. This method has been said to work on that site, as the comments on the forums testify, and is definitely worth trying.

Other than that, it may be a bug with the kernel you are using, although that is unlikely. However, see this report at Launchpad. The only alternative there was to upgrade the kernel or take the risk of using one of the more recent mainline kernels. See this article for more on the dangers of using the mainline kernels:

2
  • Thanks for taking the time to write such a thorough response. A shame the rep went to waste, but I was away at the time. Now suspend works again!
    – user99643
    Dec 2, 2012 at 19:07
  • 1
    @DoDoGo Ok- glad it worked for you!
    – user76204
    Dec 2, 2012 at 19:07
0

Since it has nvidia ion graphics, have you tried enabling the proprietary drivers? In case you decide to do so, make sure you install linux-headers-generic before anything and in hardware drivers, select nvidia proposed updates rather than the other one.

1
  • The properietary drivers are in place, along with linux-headers-generic. It's currently on 310.19, but it didn't work on 304.48 either.
    – user99643
    Nov 16, 2012 at 16:49
0

You may try this magick (to /etc/pm/sleep.d/):

#!/bin/bash

usb {
    dir="/tmp/usb-disabled/";
    mkdir -p "$dir";
    ls '/sys/bus/pci/drivers/' | grep '_hcd$' | while read driver; do
        cd "/sys/bus/pci/drivers/${driver}";
        if [[ "$1" == "bind" ]]; then
            action="bind";
            ids=$(cat "$dir/$driver");
            rm -f "$dir/$driver";
        else
            action="unbind";
            ids=$(ls | grep ':');
            echo "$ids" > "$dir/$driver"; 
        fi;
        for id in $ids; do
            echo -n "$id" > "$action";
        done;
    done;
    rmdir "$dir" 2> /dev/null;
}

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

You must log in to answer this question.