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?
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.
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.
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?
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.
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
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:
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
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?
I: Set the RESUME variable to override this.
What is this about?
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 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!
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.