
Background:
- Server: Proxmox server running on a ThinkPad X230 laptop.
- Configuration: Headless setup, with the laptop lid always closed.
Problem:
- Initially, closing the laptop lid sent the laptop into standby mode.
Solution:
- Edit the Proxmox/Debian system settings to ignore the laptop lid action.
Steps:
Open the Configuration File:
- Access the terminal on your Proxmox server.
- Open the
/etc/systemd/logind.conffile using thenanotext editor:nano /etc/systemd/logind.conf - This command opens the
logind.conffile, where system behavior related to user logins and power management is defined.
Modify the Configuration:
- In the
nanoeditor, look for the following lines:#HandleLidSwitch=... #HandleLidSwitchDocked=... - Remove the
#at the beginning of each line to uncomment them. - Change the settings as follows to ensure the system ignores the laptop lid action:
HandleLidSwitch=ignore HandleLidSwitchDocked=ignore - These changes tell the system to ignore the lid switch both in normal and docked modes.
- In the
Save and Exit:
- After making these changes, save the file in
nanoby pressingCtrl + O, then hitEnter. - Exit
nanoby pressingCtrl + X.
- After making these changes, save the file in
Restart the
systemd-logindService:- Apply the changes by restarting the
systemd-logindservice. Execute the following command in the terminal:systemctl restart systemd-logind.service - This command restarts the login service, applying your configuration changes.
- Apply the changes by restarting the
Result:
- Your Proxmox server should now ignore any actions related to closing the laptop lid, keeping the server active even when the lid is closed.
Note:
- Ensure you have administrative privileges to make these changes.
- It's always good practice to back up important configuration files before making modifications.
Feel free to follow these steps to configure your Proxmox server to ignore the laptop lid action.
Adam Malin
You can find me on Twitter or on Nostr at
npub15jnttpymeytm80hatjqcvhhqhzrhx6gxp8pq0wn93rhnu8s9h9dsha32lxYou can view and write comments on this or any other post by using the Satcom browser extention.
value4value Did you find any value from this article? Click here to send me a tip!