2

today the software updater in Ubuntu 20.04 prompted me to do the "partial upgrade" for newest kernel upgrade.

My current kernel is 5.13.0-39-generic. The partial upgrade wants to install the following:

linux-headers-5.13.0-40-generic
linux-hwe-5.13-headers-5.13.0-40
linux-image-5.13.0-40-generic
linux-modules-5.13.0-40-generic
linux-modules-extra-5.13.0-40-generic
linux-modules-nvidia-390-5.13.0-40-generic
linux-objects-nvidia-390-5.13.0-40-generic
linux-signatures-nvidia-5.13.0-40-generic

It wants to upgrade the following:

libnvidia-cfg1-390
libnvidia-common-390
libnvidia-compute-390
libnvidia-compute-390:i386
libnvidia-decode-390
libnvidia-decode-390:i386
libnvidia-encode-390
libnvidia-encode-390:i386
libnvidia-fbc1-390
libnvidia-fbc1-390:i386
libnvidia-gl-390
libnvidia-gl-390:i386
libnvidia-ifr1-390
libnvidia-ifr1-390:i386
linux-generic-hwe-20.04
linux-headers-generic-hwe-20.04
linux-image-generic-hwe-20.04
linux-libc-dev
linux-modules-nvidia-390-generic-hwe-20.04
nvidia-compute-utils-390
nvidia-dkms-390
nvidia-driver-390
nvidia-kernel-common-390
nvidia-kernel-source-390
nvidia-utils-390
xserver-xorg-video-nvidia-390

So far, so good. But it also wants to REMOVE the following two packages:

linux-modules-nvidia-390-5.13.0-37-generic
linux-modules-nvidia-390-5.13.0-39-generic

As 5.13.0-39 is my current working kernel, if the latter will be removed, I guess I will be unable to boot the previous kernel in case the upgrade goes wrong, as NVIDIA modules will be missing.

Has anybody done this already? Is it safe to do?

raj
  • 10,353
  • 1
    In my experience partial upgrades are problematic. Best to figure out what is broken in your package system and fix that, then do the upgrade. – Organic Marble Apr 19 '22 at 22:26
  • 1
    NEVER do partial upgrades... unless you really know what you're doing. It almost always breaks the system. Do you know how to use Synaptic? It also looks like you've got a possibly outdated Nvidia driver installed... depending on your Nvidia model. The two packages that it wants to remove are related to the nvidia upgrades. – heynnema Apr 19 '22 at 23:28
  • @heynnema Synaptic wants to do exactly the same, ie. install/uninstall/upgrade exactly the same packages. What worries me is that one of the packages it wants to uninstall is the package that is CURRENTLY used (linux-modules-nvidia-390-5.13.0-39-generic). Yes, it looks like there is a big update in Nvidia drivers and that is what causes this issue, but I'm concerned if it won't break my system... – raj Apr 22 '22 at 09:50
  • @raj First, I'd make sure that Nvidia 390 is the most current driver for your Nvidia card. Select the nouveau driver in Software & Updates and reboot. Then I'd uninstall 390. Then I'd do the Software Updates. Then I'd reinstall Nvidia using the Software & Updates app. – heynnema Apr 22 '22 at 13:59
  • @heynnema 390 is not the version, it's the "variant" of the Nvidia driver. Each variant corresponds to a particular family of cards. And yes, 390 is the correct variant for my card (NVS 315). As you see, the update wants to install newer version of 390 driver (linux-modules-nvidia-390-5.13.0-40-generic), but it wants to also remove the current one (linux-modules-nvidia-390-5.13.0-39-generic), which it has never done before. – raj Apr 22 '22 at 14:44
  • @heynnema This is probably because of driver update from 390.144 (which is currently installed) to 390.147 (packages like libnvidia-common-390 and others that are about to be upgraded) and there is probably some incompatibility with the older kernel modules, that run with the .144 driver currently. – raj Apr 22 '22 at 14:49
  • @heynnema Anyway, I'll probably make an image of my root partition and run the upgrade. If it goes wrong, then I will just restore the partition from the image... – raj Apr 22 '22 at 14:52
  • @raj Yes, I see that at https://nvidia.custhelp.com/app/answers/detail/a_id/4605. I'd still recommend the process as per my previous comment. – heynnema Apr 22 '22 at 14:56
  • It's quite problematic that the Ubuntu updater suggests a partial upgrade rather than lead to the proper way to see the packages that failed to install, while this Q&A community is marred with outdated answers rather than having a canonical guide for managing forward from this situation, a very unsuited state for a modern package manager and distribution, this aspect is all like something from the 90's. – matanox Jan 23 '24 at 13:26

1 Answers1

1

I did the partial upgrade today. Everything went well. The only thing that can be an issue is that the package linux-modules-nvidia-390-5.13.0-39-generic has been removed (what I was concerned of) so I would be probably unable to boot from previous kernel 5.13.0-39 should I ever choose to (everything related to even earlier kernel 5.13.0-37 was removed anyway after installing kernel 5.13.0-40, so 37 is not an issue). But because everything is working fine, I have no need to do it.

The whole "partial upgrade" thing was probably caused by the fact that NVIDIA driver has been updated from version 144 to 147 and at the same time kernel was updated from 5.13.0-39 to 5.13.0-40.

The package linux-modules-nvidia-390-5.13.0-39-generic was incompatible with version 147 of the NVIDIA driver, because it requires version 144 (which is clearly displayed if I try to re-install it via Synaptic), so it had to be removed during upgrade (which is normally not done, all packages related to the previous kernel are kept and removed only after next kernel upgrade). This probably can't be done during regular upgrade (I guess), hence the "partial upgrade" procedure.

So answering my own question, yes, it can be safely done.

raj
  • 10,353
  • 1
    Today I got a next kernel upgrade from 5.13.0-40 to 5.13.0-41 and everything related to kernel version 5.13.0-39 has been removed, so there's no more any issue. – raj May 12 '22 at 19:00