Laptop Lid Switch Configuration
Disable lid switch suspend when converting laptops to Proxmox nodes
Configuration Steps
1. Edit systemd login configuration
Open the login configuration file:
nano /etc/systemd/logind.conf2. Modify lid switch behavior
Find the line:
HandleLidSwitch=suspendChange it to:
HandleLidSwitch=ignore3. Restart the service
Apply the changes by restarting systemd-logind:
systemctl restart systemd-logind4. Verify the configuration
Check that the service is running properly:
systemctl status systemd-logindWhy 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 closedsuspend- Suspend the system (default)hibernate- Hibernate the systempoweroff- Power off the systemlock- Lock the session
For Proxmox nodes, ignore is the recommended setting.