Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Suspend to RAM not working

  1. #1
    Join Date
    Aug 2011
    Beans
    7

    Suspend to RAM not working

    Yesterday, I upgraded to 12.04 from 11.10, which ran without any problems.

    On 12.04 my computer won't sleep (suspend to RAM). When I hit the button I get the black screen, hear the HD shutdown only for it to awake immediately after and the system awaking again.
    I increased my SWAP partition to 4 GB (I have 2GB RAM), but it's still not sleeping. Neither will it suspend to disk (I know it's been disabled by default, but I enabled it in some file by following a tut).
    Any help is greatly appreciated.

    I'm running Kubuntu 12.04, KDE 4.8.2, kernel 3.2.0-24-generic
    AMD Athlon II X2 245, 2.9 GHz, 2 GB RAM

    PS: Even trying suspending it manually from the Terminal doesn't work. I also tried stopping the network-manager first, no success.

    below is the what the suspend-log said
    /etc/pm/sleep.d/10_unattended-upgrades-hibernate suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend:
    Having NetworkManager put all interaces to sleep...Failed.

    /usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend:
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory

    /usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/75modules suspend suspend:

    /usr/lib/pm-utils/sleep.d/75modules suspend suspend: not applicable.
    Running hook /usr/lib/pm-utils/sleep.d/90clock suspend suspend:

    /usr/lib/pm-utils/sleep.d/90clock suspend suspend: not applicable.
    Running hook /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend:

    /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/95anacron suspend suspend:
    stop: Unknown instance:

    /usr/lib/pm-utils/sleep.d/95anacron suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/95hdparm-apm suspend suspend:

    /usr/lib/pm-utils/sleep.d/95hdparm-apm suspend suspend: not applicable.
    Running hook /usr/lib/pm-utils/sleep.d/95led suspend suspend:

    /usr/lib/pm-utils/sleep.d/95led suspend suspend: not applicable.
    Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend:
    Kernel modesetting video driver detected, not using quirks.

    /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/99video suspend suspend:
    kernel.acpi_video_flags = 0

    /usr/lib/pm-utils/sleep.d/99video suspend suspend: success.
    Running hook /etc/pm/sleep.d/novatel_3g_suspend suspend suspend:

    /etc/pm/sleep.d/novatel_3g_suspend suspend suspend: success.
    Mon Apr 30 21:46:01 BST 2012: performing suspend
    Mon Apr 30 21:46:09 BST 2012: Awake.
    Mon Apr 30 21:46:10 BST 2012: Running hooks for resume
    Running hook /etc/pm/sleep.d/novatel_3g_suspend resume suspend:

    /etc/pm/sleep.d/novatel_3g_suspend resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/99video resume suspend:

    /usr/lib/pm-utils/sleep.d/99video resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend:

    /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/95led resume suspend:

    /usr/lib/pm-utils/sleep.d/95led resume suspend: not applicable.
    Running hook /usr/lib/pm-utils/sleep.d/95hdparm-apm resume suspend:

    /usr/lib/pm-utils/sleep.d/95hdparm-apm resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/95anacron resume suspend:

    /usr/lib/pm-utils/sleep.d/95anacron resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/94cpufreq resume suspend:

    /usr/lib/pm-utils/sleep.d/94cpufreq resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/90clock resume suspend:

    /usr/lib/pm-utils/sleep.d/90clock resume suspend: not applicable.
    Running hook /usr/lib/pm-utils/sleep.d/75modules resume suspend:
    Reloaded unloaded modules.

    /usr/lib/pm-utils/sleep.d/75modules resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend:
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory

    /usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/55NetworkManager resume suspend:
    Having NetworkManager wake interfaces back up...Failed.

    /usr/lib/pm-utils/sleep.d/55NetworkManager resume suspend: success.
    Running hook /etc/pm/sleep.d/10_unattended-upgrades-hibernate resume suspend:

    /etc/pm/sleep.d/10_unattended-upgrades-hibernate resume suspend: success.
    Running hook /etc/pm/sleep.d/10_grub-common resume suspend:

    /etc/pm/sleep.d/10_grub-common resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/01PulseAudio resume suspend:
    Welcome to PulseAudio! Use "help" for usage information.
    >>> >>> Welcome to PulseAudio! Use "help" for usage information.
    >>> >>> Welcome to PulseAudio! Use "help" for usage information.
    >>> >>>
    /usr/lib/pm-utils/sleep.d/01PulseAudio resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/00powersave resume suspend:

    /usr/lib/pm-utils/sleep.d/00powersave resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/00logging resume suspend:

    /usr/lib/pm-utils/sleep.d/00logging resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/000kernel-change resume suspend:

    /usr/lib/pm-utils/sleep.d/000kernel-change resume suspend: success.
    Mon Apr 30 21:46:10 BST 2012: Finished.
    Last edited by schnurrbidurr; April 30th, 2012 at 09:57 PM.

  2. #2
    Join Date
    Aug 2011
    Beans
    7

    Re: Suspend to RAM not working

    Anyone?

  3. #3
    Join Date
    Jul 2008
    Beans
    9

    Re: Suspend to RAM not working

    My problem was one of my USB devices keeping the computer awake, so I made a script file (as root) in /etc/pm/sleep.d with the following:

    Code:
    #!/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;
    I have to use the power button to wake but sleep works now

  4. #4
    Join Date
    Mar 2008
    Beans
    7

    Re: Suspend to RAM not working

    I had a similar problem when I installed 12.04,which I solved in a slightly different manner. The command "cat /proc/acpi/wakeup' (without the quotes) list all devices which can wake the system. in my case the result was
    Code:
    Desktop$ cat /proc/acpi/wakeup
    Device	S-state	  Status   Sysfs node
    SMB0	  S4	*disabled  pci:0000:00:03.2
    USB0	  S4	*disabled  pci:0000:00:04.0
    USB2	  S4	*enabled   pci:0000:00:04.1
    US15	  S4	*disabled  pci:0000:00:06.0
    US12	  S4	*enabled   pci:0000:00:06.1
    NMAC	  S5	*disabled  pci:0000:00:0a.0
    PBB0	  S4	*disabled  pci:0000:00:09.0
    HDAC	  S4	*disabled  pci:0000:00:08.0
    XVR0	  S4	*disabled  pci:0000:00:0c.0
    XVR1	  S4	*disabled  
    P0P5	  S4	*disabled  
    P0P6	  S4	*disabled  pci:0000:00:15.0
    P0P7	  S4	*disabled  pci:0000:00:16.0
    P0P8	  S4	*disabled  pci:0000:00:17.0
    P0P9	  S4	*disabled  pci:0000:00:18.0
    PWRB	  S4	*enabled
    The four lines starting with US are USB devices.The command 'echo US15 > /proc/acpi/wakeup' will toggle the state of US15. (this command must be used in a root terminal as redirection does not work with sudo. Using 'echo US15 | sudo tee /proc/acpi/wakeup' works from a user prompt.)

    I disabled just two of the USB devices (USB0 and US15) and was able to suspend and resume. This settings are not persistent on booting, so I had to add the commands to my rc.local file.

    I did find a tool called acpitool in the repositories which allows enabling and disabling the devices.

    This worked for me, YMMV

  5. #5
    Join Date
    Feb 2006
    Beans
    5

    Re: Suspend to RAM not working

    Quote Originally Posted by mcendoo View Post
    I had a similar problem when I installed 12.04,which I solved in a slightly different manner. The command "cat /proc/acpi/wakeup' (without the quotes) list all devices which can wake the system. in my case the result was
    Code:
    Desktop$ cat /proc/acpi/wakeup
    Device	S-state	  Status   Sysfs node
    SMB0	  S4	*disabled  pci:0000:00:03.2
    USB0	  S4	*disabled  pci:0000:00:04.0
    USB2	  S4	*enabled   pci:0000:00:04.1
    US15	  S4	*disabled  pci:0000:00:06.0
    US12	  S4	*enabled   pci:0000:00:06.1
    NMAC	  S5	*disabled  pci:0000:00:0a.0
    PBB0	  S4	*disabled  pci:0000:00:09.0
    HDAC	  S4	*disabled  pci:0000:00:08.0
    XVR0	  S4	*disabled  pci:0000:00:0c.0
    XVR1	  S4	*disabled  
    P0P5	  S4	*disabled  
    P0P6	  S4	*disabled  pci:0000:00:15.0
    P0P7	  S4	*disabled  pci:0000:00:16.0
    P0P8	  S4	*disabled  pci:0000:00:17.0
    P0P9	  S4	*disabled  pci:0000:00:18.0
    PWRB	  S4	*enabled
    The four lines starting with US are USB devices.The command 'echo US15 > /proc/acpi/wakeup' will toggle the state of US15. (this command must be used in a root terminal as redirection does not work with sudo. Using 'echo US15 | sudo tee /proc/acpi/wakeup' works from a user prompt.)

    I disabled just two of the USB devices (USB0 and US15) and was able to suspend and resume. This settings are not persistent on booting, so I had to add the commands to my rc.local file.

    I did find a tool called acpitool in the repositories which allows enabling and disabling the devices.

    This worked for me, YMMV
    Thank you so much. This did the trick. I've been looking for solution to this problem for two days...

  6. #6
    Join Date
    Jul 2010
    Beans
    2

    Re: Suspend to RAM not working

    Thank you for the post, mcendoo, because it solved the issue for me. (I am using a desktop with Ubuntu 12.04 and an nVidia graphic card with nouveau.)

    I have put your solution in a script that you could install as root, with execute permissions, in "/etc/pm/sleep.d/8_disable_USB.sh". The script disable all USB devices at suspend time. I attach it, as some may find it easy, it makes the fix persistent and easy to install.
    Attached Files Attached Files

  7. #7
    Join Date
    Mar 2008
    Beans
    7

    Re: Suspend to RAM not working

    Quote Originally Posted by Olly TH View Post
    Thank you for the post, mcendoo, because it solved the issue for me. (I am using a desktop with Ubuntu 12.04 and an nVidia graphic card with nouveau.)

    I have put your solution in a script that you could install as root, with execute permissions, in "/etc/pm/sleep.d/8_disable_USB.sh". The script disable all USB devices at suspend time. I attach it, as some may find it easy, it makes the fix persistent and easy to install.
    I am not very familiar with regular expressions, but I don't think your script covers all tha USB entries in /proc/acpi/wakeup. As I understand it, usb entries can be USB0 to USB9, then US11, US12 etc. Your script seems only to look for USB0 to USB9. In my case I had to disable USB0 and US15 to get suspend to work. Also, by disabling all the USB entries, will that not preclude waking a system with a USB devise? (In my case this is not an issue as my motherboard has an error on it that shuts the 5v power off on suspend, preventing any USB device waking up the system)

  8. #8
    Join Date
    May 2006
    Beans
    2
    Distro
    Dapper Drake Testing/

    Re: Suspend to RAM not working

    Hi,

    in my case, this is what I get
    ~$ cat /proc/acpi/wakeup | grep US
    USB1 S3 *disabled
    USB2 S3 *disabled
    USB3 S3 *disabled
    USB4 S3 *disabled
    USB5 S3 *disabled
    USB6 S3 *disabled
    USB7 S3 *disabled
    so all the usb are disabled.
    Could there be any other cause of my suspend problem? Also, after suspending, my ubuntu does not restart, just stays half suspended: screen on but black.

    Any ideas?
    Fiikske

  9. #9
    Join Date
    Oct 2010
    Beans
    7

    Smile Re: Suspend to RAM not working

    Okay, originally I got confused when I ran cat /proc/acpi/wakeup and didn't see any USB devices... Here's what it looked like at first on my new Toshiba L840:
    Code:
    Device	S-state	  Status   Sysfs node
    P0P1	  S4	*disabled  
    GLAN	  S0	*disabled  
    EHC1	  S3	*enabled   pci:0000:00:1d.0
    EHC2	  S3	*enabled   pci:0000:00:1a.0
    XHC	  S3	*enabled   pci:0000:00:14.0
    HDEF	  S0	*disabled  pci:0000:00:1b.0
    RP01	  S4	*disabled  pci:0000:00:1c.0
    PXSX	  S4	*disabled  
    RP02	  S4	*disabled  
    PXSX	  S4	*disabled  
    FRES	  S0	*disabled  
    RP03	  S0	*disabled  pci:0000:00:1c.2
    PXSX	  S4	*disabled  pci:0000:02:00.0
    RP04	  S4	*disabled  pci:0000:00:1c.3
    PXSX	  S4	*disabled  pci:0000:03:00.0
    RP05	  S4	*disabled  
    PXSX	  S4	*disabled  
    RP06	  S4	*disabled  
    PXSX	  S4	*disabled  
    RP07	  S4	*disabled  
    PXSX	  S4	*disabled  
    RP08	  S4	*disabled  
    PXSX	  S4	*disabled  
    PEG0	  S4	*disabled  
    PEGP	  S4	*disabled  
    PEG1	  S4	*disabled  
    PEG2	  S4	*disabled  
    PEG3	  S4	*disabled  
    LID	  S5	*enabled
    Even though I don't have any USB devices, the three devices at the top that are listed as enabled are in fact USB. So I just had to disable EHC1, EHC2, and XHC by putting this is my /etc/rc.local file and rebooting:

    Code:
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    
    echo "EHC1" > /proc/acpi/wakeup
    echo "EHC2" > /proc/acpi/wakeup
    echo "XHC" > /proc/acpi/wakeup
    
    exit 0
    ...this is the only permanent solution I could find, which isn't very clean in my opinion. If there is a better way to permanently disable these devices then please someone post it!
    Last edited by acjohnson; September 10th, 2012 at 06:36 AM. Reason: typo

  10. #10
    Join Date
    Sep 2010
    Beans
    1

    Re: Suspend to RAM not working

    Well I don't believe it.

    acjohnson you are not only genius, but courteous enough to post this vital piece of information that I've needed for months.

    I've never had USB anything in my /proc/acpi/wakeup file, and that whole usbcore.suspend=-1 thing did nothing.

    I only have 2 entries now that are enabled.( I still don't know what NECU is but even I am smart enough to know that LID means the laptop screen!!!!), but I don't care, because now I can finally suspend more than once. It's been driving me batty.

    Where on earth is /proc/acpi/wakup getting these values from, and why are the different after reboot than after resume?

    I tried to modify the /sys/devices/pci:0000:00/0000:00:1a.0/power/wakeup file but even with sudo it wouldn't let me change it.

    I was able to change /sys/devices/pci:0000:00/0000:00:1a.0/usb1/power/wakeup from enabled to diabled but that had no effect. I'm willing to bet the former would've fixed it though had I been able to save the change.

    Anyway, thanks a million.
    Last edited by ironboy; November 11th, 2012 at 03:24 AM.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •