3

I sometimes have the problem that my macbook won't sleep, even with the lid closed. After some investigation I tracked the problem down to Spotify app; when the app is open, even if no song is playing, my macbook won't go to sleep and eventually go out of battery power. I don't have need of spotify keeping my mac awake (for obvious reason I'm ok with a video player or a game instead); is there a way to ignore its request for preventing sleep without affecting other applications? I know I could quit spotify when not using it, but I am prone to forget it and it's very annoying to find my mac completely drained...

EDIT: to be clearer, I am not looking for a solution about Spotify specifically (I could simply uninstall it and forget about it), I am just looking for an option which is the default in both Linux and Windows, that is that the user always overrides any setting when he/she closes the lid.

  • See this posting at MacInTouch about constant data writes from Spotify. The link to the Spotify Community forums states that this problem has been eliminated in version 1.0.42. Have you updated your version of Spotify? – IconDaemon Feb 8 '17 at 17:13
  • I knew about that and updated my client weeks ago; it didn't solve my issue and I don't think it will ever do: after all, Spotify request is legit as is my will to ignore that request! – Riccardo Cossu Feb 8 '17 at 18:47
  • In Activity Monitor > Energy tab, does Spotify show 'Yes' in the Preventing Sleep column? If you press Pause, does it switch from 'Yes' to 'No'? If not, then that's the problem. Looks like a deliberate decision by the Spotify developers not to allow the Mac to sleep when the app is paused (or at any other time!) iTunes, on the other hand, switches to 'No' when Pause is selected, then switches back to 'Yes' once the Play button is pressed. Time to contact Spotify support to complain, make a bug report and an enhancement request. – IconDaemon Feb 8 '17 at 19:44
  • I understand that Spotify is misbehaving, but this is not my point; in Linux and Windows simply no application is allowed to keep the computer on while the lid is down, and this is the default behaviour. I am trying to undestand whether there is such an option in Mac Os X (since I understood it's not the default setting). As for hoping on a fix by spotify, they took months to respond to the far more serious "disk killer" bug, I won't bet my money on them solving this anytime soon... – Riccardo Cossu Feb 8 '17 at 20:35
2

Your MacBook should always sleep when the lid is closed. If your Mac is not sleeping with the lid closed, this suggests a problem.

There are exceptions:

  • Some MacBooks can be plugged into external displays and, once connected, the MacBook's lid can be safely closed without triggering system wide sleep.

  • Previously it has been possible to install a third party kernel extension to override macOS's behaviour and stop sleep with the lid closed. Doing this carries risk and should be avoided.

Blocking Sleep

It is difficult for user space processes to block sleep. Sleep assertions should never block a user initiated sleep, either via closing the lid or requesting sleep from the Finder. Use pmset to view current power assertions:

pmset -g assertions
  • I know the problem with external displays and it's not my case; also I didn't install anything which tampered with energy management (I know tools like Caffeine, but I simply don't need them on my macbook). When the lid is closed the computer is usually off, but I have experienced once or twice when this was not the case: the "prevent sleep" settings acted above it – Riccardo Cossu Feb 9 '17 at 10:26
  • 1
    The behaviour you are seeing suggests a lower level bug in macOS, a problem with connected hardware, or a bug in the hardware of the Mac. This assumes there are no third party kernel extensions installed. – Graham Miln Feb 9 '17 at 10:28
  • 1
    I think I will go the easy way and throw spotify away :-) I will also try to understand if something is wrong with my macbook – Riccardo Cossu Feb 9 '17 at 10:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .