Why does my laptop resume immediately after suspend? [closed]

Solution 1:

On the HP Envy dv6, the following works on 13.10 (after upgrade from 13.04; 13.04 had no suspend issues) using acpitool(1).

  1. use acpitool -w to list wakeup capable devices.

Device S-state Status Sysfs node

  ---------------------------------------
  1. P0P1   S4    *disabled
  2. KBD0   S3    *enabled   pnp:00:07
  3. PS2M   S3    *disabled  pnp:00:08
  4. EHC1   S3    *enabled   pci:0000:00:1d.0
  5. EHC2   S3    *enabled   pci:0000:00:1a.0
  6. XHC    S3    *enabled   pci:0000:00:14.0

etc

The USB devices are 4,5,6. How do I know? I compared the sysfs node values to the output of lspci|grep USB

  1. Use acpitool -W to disable the USB devices:

acpitool -W 4; acpitool -W 5; acpitool -W 6

Solution 2:

The similar problem with awake immediately after suspend exists on ASUS Eeepc 1201n:

The solution posted there suggests adding two commands to the /etc/rc.local file:

The solution I have found is very simple and effective. The only problem that makes the laptop wake up are two USB components that need to be disabled. To do that edit the file /etc/rc.local:

sudo gedit /etc/rc.local

It should look like this:

 #!/bin/sh-e
 # Rc.local
 # This script is Executed at the End of Each multiuser runlevel.
 # Make sure the script That 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.

 # Added by Carlos TD

 echo US15 | sudo tee /proc/acpi/wakeup
 echo USB0 | sudo tee /proc/acpi/wakeup

 exit 0

All I did was add these two commands:

echo US15 | sudo tee /proc/acpi/wakeup
echo USB0 | sudo tee /proc/acpi/wakeup

These orders are for USB components that did not allow the laptop to remain suspended. Disabling it from the local file does not affect the system

If you want to see all the USB components enabled to wake the laptop, this is the command. You will notice that these two are no longer enabled (of course after reboot):

cat /proc/acpi/wakeup

This very good and simple solution I found this forum, and then adapted it to my eeepc. I think it is for many laptops with this problem. You only need to adapt the trick to each machine by testing out which USB devices are the problem. You can test by running the above mentioned command for each device and testing sleep functionality. I found it on this forum: http://ubuntuforums.org/showthread.php?t=1969615

Solution 3:

On my Asus 1201N, adding only

echo US15 | sudo tee /proc/acpi/wakeup

to /etc/rc.local fixed the problem with suspend.