Relax dependency on specific version of libnvidia-compute-NNN

Bug #1835630 reported by Piotr Henryk Dabrowski
228
This bug affects 51 people
Affects Status Importance Assigned to Milestone
nvtop (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Currently nvtop in disco/eoan depends on package libnvidia-compute-418.

However Ubuntu provides several different versions of nVidia drivers:
disco: 390, 410, 418
eoan: 390, 410, 418, 430
Also nVidia drivers are easily upgradable via a PPA [1].

Package nvtop depending on a specific libnvidia-compute-NNN version
renders it uninstallable with any other nVidia driver version.

Fix:

Package nvtop should depend on:
the lowest possible version available in a given Ubuntu release (disco/eoan: 390?)
*OR* any following version officially released by nVidia [2].

So for disco and eoan this libnvidia-compute dependency should say:
libnvidia-compute-390 | libnvidia-compute-396 | libnvidia-compute-410 | libnvidia-compute-415 | libnvidia-compute-418 | libnvidia-compute-430

Even if some of those packages are not [officially] available in Ubuntu.

This also means that this package's dependencies should be updated each time a new driver is officially released by nVidia.

[1] https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa
[2] https://download.nvidia.com/XFree86/Linux-x86_64/

Revision history for this message
Lenin (gagarin) wrote :

i'm even using this for our place:
Build-Depends: debhelper (>=11), cmake (>=3.1), cuda-driver-dev-10-0 | nvidia-cuda-dev, cuda-driver-dev-10-0 | libnvidia-ml1, libncurses-dev

should also consider 10-1 meanwhile.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvtop (Ubuntu):
status: New → Confirmed
Revision history for this message
dozer (matthew-pocock) wrote :

I have the same issue with 20.04 and the 440 nvidia driver.

'''
$ sudo apt-get install nvtop
[sudo] password for nmrp3:
Reading package lists... Done
Building dependency tree
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.
 nvtop : Depends: libnvidia-compute-418 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
'''

The package shows dependency:

```
Depends: libc6 (>= 2.17), libncursesw6 (>= 6), libnvidia-compute-418, libtinfo6 (>= 6)
```

The libnvidia-compute could instead point to an enumeration? I don't know how to kludge this for the time being.

Revision history for this message
Kenneth Fazzone (kfazz01) wrote :

i think the ${shlibs} Depends needs to be overridden or removed in favor of a a dependency on libnvidia-ml1

Revision history for this message
Kenneth Fazzone (kfazz01) wrote :

testing build with a nvtop-1.0.0/debian/shlibs.local file:
libnvidia-ml 1 libnvidia-ml1
nvtop builds with a dependency on the virtual package libnvidia-ml1 is provided by multiple verisons of libnvidia-compute-x.

built package has these depends:
Depends: libc6 (>= 2.17), libncursesw6 (>= 6), libnvidia-ml1, libtinfo6 (>= 6)

according to debian policy shlibs.local is not the right way to override deps,not sure what the correct way is.

tags: added: disco eoan groovy
tags: added: focal
Revision history for this message
Lucy Llewellyn (lucyllewy) wrote :

This is fixed in hirsute hippo.

Revision history for this message
Kenneth Fazzone (kfazz01) wrote :

the version currently in hirsute is not fixed, install dependency is still against the nvidia-driver package version it was built against, see https://packages.ubuntu.com/hirsute/nvtop
the installation deps are picked up via shlibs, which should probably be overridden to pick the metapackage instead, see my comment above

tags: added: hirsute
Revision history for this message
Piotr Henryk Dabrowski (phd) wrote :

Bump?

Revision history for this message
Lenin (gagarin) wrote :

having multiple versions of cude and nvidia drivers
and i am doing this per machine

http://bootes.ethz.ch/install-nvtop

hth

Revision history for this message
Andreas Kirsch (blackhc) wrote :

Bump

Revision history for this message
BloodyIron (bloodyiron) wrote :

I'm on Ubuntu 20.04 and I just upgraded my nVidia driver to 470 which immediately broke my nvtop. Something I use regularly to help balance my resourcing in my workflow. How is it that it's TWO YEARS and this STILL HAS NOT BEEN FIXED?

Get it together Canonical. This punishes users for upgrading their GPU drivers. By the way 470 adds a whole bunch of Wayland support stuff, so you'd think Canonical would be on-board with helping users have a good experience in things like this.

Fix. It. Already.

Revision history for this message
Ufos92 (ufos92) wrote :

All I can say, is

WORKAROUND: build from source as described in the repository (https://github.com/Syllo/nvtop)

```
git clone https://github.com/Syllo/nvtop.git
mkdir -p nvtop/build && cd nvtop/build
cmake ..
make

# Install globally on the system
sudo make install
```

Revision history for this message
BloodyIron (bloodyiron) wrote :

Why have a package manager if I can just compile from source every time?

This bug report is about the package in the repo not working on newer nVidia driver packages, and compiling from source is NOT an option.

We need the repo managers to address this.

Revision history for this message
Lenin (gagarin) wrote :

bloodyiron: do you know how -dkms packages work? they compile from source, every time... that's what ufos suggests, and if you look at install-nvtop posted early, it'll just build a package (whenever needed, and install that, and mark it hold).

Revision history for this message
Piotr Henryk Dabrowski (phd) wrote :

@gagarin
DKMS package for nvtop should be provided by the repository anyway.
Either this or proper dependencies in the binary nvtop package.
All the solutions that you mention are troublesome workarounds for something that should work out of the box.

Revision history for this message
Lenin (gagarin) wrote (last edit ):

@phd not sure why you call my workaround troublesome. it just works if used right, we're not having issues. and it's all automatic.

whatis dkms says: dkms (8) - Dynamic Kernel Module Support

Revision history for this message
Mark Harfouche (mark-harfouche) wrote :

For what its worth, I just finished packaging this for conda-forge (well it is in the review process) and what I learned is:

- The latest version of the library is 2.0.2 which has some improvements in the build process
- Specifically, the requirement on nvml at build time has been removed.
- `nvtop` now has some support for AMD GPU.

I would:
- Update the pacakge to 2.0.2
- Remove the cuda dependencies all-together from build time.

Allow users to install them at runtime.

Reference to conda-forge pull request for package review: https://github.com/conda-forge/staged-recipes/pull/19330

Revision history for this message
Qwerty Chouskie (asdfghrbljzmkd) wrote :

Things are still broken in Ubuntu 20.04, but fixed in 22.04 and above.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.