Running Headless: What I've Learned
3 minute readA few findings.
The lid
- Removing the lid turns it on (hall sensors in the base are activated by magnets in the lid)
- Replacing the lid leaves the device visible on the network, but it can no longer be
SSH
ed into (some form of ‘sleeping’) - During a user-initiated shutdown process (which takes some time, up to 20-30 seconds], replacing the lid re-wakes the machine — so wait 30 seconds or more before replacing the lid As the lid is no longer attached, ‘opening/closing’ makes no sense so I’ll instead use ‘removing/replacing’
Power button
- Holding the power button for 5 seconds will begin the shutdown process, but the machine will still be visible on the network for a few seconds, allow at least 15-20 seconds for shutdown to complete
- Holding the power button for 2 seconds will turn the machine on but it takes maybe 20 seconds to show up on the network As mentioned in previous parts of this series, ‘showing on the network’ is taken as a proxy for ‘machine is turned on’
From dead (no/low power)
A couple of times I’ve not used the machine for a week or more and the battery has got very flat — honestly it’s disappointing that it isn’t engineered to handle this situation better.
For a while I struggled to charge it, trying all of the following with no success:
- Charging for over 10 mins in first USB-C port
- Charging for over 10 mins in second USB-C port
- Tried powering up several times during the charge periods above
- After each attempt at powering up, waited 2 minutes for sign of life via the Macbook being seen on the LAN Charging units are dedicated USB PD/QC chargers wired directly to DC 12V/20V feeds, very stable/reliable and with ample amperage
What eventually got past this problem:
- Unplugged all cables
- Plugged one end of a charging cable into the Macbook first (top/corner port)
- THEN plugged the other end of the cable into the USB charger
- 30 seconds later I was in (Macbook showed on router as a client and could be
ssh
ed into etc)
This could be a red herring eg the order of plugging in cables was not important but instead the battery had accumulated a charge and the final successful attempts just pushed it above some threshold that would allow it to boot. The fact that the response was so quick (30 secs after plugging in the cables in this order the machine was on) makes me think this is unlikely.
The only other explanation I can think of is that which end of the charging cable is plugged in first makes a difference, possibly due to something related to USB-C handshake/power negotiations that I’m ignorant of. This is a hunch and might make no sense in reality. I leave the info/observation here with very little weight attached to it, it is what it is.