I'm trying to make sure that my laptop will suspend if I unplug it after the lid is already closed, and I believe that one way to accomplish this would be to simulate an ACPI lid event when the power adapter is plugged or unplugged. In order to do this, I need to find a command that will generate a fake ACPI lid event. Is there any such command?

Couldn't you just close your lid and unplug it and wait a moment. Then open your lid? If it was suspended you would either see it waking up or have to push power to wake it up.
–
MrStaticJul 4 '10 at 23:57

What I mean is, if I close the lid and then unplug the laptop. It should suspend, but it doesn't, for reasons that I address in another question: superuser.com/questions/160000/… I'm attacking the problem from two angles, and fake ACPI events is one of them.
–
Ryan ThompsonJul 5 '10 at 1:04

Look in your /sys/power and see if there is an item for the lid. If there is, you can try writing a different state to it with echo -n "x" . I don't have linux on a laptop to see whats in there. (My source/thoughts from acpi.sourceforge.net/documentation/sleep.html)
–
NextraztusAug 8 '10 at 15:55