When using systemd's suspend-to-hibernate with user processes freezingenabled, an AC status change event may be emitted before the lid openevent if AC power was removed during a sufficiently long sleep cycle.This will cause powerdevil to erroneously put the system back to sleepimmediately after waking up.
Fix this by waiting 1 second for the system to process pending lid openevents before retriggering lid close.