Spotify prevents Mac from going to sleep


Spotify prevents Mac from going to sleep

Not applicable



running the Spotify client prevents my Mac from going to sleep, even when no song is being played.

By typing "pmset -g assertions" into the terminal window, you'll get a list of diagnostic information regarding power save mode. As long as Spotify is running, it contains the the line

  PreventUserIdleSystemSleep named: "'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep" 


This would be the expected behavior when a song is being played but seems to be a bug otherwise.


A fix would be nice!







Yeah, it's a bummer.  I now use hotcorners and have the ScreenSaver app in my dock just so I can activate it manually.  But then there are times I fall asleep on my couch and wake up to my TV on and spotify open and think "Yep, can't wait until that's burned-in forever"

View solution in original post

69 Replies

Casual Listener

2018 and I still have this problem on a Mac Mini with High Sierra 10.13.2


Same issue here. If I close the top of my MacBook it doesn't go to sleep, therefore it does not lock it, so anyone can open it up and use it.


I'm getting this issue after wondering why my Mac wouldn't sleep.

When paused, it's still preventing sleep. As soon as you fully exit spotify, it's fine.

This has caught me out multiple times when I've left it open on a table and returned to find the battery draining out.


On a new Macbook Pro TB / OSX 10.12.5, Spotify

Music Fan



I'm the one who wrote that script. I'm not sure that it still works (I seem to recall trying it and it no longer being able to run), but I haven't needed to use it for a couple of years. The problem just hasn't been there.


Here's an interesting but weird data point though. Last week, I installed a new system disk and started fresh (no restore from Time Machine backup). And Spotify was causing the sleep issue again! But now it isn't anymore...


I'm honestly not sure what fixed it, but I can tell you what I tried.


I removed the app from Applications and deleted Spotify's data from ~/Library/Application support. Then I took the app from my old install and ran that. The sleep issue was gone. Just to double check that the new version was actually causing the issue, I repeated the steps (binning the app and it's data) and installed the new version again. The sleep issue was still gone.


I'm really at a loss as to what fixed the issue, because these steps look like more some kind of weird witchcraft than something that should fix anything... but fixed it is. No troubles with sleep here.

Casual Listener

That is really weird @drdaz... Anyway, since I can't get my Spotify to work as expected, can you please point me where your script is? Maybe I can tweak it a little if it no longer works.

Music Fan

There was a link (now dead) to it in either this thread, or another about the same thing. I've attached it here.


Good luck!


EDIT: I've toyed with trying to get it to work a little, and there are a few things. The plist file I read to get the System Sleep Time has moved in Sierra to 

/Library/Preferences/ In the plist, I also don't have the 'Custom Profile' entry anymore, so that needs to go away. Also if you, like me, live in a locale where decimal points are represented as commas, then the place where I calculate the current idle time won't work, since the shell script returns a number with the decimal point as a period.



Casual Listener

« BUMP »


Definitely still happening to me and my 2012 MBA running Sierra 10.12.3, with Spotify v.

Assertion is still there, after i have quit the application and neither the helper, coreaudiod or the spotify app show up in the activity monitor.


Are we still seeing this consistently across a handful of machines?  wowee.


For the past 5 months i thought my battery issues were just in my head....

Bedroom Songwriter,  thanks for your dillegent work in the past years working with this issue.

Good luck out there....

Music Fan
Hey, if the assertion is still there after you quit Spotify, then Spotify isn't your problem!

Casual Listener
Yikes! Well thanks for the clarification. I'll double check next time I
notice the issue.

Casual Listener

2017, still an issue. Spotify, hello?


My mac not sleep too.


Casual Listener

My Macbook doesn't sleep either... This is inadmissible. I'm considering to stop using Spotify because of this 😞


It's 2017 and it's still not fixed.



checking in to say this is still an issue on OS 10.11.6 (15G31) with Spotify version


Until this is fixed, I'll be using the AppleScript posted by drdaz to auto-close Spotify when idle and not playing.

Casual Listener

Where is this script you are talking about? I searched for it but couldn't find it...




I have the same problem..


We should keep bumping this until someone from Spotify can give us a definitive answer. This is incredibly annoying.


Signed up to bump this issue


Spotify still prevents the Mac from sleep in 2015 with Yosemite:


pmset -g assertions
2015-10-03 16:04:33 +0200 
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     1
   NetworkClientActive            0
Listed by owning process:
   pid 96(hidd): [0x0000001e0009016c] 01:54:22 UserIsActive named: "" 
	Timeout will fire in 584 secs Action=TimeoutActionRelease
   pid 223(coreaudiod): [0x0000184600010292] 00:11:17 PreventUserIdleSystemSleep named: "" 
	Created for PID: 999. 
   pid 223(coreaudiod): [0x0000184600010291] 00:11:17 PreventUserIdleSystemSleep named: "" 
	Created for PID: 999. 

There are two


 I found out that one is Spotify, the other one is Spotify Helper. If I force quit them, these two strings disappear from the assertions. Very strange that the Spotify developers still have to fix this.