Disabling sleep and hibernate on systemd

From One-Eyed Man Wiki
Jump to navigation Jump to search

My work station was mysteriously freezing up, requiring a reboot each time. It turned out that the system was simply going to sleep, and that (for unknown reasons) keyboard and mouse input weren't waking it up.

I edited /etc/systemd/sleep.conf to disable the behavior completely:

root@tolt:/etc/systemd# cat sleep.conf 
#  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 systemd-sleep.conf(5) for details

[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no 
#SuspendMode=
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=180min

(Source: https://wiki.debian.org/Suspend)