My headphone is connected to my 2019 MacBook Pro. Is there any way to listen music when it's lid is closed? I am using a Beats studio wireless.

1 Answer 1


Your MacBook will normally always go to sleep when you close the lid, and that unfortunately will stop the music playing.

But there is a way to stop your Mac from going to sleep when you close the lid with a simple shell command.

Disable sleeping when lid is closed:

sudo pmset -a disablesleep 1

Re-enable sleeping when lid is closed:

sudo pmset -a disablesleep 0
  • Does it work in the current releases of macOS, such as High Sierra and Mojave?
    – Nimesh Neema
    Aug 6, 2019 at 15:48
  • @NimeshNeema Yes it does.
    – ruohola
    Aug 6, 2019 at 15:50
  • 1
    @sherek_66 Remember to always re-enable the sleeping when you're done! I myself just leave the terminal in the foreground when I use the command, so I don't forget to undo it.
    – ruohola
    Aug 6, 2019 at 15:59
  • is 8 hours too much? for mack Mac awake?
    – sherek_66
    Aug 6, 2019 at 16:04
  • 1
    @sherek_66 Not in the sense that it would damage your Mac. But it will just use just as much battery as it would if you listened to music with the screen dimmed all the way, so it might not last that long idk.
    – ruohola
    Aug 6, 2019 at 16:05

You must log in to answer this question.

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