Suggestion: garuda-update should prompt for restart

garuda-update should highly suggest a restart after it updates system packages. I often see people commenting on users' garuda-inxi showing how they have updated but haven't restarted yet (indicated by the circle arrow emoji). Well, to be fair, they didn't get prompted to do so. Adding this would prevent many support inquiries.


Honestly, there are not real reasons for restarting except some kernel upgrades where you may need to load new modules. It isn't Windows where you need to reboot after each update.


I think this is a good suggestion. Not a reminder after every update--that would be pointless and annoying--but if there was a brief message when it would be immediately useful (such as after a kernel upgrade, as @edu4rdshl points out) I think we have a lot of users that would be well-served by a feature like that.

The last time I used zypper, they had a really well-done implementation of a feature like this. They plainly tell you when a reboot is needed after an update, and if there are specific programs or services that need to be restarted (but a full reboot is not needed) they list them out for you.

They explain this feature a little bit here: What updates require a reboot ? | Support | SUSE

zypper does try to notice prior the updates applied that this updates do require a reboot. Following message will be printed prior confirming updates to be applied

The following packages require system reboot

Depending on the zypper version, after the upgrade there is a message.

Since the last system boot core libraries or services have been updated. Reboot is suggested to ensure that your system benefits from these updates.

In both cases a reboot is needed. If the updates do only affect any running program following message is printed after update

There are running programs which still use files and libraries deleted or updated by recent upgrades. They should be restarted to benefit from the latest updates. Run 'zypper ps -s' to list these programs.


I concur it may be nice to have.
Perhaps we can take inspiration from jutil/rbc at master · qth/jutil · GitHub and/or check for any open files in system folders that were changed/deleted on disk? I may have a crack at it.
On a side note, I just found out about GitHub - openSUSE/transactional-update: Atomic updates for Linux operating systems.

An interesting question is also, are there times when a reboot may cause problems?
I noticed a few background jobs start running after an upgrade.
There is likely no need to do so, but I generally let them finish before restarting.

As a quick and dirty reminder, some time ago I put a little script on my waybar power button to turn it red while upgrading and green if last upgrade is more recent then last reboot (using the same logic found in the garuda-inxi script, but that would have me reboot every time even if not strictly necessary). It works by wrapping garuda-update to send it a signal before and after the upgrade.
Far from being perfect, but at least I won't reboot again while a kernel upgrade is running in another workspace LOL.

edit: found more info, testing.
file /boot/vmlinuz* |grep -Po 'version \K\S+' vs uname -r
date -r /boot +%s
lsof -n |grep '(path inode=.*)' (lsof -wLnPlXbO +c0 |awk '$4 == "DEL" && ...)
possibly other checks, ideas welcome.

Found GitHub - liske/needrestart: Restart daemons after library updates.
Still having fun reinventing the wheel.

Found time to play with this again. Script is here.


I don't think it's a good idea to tell users to be rebooting when its system is just working fine. IMO, just an alert at then end of the update like "if you start experiencing issues after this update, try to reboot your system before reporting it" would be sufficient.


TL;DR the discussion

It is Garuda update, not windows update in the first place XD

Kidding apart, we simply assume that if the user is facing any issue, the first step he / she will perform is restart. And most of them do. Those who don't will learn. It is just a basic etiquette, and we don't want our users to be remembered even that.

Just a personal opinion. It is simply that I don't like the idea of prompting to restart. Other team members might like the idea and may also want to implement it.