Wake lock and unlock implementation