Debian 12 The system will suspend now!

By | January 8, 2024

You have just installed Debian 12. However SSH session receive this unexpected message:

Broadcast message from Debian-gdm@en-03 on tty1 (Mon 2024-01-08 09:34:01 SAST):

The system will suspend now!

The solution: This method works better to prevent SSH disconnecting from client side.

Create /etc/systemd/sleep.conf.d/nosuspend.conf as follows:

root@en-03:~# mkdir -p /etc/systemd/sleep.conf.d/

root@en-03:~# vi /etc/systemd/sleep.conf.d/nosuspend.conf

[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no

:wq