Attempt to add 'sleep2wake' functionality

That was some rigorous copy-paste.