Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

motrek

macrumors 68030
Original poster
Sep 14, 2012
2,680
368
I have a 2015 MBP that I'm trying to use part-time as an HTPC. I have it lid-closed, vertical, in a laptop stand. I have it plugged in to my TV via HDMI, plugged into power, and I have a Logitech USB dongle plugged in to connect the laptop to a wireless keyboard/trackpad combination.

This is all working as expected, except the laptop goes to sleep at random times while I'm watching streaming video. Which is obviously unacceptable.

I've gone to System Preferences and changed my power settings so the laptop should sleep after 2 hours of inactivity (for both battery power and wall power). I did this two days ago when the laptop was on Catalina, and I've since updated to Big Sur, along with all the reboots that has required. So this problem has persisted across two versions of MacOS and multiple reboots.

Last night I was trying to watch a movie on Amazon Prime and the laptop went to sleep 5 minutes after starting the movie, then 15 minutes after that, then 25 minutes again after that. There doesn't seem to be any rhyme or reason to when the laptop goes to sleep.

Any help/ideas would be greatly appreciated. Thanks in advance!
 
I would check

pmset -g log | grep -i "entering sleep"

to show why it went to sleep when, if you can remember the timing of one of the unexpected sleeps
 
  • Like
Reactions: motrek
I would check

pmset -g log | grep -i "entering sleep"

to show why it went to sleep when, if you can remember the timing of one of the unexpected sleeps

Here's the line in question:

Entering sleep state due to 'Clamshell Sleep':TCPKeepAlive=active Using AC (Charge:100%) 3 secs

So the laptop seems to understand that it's in clamshell mode and that it's plugged into AC, but it's still going to sleep even though I interacted with it less than 15 minutes ago and it's set to sleep after 2 hours when on AC power.

Very disappointing and annoying. Ideas? :(
 
Right, so either it's a bug or a problem with the display / connection. Either test different displays with the MBP or different inputs with the TV to isolate between those, then different connectors. Particularly, if the TV's HDMI driver is crashing, prompting a no input message, then of course the MBP will go to sleep at that point. In which case what looks like the symptom is actually the cause.
 
Right, so either it's a bug or a problem with the display / connection. Either test different displays with the MBP or different inputs with the TV to isolate between those, then different connectors. Particularly, if the TV's HDMI driver is crashing, prompting a no input message, then of course the MBP will go to sleep at that point. In which case what looks like the symptom is actually the cause.

Interesting idea. This will be inconvenient for me to test because I don't have any other TVs. I suppose I could plug the laptop into a different input but I don't see how that would change much.

But, here's a question. The line in the log says that the laptop went into 'clamshell sleep.'

Which presumably means the laptop knows it's in clamshell mode, and a condition of being in clamshell mode is that the laptop is connected to a monitor/TV.

So if the problem is that the laptop is losing the connection to the TV for some reason, wouldn't it then exit clamshell mode? And then maybe it would go to sleep, but presumably the reason for going to sleep wouldn't be 'clamshell sleep' because the laptop would no longer be in clamshell mode?
 
In pmset lots of definitions are backwards of OS X feature names. When you close your lid under normal conditions and the Macbook goes to sleep, pmset calls that "clamshell". When a display is connected and it does not go to sleep, that's the feature "clamshell mode." pmset doesn't call that anything, it's just a display change.

When your Mac is going to sleep, it thinks the display is no longer connected, so pmset goes to sleep because the lid is closed, and logs "Clamshell AC". (Whereas if it had said "Clamshell battery" at the time the TV was connected, that would indicate it thought the AC power was no longer connected, and then it would have been a question of what's happening with the charger.)
 
  • Like
Reactions: motrek
In pmset lots of definitions are backwards of OS X feature names. When you close your lid under normal conditions and the Macbook goes to sleep, pmset calls that "clamshell". When a display is connected and it does not go to sleep, that's the feature "clamshell mode." pmset doesn't call that anything, it's just a display change.

When your Mac is going to sleep, it thinks the display is no longer connected, so pmset goes to sleep because the lid is closed, and logs "Clamshell AC". (Whereas if it had said "Clamshell battery" at the time the TV was connected, that would indicate it thought the AC power was no longer connected, and then it would have been a question of what's happening with the charger.)

On your advice, I switched to a different HDMI cable and also switched to a different input on my TV. The result was the same. The laptop goes to sleep at basically random times while I'm watching streaming video.

Now that I think about it, this is especially odd because I've used this laptop and this HDMI cable to drive a (different) TV for hours and hours earlier this year. Although now that I think about it, the laptop wasn't in lid-closed mode then.

Assuming nothing is wrong with the HDMI cable or TV, doesn't that point to a software problem with the laptop? Do you have any idea re: my options in that case?

Thanks in advance.
 
Assuming nothing is wrong with the HDMI cable or TV, doesn't that point to a software problem with the laptop? Do you have any idea re: my options in that case?
Yes.

But why would one assume anything about the TV. I would see what happens in clamshell mode with a different display first.
 
Yes.

But why would one assume anything about the TV. I would see what happens in clamshell mode with a different display first.

Basically because I can't. My TV is the only "independent" display that I own at the moment. I have a desktop computer but it's a 5K iMac that doesn't have a Target Display Mode.

Local Covid restrictions mean that I can't go visit somebody else and try the laptop with their TV, either.

I have reason to believe that my TV is not the problem, too. I have a Windows laptop that I usually use as an HTPC and it works fine. (I'm using it for a different thing now though, which is why I'm trying to get the Mac working as an HTPC.) I also have a little Android TV box and that works fine with the TV too.

On one hand, I'm not sure I'd be able to notice an interruption in the HDMI signal that might cause the Mac to go to sleep but might not affect the Windows laptop or streaming box. But on the other hand, my TV displays a banner at the top when it loses a signal or starts receiving a signal, and I see no such banners while watching TV with the other devices.

So assuming (for the time being) that this is a software problem with the MacBook, any ideas for a remedy? Thanks!
 
If it's the Mac, my guess would be a problem with the driver or the HDMI port. But it's odd that any problem in that realm would be as silent as this, rather than on the order of "your computer was restarted because of a problem."

Troubleshooting Mac OS drivers is totally beyond my depth. You could look for other entries in the system.log at the time of the sleep besides the pmset one. This is where I would just try reinstall OS. In your case, since you already updated and it didn't fix, then I would try a clean reinstall.
 
  • Like
Reactions: motrek
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.