26.04 Restart and Update

Restart and update current behavior makes no sense to me. I wonder if this is a bug or a feature?

It was just some deb packages and the system rebooted two times (for no apparent reason IMO.) The first reboot happens before updates are installed, the second after the install.

More details please so we know exactly what you were doing, or trying to do.
At the moment I don’t know what you mean.

4 Likes

Sorry for the delayed response.

Occasionally, an application appears—I’m not exactly sure which one, as this is not how I usually update my system, but it’s either GNOME Software, the App Store, or something related. In any case, it notifies users that updates are available. The only option to apply them is to click “Reboot and Update” (or similar). This happens even when no package actually requires a reboot.

What’s worse is that it can lead to two consecutive, unnecessary reboots.

I still use the terminal and apt to update my system, but the next time this prompt appears, I’ll go through with it to check whether it consistently results in two reboots. I can already confirm that it causes at least one reboot, which is often unnecessary.

Are you using Ubuntu Pro?

Check with pro status

I am making this reply from Ubuntu 26.04 development version. Yes, it is still the development version as far as I can tell.

The utility that you are seeing can only be Software Updater. In my experience it has never required a reboot to update. It will .suggest a reboot if the update contains a new Linux kernel. In that case we are informed that to use the new Linux kernel we must reboot. We are offered the option to reboot now or later. This is after the update has taken place

Things are slightly different when we use the development version. Software Updater will offer to do a Partial Upgrade or to Continue. We never accept the partial upgrade because it will solve package conflicts by removing packages. That can break the operating system. I have experienced the operating system being broken by clicking Partial Upgrade.

Normally, when we click continue the usual Software Updater dialog appears and runs the update. But things are different on my install of 26.04 development version. I click Continue - nothing happens. I click Continue again and the utility blinks out of existence. It is still doing it now.

I update/upgrade using the terminal.

So, I have a different experience of 26.04 to the person who opened this topic. There are changes to the way things are done in Ubuntu in 26.04.

The App Center manages the refresh of snap packages. It now lists Debian packages and it can uninstall them. I have yet to see if it will offer the install of Debian packages. So far, it does not update/upgrade Debian packagers. May be it will one day.

Regards

P.S. The App Center in 26.04 does install Debian packages. That will please a lot of people.

How do you know a reboot is not required? Just because there may not be a kernel update doesn’t mean the easiest way to get all of userspace to migrate to the upgraded versions of libs isn’t a reboot.

`needrestart`
$ sudo needrestart -u NeedRestart::UI::stdio
Scanning processes...
Scanning candidates...
Scanning processor microcode...
Scanning linux images...

Pending kernel upgrade!

Running kernel version:
  6.17.0-19-generic

Diagnostics:
  The currently running kernel version is not the expected kernel version 6.17.0-20-generic.

Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting. [Return]


The processor microcode seems to be up-to-date.

Restarting services...
Services to be restarted:
Restart «NetworkManager.service»? [yNas?] y
Restart «systemd-logind.service»? [yNas?]
Restart «wpa_supplicant.service»? [yNas?] y
 systemctl restart NetworkManager.service wpa_supplicant.service
Service restarts being deferred:
 systemctl restart systemd-logind.service

No containers need to be restarted.

User sessions running outdated binaries:
 peter @ session #36: login[3703595]
 peter @ user manager service: systemd[3703693], tmux: server[3704044], xargs[1100148,4088994], zsh[458835,4088812,4090396,4090607]

No VM guests are running outdated hypervisor (qemu) binaries on this host.

As it so happens, I am still deferring the required reboot for the latest HWE kernel in 24.04. But as you can see systemd-logind is also in the mix; restarting it will stop the user login session rather unceremoniously so one may as well reboot, or at least systemctl soft-reboot for a pure userspace reboot. And that’s just one example. Systemd itself is another, or udev.

Do keep in mind that Ubuntu’s demographic includes very non-technical folks, so just because you know how to get to a fully upgraded system state without an actual reboot, doesn’t mean the updater can be made to do the same in a user-friendly and robust way.

The double-reboot may be down to some security updates being brought in by unattended-upgrades, e.g. the kernel, then you do the reboot as suggested by the triggered notification, and after said reboot some other (non-security) upgrades come in that upgrade some vital system service or libs that are being kept open until all users have re-logged in, hence the next reboot suggestion, which may not even be required from a pure technical POV, but trying to avoid it just for uptime bragging rights should be left to those who actually know what they are doing.

Yes, although I think this happened before I have activated Ubuntu Pro on that machine, but it also happened on a laptop where I have immediately activated it. I hope I haven’t confused/forgotten anything. IIRC I have experienced the issue on both machines.