A few times over the past few weeks I've been working and suddenly my desktop disappears and my machine completely reboots.
Having had it happen again this morning I've traced through the syslog and the closest event I can find that might be associated is unattended-upgrades.service: Succeeded:
Jul 14 10:02:42 pc charon: 05[NET] sending packet: from 192.168.1.214[4500] to 123.321.123.321[4500] (92 bytes)
Jul 14 10:03:02 pc charon: 08[IKE] sending keep alive to 123.321.123.321[4500]
Jul 14 10:03:03 pc systemd[1]: unattended-upgrades.service: Succeeded.
Jul 14 10:03:03 pc systemd[1]: Stopping Session 2 of user philip.
Jul 14 10:03:03 pc systemd[1]: Removed slice system-clean\x2dmount\x2dpoint.slice.
Jul 14 10:03:03 pc systemd[1]: Removed slice system-getty.slice.
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Wayland Session (session: gnome).
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Session.
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Wayland Session.
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Session (session: gnome).
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Accessibility settings.
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Color management.
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Date & Time handling.
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Maintenance of expirable data.
I'm not against unattended upgrades normally, but a silent reboot without warning is really bad. This morning I had 15 windows open and was in the middle of debugging some tricky code. It's taken me 30 minutes to get back to where I was.
Is a silent reboot with unattended upgrades something that's normal / configurable?
What's the recommended way to stop this reboot happening?
The strange thing is this doesn't appear to be configured to do so:
$ grep -irnC2 reboot /etc/apt/apt.conf.d/
/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