The script from b3nn0 works for me on an Asus 1225B with Ubuntu 12.04.
For the people who are having problems: suspend is probably working for you, but the laptop wakes up immediately after going to sleep.
I had the same problem, but found a fix: 1. Enable "wake up on lid" in BIOS 2. Disable "wake up on lid" in /proc/acpi/wakeup (I used acpitool)
Using the script and these settings, suspend works perfectly. Hibernate seems to be unavailable, but I only use suspend because it's faster.
The script from b3nn0 works for me on an Asus 1225B with Ubuntu 12.04.
For the people who are having problems: suspend is probably working for you, but the laptop wakes up immediately after going to sleep.
I had the same problem, but found a fix:
1. Enable "wake up on lid" in BIOS
2. Disable "wake up on lid" in /proc/acpi/wakeup (I used acpitool)
Using the script and these settings, suspend works perfectly. Hibernate seems to be unavailable, but I only use suspend because it's faster.