diff --git a/config-root.yaml b/config-root.yaml index 2656dfd..9b8fcd5 100644 --- a/config-root.yaml +++ b/config-root.yaml @@ -98,6 +98,9 @@ dotfiles: f_99-lowbat.rules: src: etc/udev/rules.d/99-lowbat.rules dst: /etc/udev/rules.d/99-lowbat.rules + f_sleep.conf: + src: etc/systemd/sleep.conf + dst: /etc/systemd/sleep.conf profiles: locale: dotfiles: @@ -133,6 +136,7 @@ profiles: - f_rc-manager.conf - f_99-conbee-usb-serial.rules - f_99-lowbat.rules + - f_sleep.conf include: - locale - pacman diff --git a/root/etc/systemd/logind.conf b/root/etc/systemd/logind.conf index 1806eff..2c12aa9 100644 --- a/root/etc/systemd/logind.conf +++ b/root/etc/systemd/logind.conf @@ -1,37 +1,5 @@ -# 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=no -#KillOnlyUsers= -#KillExcludeUsers=root -#InhibitDelayMaxSec=5 -HandlePowerKey=suspend -#HandleSuspendKey=suspend -#HandleHibernateKey=hibernate -HandleLidSwitch=suspend -HandleLidSwitchExternalPower=suspend +HandlePowerKey=suspend-then-hibernate +HandleLidSwitch=suspend-then-hibernate +HandleLidSwitchExternalPower=suspend-then-hibernate HandleLidSwitchDocked=ignore -#PowerKeyIgnoreInhibited=no -#SuspendKeyIgnoreInhibited=no -#HibernateKeyIgnoreInhibited=no -#LidSwitchIgnoreInhibited=yes -#HoldoffTimeoutSec=30s -#IdleAction=ignore -#IdleActionSec=30min -#RuntimeDirectorySize=10% -#RemoveIPC=yes -#InhibitorsMax=8192 -#SessionsMax=8192 diff --git a/root/etc/systemd/sleep.conf b/root/etc/systemd/sleep.conf new file mode 100644 index 0000000..c452658 --- /dev/null +++ b/root/etc/systemd/sleep.conf @@ -0,0 +1,5 @@ +[Sleep] +AllowSuspendThenHibernate=yes +SuspendMode=suspend +SuspendState=disk +HibernateDelaySec=60min