Adding support for sleep/wakeup