//nbkelley /homelab

Linux Server Optimization

Linux Server Optimization#

What Was Established#

Optimizations for headless Ubuntu servers (specifically HP Pavilion and Thinkpad T480) to prevent sleep/suspend when the lid is closed.

Key Decisions#

Modify systemd-logind to ignore lid switch events to ensure the server remains active when the laptop lid is closed.

Current Configuration#

Prevent Sleep on Lid Close#

Edit /etc/systemd/logind.conf:

sudo nano /etc/systemd/logind.conf

Ensure the following lines are uncommented and set to ignore:

HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore

Apply the changes: