From c515dd19f2b122960b49dd78f743a1d934d2b70a Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 17 Dec 2020 16:29:45 +0100 Subject: [PATCH] Don't suspend Home Assistant OS on closed lids (#1093) (#1100) Old Laptops are a popular choice to run Home Assistant: They have low power consumption, are relatively fast and cheap to come by. However, closing their lid by default puts a Linux system into suspend. This is not what the typical user of Home Assistant OS wants. Ignore lid activity in any state by default. --- .../rootfs-overlay/etc/systemd/logind.conf | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 buildroot-external/rootfs-overlay/etc/systemd/logind.conf diff --git a/buildroot-external/rootfs-overlay/etc/systemd/logind.conf b/buildroot-external/rootfs-overlay/etc/systemd/logind.conf new file mode 100644 index 000000000..0a13ffd21 --- /dev/null +++ b/buildroot-external/rootfs-overlay/etc/systemd/logind.conf @@ -0,0 +1,38 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# Entries in this file show the compile time defaults. +# You can change settings by editing this file. +# Defaults can be restored by simply deleting this file. +# +# See logind.conf(5) for details. + +[Login] +#NAutoVTs=6 +#ReserveVT=6 +#KillUserProcesses=yes +#KillOnlyUsers= +#KillExcludeUsers=root +#InhibitDelayMaxSec=5 +#HandlePowerKey=poweroff +#HandleSuspendKey=suspend +#HandleHibernateKey=hibernate +HandleLidSwitch=ignore +HandleLidSwitchExternalPower=ignore +HandleLidSwitchDocked=ignore +#PowerKeyIgnoreInhibited=no +#SuspendKeyIgnoreInhibited=no +#HibernateKeyIgnoreInhibited=no +#LidSwitchIgnoreInhibited=yes +#HoldoffTimeoutSec=30s +#IdleAction=ignore +#IdleActionSec=30min +#RuntimeDirectorySize=10% +#RuntimeDirectoryInodes=400k +#RemoveIPC=yes +#InhibitorsMax=8192 +#SessionsMax=8192