Proxmox on a Laptop: Ignore the Lid Switch
How to stop a Proxmox host on a laptop from suspending when the lid is closed.
424 Words … ⏲ Reading Time: 1 Minute, 55 Seconds
2026-08-05 22:00 +0000
Proxmox on a Laptop: Ignore the Lid Switch
I run Proxmox on one of my old Laptops. It is not elegant, but it is good enough for a small homelab box: built-in screen, built-in keyboard, built-in UPS if the battery is still usable. Sehr praktisch, until you close the lid and the whole server disappears from the network.
Of course this is not a Proxmox or even a networking problem. The host was doing what a laptop normally does. systemd saw the lid switch event and suspended the machine.
If you are running Proxmox on laptop hardware and the host becomes unreachable every time you close the lid, check systemd-logind.
The fix
On the Proxmox host, edit /etc/systemd/logind.conf with nano /etc/systemd/logind.conf.
Set (uncomment and change, probably) or add these lines:
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
LidSwitchIgnoreInhibited=no
Then restart systemd-logind with systemctl restart systemd-logind.
If you prefer the “I don’t care” path, reboot the host instead.
What the settings do
HandleLidSwitch=ignore: ignores lid close events when the laptop is on battery.HandleLidSwitchExternalPower=ignore: ignores lid close events when external power is connected.HandleLidSwitchDocked=ignore: ignores lid close events when systemd considers the machine docked.LidSwitchIgnoreInhibited=no: keeps inhibitor handling explicit instead of letting logind ignore lid switch inhibitors.
The important part is that every lid state you care about resolves to ignore. Laptop hardware can land in different states depending on AC power, docking detection and attached displays, so setting all three lid actions avoids the “it worked yesterday, but not when I moved the cable” version of the problem.
Optional: turn off the built-in screen
Ignoring the lid switch keeps the host alive, but the laptop screen may still stay on behind the closed lid.
To blank the local console after 60 seconds, edit /etc/default/grub with nano /etc/default/grub.
Change this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
to this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet consoleblank=60"
Then apply the GRUB config with update-grub.
consoleblank=60 means the local Linux console blanks after 60 seconds. Use consoleblank=5 if you want it almost immediately or consoleblank=300 if five minutes is enough. This takes effect after the next boot.
Cooling still matters
One practical warning: make sure the laptop can still cool itself with the lid closed.
Some laptop models exhaust through the keyboard area or depend on the open lid for sane airflow. If the machine starts throttling or the fan goes mad after a few minutes, the config is not the problem anymore. Leave the lid slightly open, put the laptop on a stand, clean the vents or just stop using that chassis as a closed server…
