Unable to upgrade from 22.04 LTS to 24.04 LTS due to held back Nvidia packages

Ubuntu Support Template

Ubuntu Version:
22.04 LTS

Desktop Environment (if applicable):
GNOME

Problem Description:
Today I upgraded from 20.04 LTS to 22.04 LTS successfully. but trying to upgrade 22.04 LTS to 24.04 LTS fails with the following error.

“Please install all available updates for your release before upgrading.” error.

What is strange is that my attempt to upgrade to 24.04 came immediately after the successful upgrade to 22.04 and there were no changes/installs on this system.

The only packages that I cannot update are held back Nvidia packages.

Relevant System Information:
Nvidia driver.

Screenshots or Error Messages:

First I am attempting the upgrade:

$ sudo do-release-upgrade

Checking for a new Ubuntu release
Please install all available updates for your release before upgrading

Next I am attempting to update my release:

$ sudo apt update && sudo apt -y full-upgrade && sudo apt autoremove

Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
4 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Calculating upgrade… Done
Get more security updates through Ubuntu Pro with ‘esm-apps’ enabled:
libqt5core5a qt5-gtk-platformtheme libheif1 imagemagick libopusfile0
libqt5network5 libqt5dbus5 libopenexr25 libqt5widgets5
libmagickcore-6.q16-6-extra libqt5gui5 libqt5printsupport5 libqt5xml5
traceroute libmagickwand-6.q16-6 imagemagick-6.q16 libmagickcore-6.q16-6
imagemagick-6-common libde265-0
Learn more about Ubuntu Pro at Ubuntu Pro | Ubuntu
The following packages have been kept back:
linux-modules-nvidia-470-5.15.0-153-generic linux-modules-nvidia-470-generic-hwe-20.04 linux-objects-nvidia-470-5.15.0-153-generic
linux-signatures-nvidia-5.15.0-153-generic

0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

Attempting to manually update these packages:

$ sudo apt install linux-modules-nvidia-470-5.15.0-153-generic linux-modules-nvidia-470-generic-hwe-20.04 linux-objects-nvidia-470-5.15.0-153-generic linux-signatures-nvidia-5.15.0-153-generic

Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
linux-modules-nvidia-470-5.15.0-153-generic : Depends: linux-signatures-nvidia-5.15.0-153-generic (= 5.15.0-153.163) but 5.15.0-153.163+1 is to be installed
linux-modules-nvidia-470-6.8.0-79-generic : Depends: linux-signatures-nvidia-6.8.0-79-generic (= 6.8.0-79.79~22.04.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Nvidia related packages installed on my system:

$ dpkg -l|grep -i nvidia|grep ^ii

ii boinc-client-nvidia-cuda 7.18.1+dfsg-4ubuntu0.1 amd64 metapackage for CUDA-savvy BOINC client and manager
ii libnvidia-cfg1-470:amd64 470.256.02-0ubuntu0.22.04.1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-470 470.256.02-0ubuntu0.22.04.1 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-470:amd64 470.256.02-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-470:i386 470.256.02-0ubuntu0.22.04.1 i386 NVIDIA libcompute package
ii libnvidia-decode-470:amd64 470.256.02-0ubuntu0.22.04.1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-470:i386 470.256.02-0ubuntu0.22.04.1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-egl-wayland1:amd64 1:1.1.9-1.1ubuntu0.1 amd64 Wayland EGL External Platform library – shared library
ii libnvidia-encode-470:amd64 470.256.02-0ubuntu0.22.04.1 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-470:i386 470.256.02-0ubuntu0.22.04.1 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-470:amd64 470.256.02-0ubuntu0.22.04.1 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-470:amd64 470.256.02-0ubuntu0.22.04.1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-470:i386 470.256.02-0ubuntu0.22.04.1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-470:amd64 470.256.02-0ubuntu0.22.04.1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-470:i386 470.256.02-0ubuntu0.22.04.1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-ifr1-470:amd64 470.256.02-0ubuntu0.22.04.1 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii libnvidia-ifr1-470:i386 470.256.02-0ubuntu0.22.04.1 i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii linux-modules-nvidia-470-5.15.0-153-generic 5.15.0-153.163~20.04.1 amd64 Linux kernel nvidia modules for version 5.15.0-153
ii linux-modules-nvidia-470-generic-hwe-20.04 5.15.0-153.163~20.04.1 amd64 Extra drivers for nvidia-470 for the generic-hwe-20.04 flavour
ii linux-objects-nvidia-470-5.15.0-153-generic 5.15.0-153.163~20.04.1 amd64 Linux kernel nvidia modules for version 5.15.0-153 (objects)
ii linux-signatures-nvidia-5.15.0-153-generic 5.15.0-153.163~20.04.1 amd64 Linux kernel signatures for nvidia modules for version 5.15.0-153-generic
ii nvidia-compute-utils-470 470.256.02-0ubuntu0.22.04.1 amd64 NVIDIA compute utilities
ii nvidia-dkms-470 470.256.02-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package
ii nvidia-driver-460 470.256.02-0ubuntu0.22.04.1 amd64 Transitional package for nvidia-driver-470
ii nvidia-driver-470 470.256.02-0ubuntu0.22.04.1 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-470 470.256.02-0ubuntu0.22.04.1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-470 470.256.02-0ubuntu0.22.04.1 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.17.1 all Tools to enable NVIDIA’s Prime
ii nvidia-settings 510.47.03-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-470 470.256.02-0ubuntu0.22.04.1 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18.2ubuntu0.1 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-470 470.256.02-0ubuntu0.22.04.1 amd64 NVIDIA binary Xorg driver

What I’ve Tried:
1. Tried to update system

  1. sudo apt update --fix-missing

  2. sudo apt install -f
    
  3. Tried Installing held back packages (see error in previous section)

I am of the opinion that when doing an online upgrade from one version of Ubuntu to an other it is best to disable proprietary video drivers and use the open source video drivers.

Nvidia has been know to discontinue support for older Nvidia video adapters. Hardware supported by Nvidia in Ubuntu 20.04 LTS might not be supported by Nvidia in Ubuntu 24.04 LTS.

I also think it is best to revert the desktop to a default state as much as possible. There are big changes in desktop environments between LTS versions.

Regards

Indeed.

There has been a few reports about problems with the 470 branch (which support has been dropped by Nvidia some time ago).

I have had other experts recommend dropping back to open source drivers prior to a major upgrade. When I upgraded from 22.04 to 24.04, though, I did not do this. And according to my notes, the first boot after the upgrade did not appear to be running the NVidia driver, and my second monitor was dark. So I thought the upgrade had automagically disabled the proprietary NVidia driver somehow.

For information I am running very old NVidia hardware (GeForce GTX 750 from 2014) with the 535.288.01 proprietary driver and it is working well for me. The 550 driver also worked for a while for me, but the 580 driver had issues with sleep/resume that I couldn’t fix. Presently the command

sudo ubuntu-drivers devices

indicates that the 535 driver remains recommended for me.

Looks like you have already tried much of this without success, but again for info my post-upgrade NVidia install process looked like this:

sudo apt update
sudo apt install ubuntu-drivers-common
sudo ubuntu-drivers devices
sudo apt install nvidia-driver-xxx

… replace xxx with whatever driver level is recommended by ubuntu-drivers devices.

Hi,

First thing, if your GPU support newer drivers than 470, install the newer ones.

Otherwise at my current work we have such kind of GPUs functioning with driver 470 on ubuntu 24.04 (At least the driver loads without errors) (on non-security-sensitive machines)

Just you have to be aware that ubuntu desktop installs HWE kernel by default, and this old driver doesn’t support kernels newer than 6.11 or something like that.

But what you may be able to do to still run ubuntu 24.04 is to install the 24.04.1 offline.
(So that it doesn’t download the latest HWE kernel introduced in 24.04.3)

Then you remove the kernel HWE enablement metapackage and enforce the generic kernel to be installed (like the ubuntu server kernel version).

I don’t have a ubuntu underhand to test but taken from https://askubuntu.com/questions/1306358/how-to-stop-using-the-hwe-kernel-and-go-back-to-the-ga-kernel, you might be able to do something like this.

sudo apt install linux-generic

sudo apt-get remove linux-{image,headers}-generic-hwe-'*'

And then you reboot, upgrade the rest of your desktop to the latest ubuntu 24.04.3

Of course this example online is for an older version of ubuntu and I’m not sure about the package name but it should be kinda similar.

Of course no guaranties for the long term but just to say there may be a possibility.
Especially no guaranties for later patch releases of the generic kernel, if it works you may want to apt mark hold the functionning kernel and driver and make sure grub only boot this one.
Beware of security risk though of not running an up to date kernel and driver.

Otherwise you should find a used radeon gpu for cheap on Ebay.

1 Like

Fantastic!

I learned something new today about the ubuntu-drivers program. Running

sudo ubuntu-drivers devices

I found that my card is compatible with Nvidia driver version 535 so I installed it and checked, and now I can proceed with the upgrade.

Thank you everyone for your most valuable help!

I’m really glad that worked for you. The only issue I have encountered with the 535 driver has to do with resume from “sleep” mode. The system will go into sleep normally, but upon resume becomes unresponsive - monitors are dark, no response to keyboard or mouse - and the only means of escaping the situation is to hold the power button until a hard shutdown occurs. For me the solution has been to add a line

exit 0

as the first non-comment line in the file /usr/bin/nvidia-sleep.sh, effectively bypassing the manipulations of the virtual terminal performed by that script.

I never send this computer to sleep so I hope I will not run into this issue but I will keep a note of your solution in case I need it in the future.

I now happily running 24.04.3 LTS

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.