Added suspend-then-hibernate functionality

Signed-off-by: Marko Korhonen <marko.korhonen@reekynet.com>
This commit is contained in:
Marko Korhonen 2019-10-30 17:40:35 +02:00
parent 85041a9f92
commit 69698119fe
No known key found for this signature in database
GPG Key ID: 911B85FBC6003FE5
3 changed files with 12 additions and 35 deletions

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,5 @@
[Sleep]
AllowSuspendThenHibernate=yes
SuspendMode=suspend
SuspendState=disk
HibernateDelaySec=60min