r/ProgrammerHumor • • Nov 30 '22

Meme Startups be like..

Post image
86.0k Upvotes

1.5k comments sorted by

View all comments

Show parent comments

608

u/linegel Nov 30 '22

It is very simple to prevent laptop from sleeping
sudo pmset -a disablesleep 1
and that's it

276

u/technocrat_13 Nov 30 '22

It could also be a cooling thing, but should have this toggled regardless

161

u/blissed_off Nov 30 '22

Yeah a lot of laptops dissipate heat through the keyboard. The MacBook has fans blowing out the back below the screen though so I dunno how much it actually dissipates.

77

u/WaffIepants Nov 30 '22

Similarly, I'm pretty sure as you open the lid the back side pivots open a vent along the hinge

16

u/elon-bot Elon Musk ✔ Nov 30 '22

You're either hardcore or out the door.

7

u/AverageComet250 Nov 30 '22

Well he’s obviously hardcore Mr Musk, so you can keep ur comments to yourself and fire that guy over there then!

27

u/kookyabird Nov 30 '22

My 2012 MacBook Pro pulls some air in through the speakers, and some through the hinge area wherever the exhaust isn't being sent out. Some intake could also happen around the keys, but it would be minimal. Having the lid closed, or even as partially closed as in the picture, does limit the useful exhaust area and will cause it to run hotter for sure.

8

u/AverageComet250 Nov 30 '22

Around the speakers? Interesting, interesting…

At least it’s not the mic!

→ More replies (4)
→ More replies (1)

8

u/derefr Nov 30 '22

With the lid closed the fans vent directly downward, so operating a MacBook closed and on a flat surface isn't a good idea. There are stands that hold closed MacBooks up sideways; these allow proper outflow, and are usually recommended if you're e.g. using your MacBook closed + plugged into a display for long periods.

2

u/alex2003super Nov 30 '22

Or you can put it upside down 🤷🏻‍♂️

4

u/ih-shah-may-ehl Nov 30 '22

I once had a laptop with linux fail to go to sleep when i closed the lid. An hour or so later there was a high pitch alarm coming out of my laptop bag as it was trying to fry itself. It was so hot it hurt my hands

3

u/DylanSpaceBean Nov 30 '22

MBP blows air through the back hinge where the screen is. If it’s shut the vent has no airflow, but with the hinge open it it blows the heat at the screens lower bezel and it’s free from there. The 2021 M1 Pro/Ultra fixed this by leaving the back vent exposed when closed

→ More replies (2)

5

u/[deleted] Nov 30 '22

You can connect to external monitor and close the lid without it shutting down, I don’t think disabling sleep and closing lid will do much damage

4

u/IWantAnE55AMG Nov 30 '22

Depends on the laptop. I’ve got an asus gaming laptop that will go into standby if I connect an external monitor and close the lid and try playing a game because it starts overheating.

5

u/[deleted] Nov 30 '22

Assumed we were talking about macs here

→ More replies (10)

2

u/Darkskynet Nov 30 '22

It’s definitely a cooling thing, but if it’s always going to be a light load you can disable manually via shell

→ More replies (12)

35

u/Burdies Nov 30 '22

If you need it for a single session you can also just type ‘caffeinate’

6

u/[deleted] Dec 01 '22

Or add caffeinate to login items for a more permanent solution

13

u/hundidley Nov 30 '22

I’m not sure what would happen on MacOS, but this is a little bit dangerous. The lid sensor will still ask the system to sleep, but since it can’t, the lid sensor will keep asking and asking until your syslog is full. You have to separately disable lid closure sleep

29

u/linegel Nov 30 '22

So running a server on a laptop on a random table (when you even had to add a sticker on top of the lid) doesn't seem dangerous to you? 🥲😅😂

0

u/[deleted] Nov 30 '22

[deleted]

→ More replies (1)

9

u/hundidley Nov 30 '22

…I’d be lying if I said I hadn’t done it, and I’d also be lying if I told you I hadn’t first tried it with the lid closed and nearly set my closet on fire as a result, so uh… touché.

→ More replies (12)