ubuntu-drivers recommends conflicting nvidia packages in some circumstances

Bug #2125156 reported by Mitchell Augustin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
In Progress
High
Mitchell Augustin
Jammy
In Progress
High
Mitchell Augustin
Noble
In Progress
High
Mitchell Augustin
Plucky
In Progress
High
Mitchell Augustin
Questing
In Progress
High
Mitchell Augustin

Bug Description

SRU Justification:

[ Impact ]

Attempting to run `sudo ubuntu-drivers install` or `sudo ubuntu-drivers install --gpgpu` on some machines that support multiple Nvidia driver version branches can sometimes result in the generated `apt install` command including multiple conflicting packages, which causes the installation to be stopped.

[ Test Plan ]

1. On a device with an impacted Nvidia GPU and an impacted Ubuntu version, run `sudo ubuntu-drivers install`

[ Expected Behavior ]

A working Nvidia driver solution is installed

[ Actual Behavior ]

The `apt install` command does not complete successfully due to an invalid set of packages being requested for install

[ Fix ]

Before passing the to_install package list to `apt install`, filter out all but the first packages matching `nvidia-driver-*` since only one such package should be allowed in a valid solution.

[ Where problems could occur ]

If the Nvidia driver packaging in the archives is ever updated in the future to allow for multiple valid packages with this glob pattern, this filtering mechanism would potentially prevent such solutions from being recommended.

Related branches

Revision history for this message
Mitchell Augustin (mitchellaugustin) wrote :

I have marked this as "high" importance, since it results in a failure of the core functionality of ubuntu-drivers on specific hardware+software configurations.

Changed in ubuntu-drivers-common (Ubuntu):
assignee: nobody → Mitchell Augustin (mitchellaugustin)
status: New → In Progress
importance: Undecided → High
Revision history for this message
Mitchell Augustin (mitchellaugustin) wrote :

Upstream MP: https://github.com/canonical/ubuntu-drivers-common/pull/138
Build test: https://launchpad.net/~mitchellaugustin/+archive/ubuntu/udc-resolver-bug-9-15-25/+packages

Tested that `sudo ubuntu-drivers install` and `sudo ubuntu-drivers install --gpgpu` install valid solutions on:
- Lenovo SR670v2 w/ 8x Nvidia L40 GPUs (Noble)
- DGX2 (Jammy)
- Lenovo ThinkSystem SE350 (1U2N) (Plucky)
- Local Plucky container, with underlying Noble system with an Nvidia DGX 960

Also confirmed that all tests pass in build test (linked above)

Changed in ubuntu-drivers-common (Ubuntu Plucky):
status: New → In Progress
Changed in ubuntu-drivers-common (Ubuntu Noble):
status: New → In Progress
Changed in ubuntu-drivers-common (Ubuntu Jammy):
status: New → In Progress
Changed in ubuntu-drivers-common (Ubuntu Plucky):
assignee: nobody → Mitchell Augustin (mitchellaugustin)
Changed in ubuntu-drivers-common (Ubuntu Noble):
assignee: nobody → Mitchell Augustin (mitchellaugustin)
Changed in ubuntu-drivers-common (Ubuntu Jammy):
assignee: nobody → Mitchell Augustin (mitchellaugustin)
Changed in ubuntu-drivers-common (Ubuntu Plucky):
importance: Undecided → High
Changed in ubuntu-drivers-common (Ubuntu Noble):
importance: Undecided → High
Changed in ubuntu-drivers-common (Ubuntu Jammy):
importance: Undecided → High
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.