Merge "Implement auto-sleep functionality." into lmp-dev