How to Install newer NVIDIA Driver when Software & Updates won't let you

Ubuntu Version:

24.04.3 LTS
Running Kubuntu on top of this installation. (I know, I know, you’ve all advised me against this).

Desktop Environment (if applicable):

KDE Plasma now.

Problem Description:

I’m a glutton for punishment, I know and you can check out some of my other posts if you want evidence. Still …

I want to install a later NVIDIA driver on my system:

Currently running driver 550.163.01. I need a later version of CUDA than what this provides (12.4).

But when I try to run Software and Updates, it fails.

See error messages below.
What do these error messages tell me?
They tell me that this update requires many packages that are “not going to be installed”.

Why not?
Is there a way I can get them installed?
Is this problem possibly a consequence of having installed kubuntu on top of ubuntu using sudo apt install kubuntu-desktop?

if so, could I get it installed by reverting to ubuntu, or would this just be opening a further can of worms?

Relevant System Information:

Lenovo Thinkpad P16 32 GB RAM
NVidia RTDX 3500

Screenshots or Error Messages:

Current setup:

Desired Setup:

Error Message(s):

What I’ve Tried:


Try the Nvidia 580-open driver. At some point, the “-open” is required on the newer GPUs, but not sure it that applies to just the 5xxx series or includes the 4xxx to (4070TI equivalent I think to your RTX 3500). How did you install the current driver? I find switching from the Additonal Drivers tab like you show should be seamless, but a third party source for drivers may cause problems. What version of CUDA are you interested in? the CUDA 13.0 requires the 580 driver to run the samples.

Why open?

I just tried this (580-open). Same errors.
I was trying to change as little as possible.
This present driver was installed using Software and Updates.

Do you have any idea why it’s requiring all these packages that are not to be installed? That tells me there’s a problem beyond the drivers themselves.

You mention you are trying to get a newer version of CUDA than provided by the repositories. I’m assuming you added the NVIDIA repositories for that?

OK, this looks to be getting close to the problem.

I decided to try to do this from the command line, which at least produced some useful information.

$ ubuntu-drivers devices
udevadm hwdb is deprecated. Use systemd-hwdb instead.
... (more such warnings)
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd000027BBsv000017AAsd00002306bc03sc00i00
vendor   : NVIDIA Corporation
model    : AD104GLM [RTX 3500 Ada Generation Laptop GPU]
driver   : nvidia-driver-580-server - distro non-free
driver   : nvidia-driver-570 - distro non-free
driver   : nvidia-driver-570-open - distro non-free
driver   : nvidia-driver-550 - distro non-free
driver   : nvidia-driver-535 - distro non-free
driver   : nvidia-driver-535-server - distro non-free
driver   : nvidia-driver-570-server - distro non-free
driver   : nvidia-driver-580-server-open - distro non-free
driver   : nvidia-driver-570-server-open - distro non-free
driver   : nvidia-driver-535-open - distro non-free
driver   : nvidia-driver-535-server-open - distro non-free
driver   : nvidia-driver-580-open - third-party non-free recommended
driver   : nvidia-driver-550-open - distro non-free
driver   : nvidia-driver-580 - third-party non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

== /sys/devices/virtual/dmi/id ==
modalias : dmi:bvnLENOVO:bvrN3TET57W(1.57):bd10/21/2024:br1.57:efr1.55:svnLENOVO:pn21FACTO1WW:pvrThinkPadP16Gen2:rvnLENOVO:rn21FACTO1WW:rvrNotDefined:cvnLENOVO:ct10:cvrNone:skuLENOVO_MT_21FA_BU_Think_FM_ThinkPadP16Gen2:
vendor   : Lenovo
model    : product_version
driver   : oem-sutton-barrett-meta - third-party free

Note that 580-open is recommended.
So, I can just do the autoinstall which will install the recommended driver, which is what I want anyway.

$ sudo ubuntu-drivers autoinstall
udevadm hwdb is deprecated. Use systemd-hwdb instead 
and blah blah blah ...

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-580-open-6.8.0-85-generic : Depends: nvidia-kernel-common-580 (<= 580.65.06-1) but 580.82.07-0ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.

So the driver is restricted to nvidia-kernel-common-580 (less than or equal to 580.65.06-1) but the installer wants to use a later version. Why would such a restriction be in effect?

What does this mean? Is it impossible to install this driver, or is there some way I could finagle things to get this to work?

Just noticed you’re using the 6.8 kernel. Do install linux-generic-hwe-24.04 and get the 6.14 kernel – That all I’ve been using for awhile, and everything works for my RTX 3080M with the Nvidia 580-open and CUDA 13.0. There are several answers on askubuntu for installing CUDA using the .run script from the Nvidia download:
https://askubuntu.com/questions/1077061/how-do-i-install-nvidia-and-cuda-drivers-into-ubuntu/1077063#1077063
https://askubuntu.com/questions/1219761/cuda-10-2-different-installation-paths/1244010#1244010
https://askubuntu.com/questions/1536271/can-i-install-cuda-11-4-in-ubuntu-24-04-if-so-how

In short, get your Nvidia driver from Ubuntu sources (restricted has the 580, but a later 580 is available from the graphics-drivers PPA), then use the .run script with the --installpath=/home/xxx/cuda and options to put the bin and lib parts into the CUDA bin and lib instead of system areas. Multiple CUDA releases may be installed in separate areas. Change PATH and LD_LIBRARY_PATH to select which to run.

The Nvidia drivers work fine with Ubuntu installs, usually trouble results from third party installs when kernel updates happen. CUDA deb files I avoid after some early bad experiences with wildly wrong dependencies – but that was years ago.

CUDA typically runs with whatever Nvidia driver you have, but the 13.0 dropped many architectures and requires the 580-open. The drivers from Nvidia are really the “-open” versions these days. I was a bit surprised that the other non-open versions would not work properly – looks like some API additions/changes crept in somewhere.

OK, thanks very but you’re way too far out on the bleeding edge here for me to be comfortable.
You might remember me from this thread from back in January and others of that vintage:
https://discourse.ubuntu.com/t/lenovo-thinkpad-p16-gen2-laptop-wont-accept-24-04/53972/1

Then, I couldn’t even get this new laptop to upgrade from 22.04 to 24.04. It required some OEM packages from lenovo which did not arrive for another four or five months. So I am understandably a little gun-shy.

I have some questions about your answer:

I’ll need explicit instructions. And why do I need to do this? Is that just to make those warnings go away? How much risk is there in making this kernel switch?

Again, I’ll ask you to be explicit. Which ppa’s should I add if I decide to do this?

Don’t the drivers come with some version of CUDA? Why mess around with this? All I really want is to have a driver that works with the software I’m trying to run and the driver I’ve installed.

Not sure why you want me installing multiple different cudas. I just want one that works.

Besides all of these concerns whatever driver and cuda I get need to run through a python
venv and I don’t think it references LD_LIBRARY_PATH, at least not directly.

If you change nVidia driver, you must purge old one first. Otherwise left overs cause conflicts. Driver installs do not fully overwrite old versions. And do not install .run file directly from nVidia.

sudo apt-get remove --purge nvidia-*
sudo ubuntu-drivers devices
If you just want default version - recommended one
sudo ubuntu-drivers autoinstall
Or you can manually choose any in list.
sudo apt-get install nvidia-XXX
2 Likes

That sounds more like the advice I was looking for. Will it overcome the dependency issues I was having?

Doesn’t work. Same errors as before:
After
sudo apt-get remove --purge nvidia-*

After

$ sudo ubuntu-drivers autoinstall
udevadm hwdb is deprecated. Use systemd-hwdb instead.
...

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-580-open-6.8.0-85-generic : Depends: nvidia-kernel-common-580 (<= 580.65.06-1) but 580.82.07-0ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.

So it looks like something needs to be done with the kernel first?

And, oh, crap, now I can’t get back to 550 either.

$ sudo apt-get install --fix-missing nvidia-driver-550
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
...
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libxnvctrl0 nvidia-compute-utils-550 nvidia-dkms-550 nvidia-firmware-550-550.163.01
  nvidia-kernel-common-550 nvidia-kernel-source-550 nvidia-prime nvidia-settings nvidia-utils-550
The following NEW packages will be installed:
  nvidia-compute-utils-550 nvidia-dkms-550 nvidia-driver-550 nvidia-firmware-550-550.163.01
  nvidia-kernel-common-550 nvidia-kernel-source-550 nvidia-prime nvidia-settings nvidia-utils-550
The following packages will be upgraded:
  libxnvctrl0
1 upgraded, 9 newly installed, 0 to remove and 47 not upgraded.
Need to get 0 B/82.4 MB of archives.
After this operation, 141 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 file:/var/cuda-repo-ubuntu2404-13-0-local  libxnvctrl0 580.82.07-0ubuntu1 [36.9 kB]
Err:1 file:/var/cuda-repo-ubuntu2404-13-0-local  libxnvctrl0 580.82.07-0ubuntu1
  File not found - /var/cuda-repo-ubuntu2404-13-0-local/./libxnvctrl0_580.82.07-0ubuntu1_amd64.deb (2: No such file or directory)
Get:2 file:/var/cuda-repo-ubuntu2404-13-0-local  nvidia-settings 580.82.07-0ubuntu1 [884 kB]
Err:2 file:/var/cuda-repo-ubuntu2404-13-0-local  nvidia-settings 580.82.07-0ubuntu1
  File not found - /var/cuda-repo-ubuntu2404-13-0-local/./nvidia-settings_580.82.07-0ubuntu1_amd64.deb (2: No such file or directory)
Selecting previously unselected package nvidia-compute-utils-550.
(Reading database ... 421982 files and directories currently installed.)
Preparing to unpack .../0-nvidia-compute-utils-550_550.163.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking nvidia-compute-utils-550 (550.163.01-0ubuntu0.24.04.1) ...
Selecting previously unselected package nvidia-kernel-source-550.
Preparing to unpack .../1-nvidia-kernel-source-550_550.163.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking nvidia-kernel-source-550 (550.163.01-0ubuntu0.24.04.1) ...
Selecting previously unselected package nvidia-firmware-550-550.163.01.
Preparing to unpack .../2-nvidia-firmware-550-550.163.01_550.163.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking nvidia-firmware-550-550.163.01 (550.163.01-0ubuntu0.24.04.1) ...
Selecting previously unselected package nvidia-kernel-common-550.
Preparing to unpack .../3-nvidia-kernel-common-550_550.163.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking nvidia-kernel-common-550 (550.163.01-0ubuntu0.24.04.1) ...
Selecting previously unselected package nvidia-dkms-550.
Preparing to unpack .../4-nvidia-dkms-550_550.163.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking nvidia-dkms-550 (550.163.01-0ubuntu0.24.04.1) ...
Selecting previously unselected package nvidia-utils-550.
Preparing to unpack .../5-nvidia-utils-550_550.163.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking nvidia-utils-550 (550.163.01-0ubuntu0.24.04.1) ...
Selecting previously unselected package nvidia-driver-550.
Preparing to unpack .../6-nvidia-driver-550_550.163.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking nvidia-driver-550 (550.163.01-0ubuntu0.24.04.1) ...
Selecting previously unselected package nvidia-prime.
Preparing to unpack .../7-nvidia-prime_0.8.17.2_all.deb ...
Unpacking nvidia-prime (0.8.17.2) ...
Setting up nvidia-prime (0.8.17.2) ...
Setting up nvidia-utils-550 (550.163.01-0ubuntu0.24.04.1) ...
Setting up nvidia-compute-utils-550 (550.163.01-0ubuntu0.24.04.1) ...
info: The home dir /nonexistent you specified can't be accessed: No such file or directory

info: Selecting UID from range 100 to 999 ...

info: Selecting GID from range 100 to 999 ...
info: Adding system user `nvidia-persistenced' (UID 125) ...
info: Adding new group `nvidia-persistenced' (GID 132) ...
info: Adding new user `nvidia-persistenced' (UID 125) with group `nvidia-persistenced' ...
info: Not creating `/nonexistent'.
Setting up nvidia-kernel-source-550 (550.163.01-0ubuntu0.24.04.1) ...
Setting up nvidia-firmware-550-550.163.01 (550.163.01-0ubuntu0.24.04.1) ...
Setting up nvidia-kernel-common-550 (550.163.01-0ubuntu0.24.04.1) ...
update-initramfs: deferring update (trigger activated)
Created symlink /etc/systemd/system/systemd-hibernate.service.wants/nvidia-hibernate.service → /usr/lib/systemd/system/nvidia-hibernate.service.
Created symlink /etc/systemd/system/systemd-suspend.service.wants/nvidia-resume.service → /usr/lib/systemd/system/nvidia-resume.service.
Created symlink /etc/systemd/system/systemd-hibernate.service.wants/nvidia-resume.service → /usr/lib/systemd/system/nvidia-resume.service.
Created symlink /etc/systemd/system/systemd-suspend.service.wants/nvidia-suspend.service → /usr/lib/systemd/system/nvidia-suspend.service.
Setting up nvidia-dkms-550 (550.163.01-0ubuntu0.24.04.1) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Loading new nvidia-550.163.01 DKMS files...
Building for 6.8.0-85-generic
Building for architecture x86_64
Building initial module for 6.8.0-85-generic
Done.

nvidia.ko.zst:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.8.0-85-generic/updates/dkms/

nvidia-modeset.ko.zst:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.8.0-85-generic/updates/dkms/

nvidia-drm.ko.zst:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.8.0-85-generic/updates/dkms/

nvidia-uvm.ko.zst:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.8.0-85-generic/updates/dkms/

nvidia-peermem.ko.zst:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.8.0-85-generic/updates/dkms/
depmod...
Setting up nvidia-driver-550 (550.163.01-0ubuntu0.24.04.1) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for initramfs-tools (0.142ubuntu25.5) ...
update-initramfs: Generating /boot/initrd.img-6.8.0-85-generic
I: The initramfs will attempt to resume from /dev/nvme0n1p4
I: (UUID=d0e7b689-a076-4597-94e8-7400efd7746e)
I: Set the RESUME variable to override this.
E: Failed to fetch file:/var/cuda-repo-ubuntu2404-13-0-local/./libxnvctrl0_580.82.07-0ubuntu1_amd64.deb  File not found - /var/cuda-repo-ubuntu2404-13-0-local/./libxnvctrl0_580.82.07-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2404-13-0-local/./nvidia-settings_580.82.07-0ubuntu1_amd64.deb  File not found - /var/cuda-repo-ubuntu2404-13-0-local/./nvidia-settings_580.82.07-0ubuntu1_amd64.deb (2: No such file or directory)

Questions:

  1. What’s up with this:
    info: The home dir /nonexistent you specified can't be accessed: No such file or directory
    why is it looking for a /nonexistent directory

  2. What does this mean:
    I: The initramfs will attempt to resume from /dev/nvme0n1p4 I know /dev/nvme0n1p4 is my swap partition. What is this about in this context?

  3. I: Set the RESUME variable to override this.
    What is this about?

  4. E: Failed to fetch file:/var/cuda-repo-ubuntu2404-13-0-local/./libxnvctrl0_580.82.07-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2404-13-0-local/./libxnvctrl0_580.82.07-0ubuntu1_amd64.deb (2: No such file or directory)

Indeed the entire directory /var/cuda-repo-ubuntu2404-13-0-local does not exist. Could this be the nonexistent directory?

How to get back to sanity? At least back to 550 if not to the 580 I was trying to install?

This looks interesting:

https://ubuntuhandbook.org/index.php/2025/09/ubuntu-added-nvidia-580-driver/#google_vignette

This right here. You’re using unsupported third-party repositories. While it’s Nvidia’s repository, it conflicts with Ubuntu’s official packages. This repository should never be used unless you want to deal with package pinning, which is its own can of worms.

My recommendation is to purge the CUDA repo, forget about it, and get back to the original Ubuntu repos. Otherwise, ubuntu-drivers install and the Software Sources “Additional Drivers” tab will not work!

This sounds like a good idea. But how do I purge the CUDA repo? Where is it?

It’s most likely in /etc/apt/sources.list.d/ but what it is specifically called depends on how you added it.

OK, I find cuda-ubuntu2404-13-0-local.list in that folder. What is meant by “purge”? Simply deleting the file? Or some command?

I found this article, which lists four methods for doing this.

Interestingly, of the four methods recommended, only #3, deleting the file, seems like it might work since no traces of this repository appear in Software and Updates and I don’t know a ppa for it.

And this was the solution, which I marked. Thanks so much.

$ nvidia-smi
Sun Oct 12 12:37:55 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.65.06              Driver Version: 580.65.06      CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA RTX 3500 Ada Gene...    Off |   00000000:01:00.0  On |                  Off |
| N/A   44C    P8              5W /  115W |     198MiB /  12282MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            2210      G   /usr/lib/xorg/Xorg                      171MiB |
+-----------------------------------------------------------------------------------------+

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