Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts
Found the internet!
r/linuxquestions
r/linuxquestions
5
Posted byu/[deleted]5 months ago

After desktop updates: "A system restart is required" - why?

It feels like windows all over again, frequent updates which need a computer restart. As I hibernate a lot because of long dev project lengths it really is a PITA.

Why do I need to restart and can I get away with not restarting? Will that prevent future updates from being successful until I restart?

64 comments
59% Upvoted
level 1

Generally speaking, the only time you need to reboot is when you have a kernel update. That being said, depending on the update/service/etc… it might be easier to just reboot than restart the service if it has interconnected dependencies

31
level 1
· 5 mo. ago · edited 5 mo. ago

If you can determine what components need restarting, you might be able to get away with only restarting those components. If those components haven't been restarted, they may keep working, or they may fail in unusual ways.

For example, if data files used by a particular running service have changed, that service may not be able to work with the new data files. The service may need to be restarted so that the newer version of the service is running instead.

The problem becomes extra thorny when multiple interacting components are involved, since simply restarting the components that were updated may not be sufficient.

I don't know what specific thing on your system gave you that message, so I cannot say how much it has actually checked to see whether the message is warranted. But generally speaking, rebooting after a package update is the safest and cleanest way to ensure everything is working.

15
level 2

Firefox for example, either refuse to do anything unless you restart it, or straight out crashes after an update.

It also means that some updates like kernel or systemd won't be effective before a reboot is done, but since one can't really know for sure what needs restarting, the best thing is to restart the entire system.

But of course, if it's inconvenient to install updates at this time, one simply ignores it and install them later. Because unlike Windows, Linux doesn't forfully reboot the computer in the midle of a work session to install updates. Finish your work, and then update. Just because updates are available every day doesn't mean one actually has to install them every day, I update it maybe 2-3 times a month -if it suits my workflow.

7
level 2

I often wonder how well dbus client applications are designed to handle their dbus service instances disappearing. I expect a lot of those would restart and lose their broker client ID, invalidating a bunch of connection contexts (or potentially not, but it's likely much safer if they do).

1
level 1

After desktop updates: "A system restart is required" - why?

If a kernel, or certain kernel drivers, are replaced, than a reboot is required, because the kernel cannot be reloaded while it's in use.

7
level 2

kexec

also i have not encountered problems with not using the newer kernel until the next normal reboot.

3
level 1

Windows make you go through chains of reboots.

Linux reboots once

18
level 2

Windows also reboots for your when you're in the middle of stuff, with Linux I just turn my PC of at the end of the day as normal.

5
level 2

Colleague at work the other day: "How long do you think the DB server reboot will take?"

Me: "If it was one of the Linux+PostGres boxes, approximately 5 minutes. This is one of the Windows+MS-SQL boxes... so... could be 15 minutes, could be 5 fucking years, who knows?"

Colleague: "Fuck... true..."

Me: "I keep telling you that although it feels wrong, you can install MS-SQL on Linux..."

2
level 2

I've personally only had that right after I've installed windows. After that, the updates only require a restart sometimes (similar to how fedora manages it).

Edit: Though I've never had fedora force me to restart.

1
level 1

Why do I need to restart and can I get away with not restarting?

It's usually one of two things (a) kernel update or (b) long-running daemon is still operating with the old/deleted version of a file.

For (a) you will need to reboot to load the new kernel, and if it's a security update, and you have a high risk profile, that could be very important.

For (b) you can usually just restart the daemon, though restarting sddm (e.g.) does require ending your X / Wayland session and starting a new one.

Will that prevent future updates from being successful until I restart?

Most likely, no. Though it depends on how well your distribution manages upgrades.

As an example of it not working, (which might have the details wrong), the etch kernel was the last of the 2.4 line and didn't have all the syscalls required for some of the services in lenny [they required a 2.6 kernel]. If you weren't currently running the "etch-and-a-half" kernel and you attempted to upgrade to lenny, not all the services would restart.

i've also had more isolated breakage come down during development. I'm often running the testing/Sid version of KDE, and sometimes the PIM components will get upgraded. If I then restart an akonadi client without restarting the akonadi server, it will connect, but encounter problems because the client module and the server modules don't "match".

But, generally, especially if you are on a stable release, a restart of the kernel or other services can be delayed as long as you are comfortable with, because all the inter-process communication (ABIs, APIs, DBUS messages, etc.) is still compatible. You won't benefit from fixes (e.g. have the same exposed security attack vectors) until you restart the affected services / kernel, though, but you can make those risk assessments on your own, if you wish.

5
level 2

It's usually one of two things (a) kernel update or (b) long-running daemon

There's a third thing. The Gnome Software Store stages a reboot for any update. It's just (unnecessary) policy. I suppose the reason is that it eliminates the need to determine if a reboot is actually needed. For example, if it is updating an editor or browser, I update manually (using apt) and restart the updated program if it is already running. If it's a kernel, part of Gnome internals or something that looks like an important system library, I'll update manually and then reboot.

3
level 1
· 5 mo. ago · edited 5 mo. ago

Why not just update less frequently? Disable the automatic updates even(if that's what you're talking about)?

EDIT: Also, you could leave auto-updates on and disable those notifications. You might not even notice a restart is 'required' then. Or you could also change the frequency the auto-update checks for updates.

About everything can be changed how you want it in Linux. There's always updates with Linux. It's really up to you how you approach them. The likelihood of being the target of a freshly patched vulnerability after even a month's time is pretty low. So do what you want to do.

6
level 1

I would make the distinction between the operating system forcing a restart (or several), and an update needing a restart to take effect. Even updating the kernel doesn’t usually require a restart unless you want the update to come into effect. You can often do the updates and just keep using your system happily without booting. That just means some updates wont be applied right away. Doing multiple rounds of updates without booting can potentially cause problems if they touch the same parts of the system. Some (linux based) OS or DE might tell you to restart just to avoid hiccups or make sure security patches are applied right away etc. I personally haven’t heard of a linux system that actually forces you to restart (they might exist of course)

3
level 2

Indeed, I just don't install anything new before a restart.

2
level 1

Restarts are usually needed for switching to a newly installed Kernel. Conversely, it means you can continue to use your system until you're ready to reboot.

You can try saving your session. I don't understand the relevance of hibernating a lot because of 'long dev project lengths' because I never did a job that can't save data and survive a restart.

3
level 1

Which distro?

3
level 2
[deleted]
· 5 mo. ago

ubuntu

1