Laptop Lid Switch Configuration
Want to run Proxmox on a 2016 MBP or older and close the lid?
Configuration Steps
1. Edit systemd login configuration
Open the login configuration file:
nano /etc/systemd/logind.conf
2. Modify lid switch behavior
Find the line:
HandleLidSwitch=suspend
Change it to:
HandleLidSwitch=ignore
3. Restart the service
Apply the changes by restarting systemd-logind:
systemctl restart systemd-logind
4. Verify the configuration
Check that the service is running properly:
systemctl status systemd-logind
Why This Matters
By default, most Linux distributions (including Debian, which Proxmox is based on) are configured to suspend the system when a laptop lid is closed. This is problematic for:
- Proxmox nodes that need to run 24/7
- Headless laptop servers
- Systems used in confined spaces where the lid needs to be closed
Additional Options
The HandleLidSwitch
parameter supports several values:
- ignore - Do nothing when lid is closed
- suspend - Suspend the system (default)
- hibernate - Hibernate the system
- poweroff - Power off the system
- lock - Lock the session
Note: For Proxmox nodes, ignore
is the recommended setting.