Announcement

Collapse
No announcement yet.

Suspend to RAM in Natty

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Suspend to RAM in Natty

    Hi

    Let me first of all say that I have never been able to get suspend to Ram working in Linux (although I have solely run kubuntu for some 5 years now so I can't speak for other distros).

    The same thing with natty although things seem different from before. Running a live USB, it works. I can suspend to Ram and on resume everything is functional. However, from an install on resume it's inevitable that I will need to raise the skiny elephant again. Unlike earlier versions, on resume, networking is re-enabled (good). However, on clicking on any applications icon I get an error message saying kdeinit cannot find the application (or words to that effect) and any further attempts to load anything will turn the screen black. Very odd.

    Does anyone else have this problem? Hardware Dell 630m laptop 2 Gb Ram and the infernal i915 graphics card.

    Hibernate isn't a problem.

    It's not the end of the world but it would be nice if I could get it to work. Any thoughts/ideas welcome.

    Ian

    #2
    Re: Suspend to RAM in Natty

    Suspend to Ram on Natty works for me but I found this solution back in Jan which solved my problem handily for the MM. Perhaps it will solve urs in Natty... Don't remember where I found it but is easy enuff to try.

    Tom

    Fix Ubuntu 10.10 Suspend/Hibernate Not Working Bug
    Posted on January 18, 2011
    Filed Under Linux | 41 Comments Share

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

    sudo gedit /etc/pm/sleep.d/20_custom-ehci_hcd

    Step 2

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

    #!/bin/sh

    TMPLIST_E=/tmp/ehci-dev-list
    TMPLIST_X=/tmp/xhci-dev-list
    E_DIR=/sys/bus/pci/drivers/ehci_hcd
    X_DIR=/sys/bus/pci/drivers/xhci_hcd
    E_BIND=$E_DIR""/bind
    E_UNBIND=$E_DIR""/unbind
    X_BIND=$X_DIR""/bind
    X_UNBIND=$X_DIR""/unbind


    #param1 = temp file, param2 = device dir, param3 = unbind
    unbindDev (){
    #inspired by http://art.ubuntuforums.org/showpost...0&postcount=19
    echo -n '' > $1
    for i in `ls $2 | egrep '[0-9a-z]+\:[0-9a-z]+\:.*$'`; do
    echo -n "$i" | tee $3
    echo "$i" >> $1
    done
    }

    #param1 = tem file, param2 = bind
    bindDev(){
    [ -f $1 ] || return

    for i in `cat $1`; do
    echo -n "$i" | tee $2

    done
    rm $1
    }


    case "${1}" in
    hibernate|suspend)
    unbindDev $TMPLIST_E $E_DIR $E_UNBIND
    unbindDev $TMPLIST_X $X_DIR $X_UNBIND
    ;;
    resume|thaw)
    bindDev $TMPLIST_E $E_BIND
    bindDev $TMPLIST_X $X_BIND
    ;;
    esac

    Step 3

    Add executable permission:

    sudo chmod 755 /etc/pm/sleep.d/20_custom-ehci_hcd

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

    Comment

    Working...
    X