Need my Mac to run in clamshell mode.

  1. printf "HandleLidSwitch=ignore\n" >> /etc/systemd/logind.conf
  2. systemctl restart systemd-logind.service
  3. # do not suspend
  4. printf "AllowSuspend=no\n" >> /etc/systemd/sleep.conf