I have an Ubuntu server instance that enters sleep mode from time to time (on average every two months). By looking in the syslog file, I see that it is the networkManager that requests to put the host to sleep.
Here is the log entry:
Aug 24 11:33:28 home dbus-daemon[1108]: [session uid=108 pid=1108] Activating service name='org.freedesktop.Notifications' requested by ':1.12' (uid=108 pid=1145 comm="/usr/lib/unity-settings-daemon/unity-settings-daem" label="unconfined")
Aug 24 11:33:29 home org.freedesktop.Notifications[1108]: Unable to init server: Impossible de se connecter : Connexion refusée
Aug 24 11:33:29 home notify-osd[19718]: cannot open display:
Aug 24 11:33:29 home dbus-daemon[1108]: [session uid=108 pid=1108] Activated service 'org.freedesktop.Notifications' failed: Process org.freedesktop.Notifications exited with status 1
Aug 24 11:33:29 home dbus-daemon[1108]: [session uid=108 pid=1108] Activating service name='org.freedesktop.Notifications' requested by ':1.12' (uid=108 pid=1145 comm="/usr/lib/unity-settings-daemon/unity-settings-daem" label="unconfined")
Aug 24 11:33:29 home NetworkManager[880]: <info> [1598261609.2373] manager: sleep: sleep requested (sleeping: no enabled: yes)
Aug 24 11:33:29 home NetworkManager[880]: <info> [1598261609.2382] manager: NetworkManager state is now ASLEEP
Aug 24 11:33:29 home whoopsie[21081]: [11:33:29] offline
Aug 24 11:33:29 home org.freedesktop.Notifications[1108]: Unable to init server: Impossible de se connecter : Connexion refusée
Aug 24 11:33:29 home notify-osd[19725]: cannot open display:
Aug 24 11:33:29 home dbus-daemon[1108]: [session uid=108 pid=1108] Activated service 'org.freedesktop.Notifications' failed: Process org.freedesktop.Notifications exited with status 1
Aug 24 11:33:29 home systemd[1]: Reached target Sleep.
Aug 24 11:33:29 home systemd[1]: Starting Suspend...
Aug 24 11:33:29 home kernel: [3268843.256198] PM: suspend entry (deep)
Aug 24 11:33:29 home systemd-sleep[19726]: Suspending system...
What is causing this ? Is this the consequence of a network problem or a configuration issue ?
EDIT: here is some additional info requested in the comment
$ sudo systemctl status suspend.target
[sudo] Mot de passe de meessen :
● suspend.target - Suspend
Loaded: loaded (/lib/systemd/system/suspend.target; static; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd.special(7)
sudo systemctl status suspend.target
?