Since upgrading to from Xubuntu 11.10 oneiric to LTS 12.04 precise, my PC would resume from suspend when the mouse moved. That might sound fun, but it's pretty annoying, considering that you touch the table to pick up something and the PC resumes again... hmpf.
[SOLUTION]
The following is closely based on a blog entry by "shadyabhi" on abhijeetr.com, but adapted to my setup (which had different wakeup-devices enabled).
In order to see what is enable to wake up your system from suspend, take a look at "/proc/acpi/wakeup", like this:
Code: Select all
$ cat /proc/acpi/wakeup
Code: Select all
Device S-state Status Sysfs node
P0P1 S4 *disabled pci:0000:00:01.0
P0P2 S4 *disabled
P0P3 S4 *disabled
P0P4 S4 *disabled
GBE S4 *enabled pci:0000:00:19.0
BR20 S3 *disabled
EUSB S3 *enabled pci:0000:00:1d.0
USBE S3 *enabled pci:0000:00:1a.0
PEX0 S4 *disabled pci:0000:00:1c.0
BR21 S4 *disabled pci:0000:02:00.0
PEX1 S4 *disabled
PEX2 S4 *disabled
PEX3 S4 *disabled pci:0000:00:1c.3
PEX4 S4 *disabled
PEX5 S4 *disabled
PEX6 S4 *disabled
PEX7 S4 *disabled
PWRB S3 *enabled
However, I wanted only the power button and my network (WOL) to allow resume from suspend.
If you echo one of those "Device" abbreviation strings to /proc/acpi/wakeup, it toggles the state between enable/disabled.
So in my case I did (as root):
Code: Select all
$ printf "EUSB\nUSBE\n" > /proc/acpi/wakeup
Code: Select all
Device S-state Status Sysfs node
P0P1 S4 *disabled pci:0000:00:01.0
P0P2 S4 *disabled
P0P3 S4 *disabled
P0P4 S4 *disabled
GBE S4 *enabled pci:0000:00:19.0
BR20 S3 *disabled
EUSB S3 *disabled pci:0000:00:1d.0
USBE S3 *disabled pci:0000:00:1a.0
PEX0 S4 *disabled pci:0000:00:1c.0
BR21 S4 *disabled pci:0000:02:00.0
PEX1 S4 *disabled
PEX2 S4 *disabled
PEX3 S4 *disabled pci:0000:00:1c.3
PEX4 S4 *disabled
PEX5 S4 *disabled
PEX6 S4 *disabled
PEX7 S4 *disabled
PWRB S3 *enabled
You could write a small script though, call it "acpi_wakeup" and put it in "/etc/init.d":
Code: Select all
#!/bin/sh
printf "EUSB\nUSBE\n" > /proc/acpi/wakeup
Code: Select all
$ chmod 755 /etc/init.d/acpi_wakeup
Code: Select all
$ update-rc.d acpi_wakeup defaults