I've been having problems with my Ubuntu machine suddenly rebooting without any warning. To my knowledge Ubuntu Desktop is not supposed to reboot without warning by default.
I believe this is being triggered by unattended-upgrades
Reviewing the syslog the one pattern that emerges is that the reboot happens right after unattended-upgrades completes successfully:
There are multiple examples in my syslog, but all show "unattended-upgrades.service: Succeeded." the same second everything begins to shut down, with nothing for a minute or two prior.
Jul 15 11:17:01 pc systemd[2065]: Starting Notification regarding a new release of Ubuntu...
Jul 15 11:17:14 pc charon: 08[IKE] sending keep alive to 10.10.10.10[4500]
Jul 15 11:17:22 pc check-new-release-gtk[71843]: /usr/lib/ubuntu-release-upgrader/check-new-release-gtk:30: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk'
, '3.0') before import to ensure that the right version gets loaded.
Jul 15 11:17:22 pc check-new-release-gtk[71843]: from gi.repository import Gtk
Jul 15 11:17:22 pc check-new-release-gtk[71843]: WARNING:root:timeout reached, exiting
Jul 15 11:17:22 pc systemd[2065]: update-notifier-release.service: Succeeded.
Jul 15 11:17:22 pc systemd[2065]: Finished Notification regarding a new release of Ubuntu.
Jul 15 11:17:48 pc mysql-workbench[33350]: gtk_tree_view_unref_tree_helper: assertion 'node != NULL' failed
Jul 15 11:17:54 pc charon: 09[IKE] sending keep alive to 10.10.10.10[4500]
Jul 15 11:18:03 pc systemd[1]: unattended-upgrades.service: Succeeded.
Jul 15 11:18:03 pc systemd[1]: Stopping Session 3 of user philip.
Jul 15 11:18:03 pc systemd[1]: Removed slice system-clean\x2dmount\x2dpoint.slice.
Jul 15 11:18:03 pc systemd[1]: Removed slice system-getty.slice.
Jul 15 11:18:03 pc systemd[1]: Removed slice system-modprobe.slice.
Jul 15 11:18:03 pc systemd[1]: Stopped target Block Device Preparation for /dev/mapper/ubuntu.
Jul 15 11:18:03 pc systemd[2065]: Stopped target GNOME Wayland Session (session: gnome).
From memory I've never edited the contents of /etc/apt/apt.conf.d/ and the configuration for unattended upgrades claims to be default (NOT to reboot):
$ grep -irnC4 reboot /etc/apt/apt.conf.d/
/etc/apt/apt.conf.d/50unattended-upgrades-88-// Do automatic removal of unused packages after the upgrade
/etc/apt/apt.conf.d/50unattended-upgrades-89-// (equivalent to apt-get autoremove)
/etc/apt/apt.conf.d/50unattended-upgrades-90-//Unattended-Upgrade::Remove-Unused-Dependencies "false";
/etc/apt/apt.conf.d/50unattended-upgrades-91-
/etc/apt/apt.conf.d/50unattended-upgrades:92:// Automatically reboot *WITHOUT CONFIRMATION* if
/etc/apt/apt.conf.d/50unattended-upgrades:93:// the file /var/run/reboot-required is found after the upgrade
/etc/apt/apt.conf.d/50unattended-upgrades:94://Unattended-Upgrade::Automatic-Reboot "false";
/etc/apt/apt.conf.d/50unattended-upgrades-95-
/etc/apt/apt.conf.d/50unattended-upgrades:96:// Automatically reboot even if there are users currently logged in
/etc/apt/apt.conf.d/50unattended-upgrades:97:// when Unattended-Upgrade::Automatic-Reboot is set to true
/etc/apt/apt.conf.d/50unattended-upgrades:98://Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
/etc/apt/apt.conf.d/50unattended-upgrades-99-
/etc/apt/apt.conf.d/50unattended-upgrades:100:// If automatic reboot is enabled and needed, reboot at the specific
/etc/apt/apt.conf.d/50unattended-upgrades-101-// time instead of immediately
/etc/apt/apt.conf.d/50unattended-upgrades-102-// Default: "now"
/etc/apt/apt.conf.d/50unattended-upgrades:103://Unattended-Upgrade::Automatic-Reboot-Time "02:00";
/etc/apt/apt.conf.d/50unattended-upgrades-104-
/etc/apt/apt.conf.d/50unattended-upgrades-105-// Use apt bandwidth limit feature, this example limits the download
/etc/apt/apt.conf.d/50unattended-upgrades-106-// speed to 70kb/sec
/etc/apt/apt.conf.d/50unattended-upgrades-107-//Acquire::http::Dl-Limit "70";
I've been having problems with my Ubuntu machine suddenly rebooting without any warning. To my knowledge Ubuntu Desktop is not supposed to reboot without warning by default.
I believe this is being triggered by unattended-upgrades
unattended-upgrades 2.3 (amd64)
Ubuntu Desktop:
Description: Ubuntu 20.04 LTS
Release: 20.04
Reviewing the syslog the one pattern that emerges is that the reboot happens right after unattended-upgrades completes successfully:
There are multiple examples in my syslog, but all show "unattended- upgrades. service: Succeeded." the same second everything begins to shut down, with nothing for a minute or two prior.
Jul 15 11:17:01 pc systemd[2065]: Starting Notification regarding a new release of Ubuntu... release- gtk[71843] : /usr/lib/ ubuntu- release- upgrader/ check-new- release- gtk:30: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_ version( 'Gtk' release- gtk[71843] : from gi.repository import Gtk release- gtk[71843] : WARNING: root:timeout reached, exiting notifier- release. service: Succeeded. [33350] : gtk_tree_ view_unref_ tree_helper: assertion 'node != NULL' failed upgrades. service: Succeeded. clean\x2dmount\ x2dpoint. slice. modprobe. slice.
Jul 15 11:17:14 pc charon: 08[IKE] sending keep alive to 10.10.10.10[4500]
Jul 15 11:17:22 pc check-new-
, '3.0') before import to ensure that the right version gets loaded.
Jul 15 11:17:22 pc check-new-
Jul 15 11:17:22 pc check-new-
Jul 15 11:17:22 pc systemd[2065]: update-
Jul 15 11:17:22 pc systemd[2065]: Finished Notification regarding a new release of Ubuntu.
Jul 15 11:17:48 pc mysql-workbench
Jul 15 11:17:54 pc charon: 09[IKE] sending keep alive to 10.10.10.10[4500]
Jul 15 11:18:03 pc systemd[1]: unattended-
Jul 15 11:18:03 pc systemd[1]: Stopping Session 3 of user philip.
Jul 15 11:18:03 pc systemd[1]: Removed slice system-
Jul 15 11:18:03 pc systemd[1]: Removed slice system-getty.slice.
Jul 15 11:18:03 pc systemd[1]: Removed slice system-
Jul 15 11:18:03 pc systemd[1]: Stopped target Block Device Preparation for /dev/mapper/ubuntu.
Jul 15 11:18:03 pc systemd[2065]: Stopped target GNOME Wayland Session (session: gnome).
From memory I've never edited the contents of /etc/apt/ apt.conf. d/ and the configuration for unattended upgrades claims to be default (NOT to reboot):
$ grep -irnC4 reboot /etc/apt/ apt.conf. d/ apt.conf. d/50unattended- upgrades- 88-// Do automatic removal of unused packages after the upgrade apt.conf. d/50unattended- upgrades- 89-// (equivalent to apt-get autoremove) apt.conf. d/50unattended- upgrades- 90-//Unattended -Upgrade: :Remove- Unused- Dependencies "false"; apt.conf. d/50unattended- upgrades- 91- apt.conf. d/50unattended- upgrades: 92:// Automatically reboot *WITHOUT CONFIRMATION* if apt.conf. d/50unattended- upgrades: 93:// the file /var/run/ reboot- required is found after the upgrade apt.conf. d/50unattended- upgrades: 94://Unattended -Upgrade: :Automatic- Reboot "false"; apt.conf. d/50unattended- upgrades- 95- apt.conf. d/50unattended- upgrades: 96:// Automatically reboot even if there are users currently logged in apt.conf. d/50unattended- upgrades: 97:// when Unattended- Upgrade: :Automatic- Reboot is set to true apt.conf. d/50unattended- upgrades: 98://Unattended -Upgrade: :Automatic- Reboot- WithUsers "true"; apt.conf. d/50unattended- upgrades- 99- apt.conf. d/50unattended- upgrades: 100:// If automatic reboot is enabled and needed, reboot at the specific apt.conf. d/50unattended- upgrades- 101-// time instead of immediately apt.conf. d/50unattended- upgrades- 102-// Default: "now" apt.conf. d/50unattended- upgrades: 103://Unattende d-Upgrade: :Automatic- Reboot- Time "02:00"; apt.conf. d/50unattended- upgrades- 104- apt.conf. d/50unattended- upgrades- 105-// Use apt bandwidth limit feature, this example limits the download apt.conf. d/50unattended- upgrades- 106-// speed to 70kb/sec apt.conf. d/50unattended- upgrades- 107-//Acquire: :http:: Dl-Limit "70";
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
journalctl -u unattended-upgrades
Jul 10 07:52:31 LEVELISE-PC systemd[1]: Started Unattended Upgrades Shutdown. upgrades. service: Succeeded. upgrades. service: Succeeded.
Jul 14 10:03:03 LEVELISE-PC systemd[1]: unattended-
-- Reboot --
Jul 14 10:04:11 LEVELISE-PC systemd[1]: Started Unattended Upgrades Shutdown.
Jul 15 11:18:03 LEVELISE-PC systemd[1]: unattended-
-- Reboot --
Jul 15 11:19:10 LEVELISE-PC systemd[1]: Started Unattended Upgrades Shutdown.
It's not clear to me what other information I can offer to help.