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.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 closedsuspend
- Suspend the system (default)hibernate
- Hibernate the systempoweroff
- Power off the systemlock
- Lock the session
For Proxmox nodes, ignore
is the recommended setting.