Merge branches 'pm-apm' and 'pm-sleep'