Is it possible to avoid rebooting my machine after every nVidia driver update?
I’ve seen threads on stack overflow that you could possibly achieve that by reloading the kernel modules although after attempting that on manjaro I didn’t had any luck.
Has anyone had any similar experience in the past?
And to those thinking why not just reboot, because on a shared server you simply can’t just reboot whenever nVidia releases new drivers since people are working on deadlines and running experiments.
The modules versions are related to kernel version most of the times. Both need to be restarted after update. The kernel can be relaoded only with reboot. Old discussion about that from archived forum:
A mission critical server should not depend on such fragile thing as graphic drivers - especially nvidia. On Manjaro drivers are compiled to match specific kernels and you will only get problems if you take lightly the necessary reload of your system.
Not restarting your system after updating critical components - whether this is kernel, systemd or drivers - is asking for trouble.
Many kernel modules can indeed be reloaded, but this does not apply to graphics drivers. Once the driver has control of the graphics adapter, it won’t release it anymore.
Furthermore ─ as explained by the other posters on this thread ─ a graphics driver runs in the kernel’s address space and is therefore built to work with that specific kernel version only. Ergo, updating the kernel also includes updating the graphics driver and vice versa, and you should always reboot when there has been an update to either the kernel as a whole or to the graphics driver.
Lastly, a server should not be running a desktop environment or window manager, and therefore it also has no need for the proprietary Nvidia driver.
If only the driver+user-space components have been updated, but not the kernel, then theoretically yes. You need to stop everything that’s using the old nvidia user-space components (shared libraries, etc.) and anything provided by the nvidia kernel drivers (DRI devices, etc.), unload the nvidia kernel drivers, then load the new ones. Then you can continue what you were doing (e.g. restart CUDA application, restart graphical session, etc.).
But it is certainly more convenient to just restart.
Some might want it for GPGPU purposes, headless rendering, etc.