I have Ubuntu server 24.04 running on a desktop machine. It has a GUI installed (though I don't know if that is relevant). I am running this server as a headless machine at the moment, though until recently it was running with a monitor attached and everything was OK. Now, when I SSH to the machine it will shutdown after 15 minutes, even if I am doing something on it, or if I am doing a long download. I have edited /etc/systemd/logind.conf as follows:
IdleAction=ignore HandleSuspendKey=ignore HandleHibernateKey=ignore HandleLidSwitch=ignore HandleLidSwitchExternalPower=ignore HandleLidSwitchDocked=ignore Everything else is commented out. This is a Desktop machine so issues of lid closure are not relevant even though I have specified them (copied from another post). I have also run sudo systemctl restart systemd-logind, followed by a reboot. I can RDP to the GUI using Remmina, and the only power options available are to set Power Mode to 'Balanced' (the default), and I have set 'Screen Blank' to 'Never', though I would have thought this is not relevant.
In response to: gsettings list-recursively org.gnome.settings-daemon.plugins.power, I get the following:
org.gnome.settings-daemon.plugins.power ambient-enabled true org.gnome.settings-daemon.plugins.power idle-brightness 30 org.gnome.settings-daemon.plugins.power idle-dim true org.gnome.settings-daemon.plugins.power lid-close-ac-action 'suspend' org.gnome.settings-daemon.plugins.power lid-close-battery-action 'suspend' org.gnome.settings-daemon.plugins.power lid-close-suspend-with-external-monitor false org.gnome.settings-daemon.plugins.power power-button-action 'interactive' org.gnome.settings-daemon.plugins.power power-saver-profile-on-low-battery true org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 7200 org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing' org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 900 org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend' In response to: sudo journalctl -b -1 -ex, I get the following:
Aug 06 17:17:57 MERLIN systemd[1]: Reached target final.target - Late Shutdown Services. ░░ Subject: A start job for unit final.target has finished successfully ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ A start job for unit final.target has finished successfully. ░░ ░░ The job identifier is 7917. Aug 06 17:17:57 MERLIN systemd[1]: systemd-poweroff.service: Deactivated successfully. ░░ Subject: Unit succeeded ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ The unit systemd-poweroff.service has successfully entered the 'dead' state. Aug 06 17:17:57 MERLIN systemd[1]: Finished systemd-poweroff.service - System Power Off. ░░ Subject: A start job for unit systemd-poweroff.service has finished successfully ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ A start job for unit systemd-poweroff.service has finished successfully. ░░ ░░ The job identifier is 7916. Aug 06 17:17:57 MERLIN systemd[1]: Reached target poweroff.target - System Power Off. ░░ Subject: A start job for unit poweroff.target has finished successfully ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ A start job for unit poweroff.target has finished successfully. ░░ ░░ The job identifier is 7915. Aug 06 17:17:57 MERLIN systemd[1]: Shutting down. Aug 06 17:17:57 MERLIN systemd-shutdown[1]: Syncing filesystems and block devices. Aug 06 17:17:57 MERLIN systemd-shutdown[1]: Sending SIGTERM to remaining processes... Aug 06 17:17:57 MERLIN dnsmasq[2069]: exiting on receipt of SIGTERM Aug 06 17:17:57 MERLIN systemd-journald[428]: Journal stopped ░░ Subject: The journal has been stopped ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ The system journal process has shut down and closed all currently ░░ active journal files. As this is an area I know nothing about, it is saying to me 'I am shutting down', but it is not telling me why. Maybe someone can interpret differently?
Any suggestions, please. As I said, this all seemed to start when I went headless!
Regards, StuartM
gsettings list-recursively org.gnome.settings-daemon.plugins.power?sudo journalctl -b -1 -exwill show the system logs leading up to the crash/shutdown. You can look at other shutdowns by varying the-b -1option. If nothing stands out, suspect overheating or sudden power outage. Dosudo journalctl --list-boots. For morejournalctlhelp, see my StackExchange profile (click on my username).gsettingsandjournalctloutput nothing stands out as the cause. Thejournalctloutput looks the same as on my Ubuntu 24.04.2 LTS desktop where the previous Power Off was requested from the GUI, which implies a software commanded shutdown rather than a sudden power outage. The answers in How to find out from the logs what caused system shutdown? give more clues, but not yet sure which of answers will help.