I am running an old Dell Laptop as a server with Debian 10 on it. Installing Debian on the system was straight forward, but at a certain point you want to close the lid of the laptop. This puts your laptop in sleep, which for a server is not the intended result.

Disable Sleep on Lid Close

Debians Suspend Wiki page had the right solution for this

  1. Mask the targets using systemctl
    • sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
  2. Edit /etc/systemd/logind.conf and change the accodring values
    • HandleLidSwitch=ignore
    • HandleLidSwitchDocked=ignore
  3. Afterwards just reboot

Switch Off Backlit

Sadly, the backlit of the display is not switching off, which leads to a broken display after a while and consumes additional energy. The simplest way to fix the issue was to change the consoleblank setting at boot. This did not need any additional packages like ACPI or any extra user scripts at startup.

Verify the value used at the moment with cat /sys/module/kernel/parameters/consoleblank. The value is in seconds. The easiest way to add the parameter at boot is using the kernel command-line.

  1. Open /etc/default/grub
  2. Add consoleblank=600 to the GRUB_CMDLINE_LINUX_DEFAULT= which sets the timeout to 10 minutes (600 seconds).
    • GRUB_CMDLINE_LINUX_DEFAULT="quiet consoleblank=0"
  3. Run sudo update-grub, and reboot.


Previous Post Next Post